On Sun, Mar 13, 2011 at 8:53 PM, Afkham Azeez <[email protected]> wrote:

>
>
> On Sun, Mar 13, 2011 at 8:45 PM, Hasini Gunasinghe <[email protected]>wrote:
>
>>
>>
>> On Sun, Mar 13, 2011 at 8:41 PM, Afkham Azeez <[email protected]> wrote:
>>
>>>
>>>
>>> On Sun, Mar 13, 2011 at 8:32 PM, Hasini Gunasinghe <[email protected]>wrote:
>>>
>>>> Hi,
>>>> Just wanted to inform about an update I did recently, which I think
>>>> is related to the use case 1 you have mentioned.
>>>> On Sat, Mar 12, 2011 at 8:43 AM, Dimuthu Leelarathne <[email protected]
>>>> > wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Here is the comment I wrote.
>>>>> /**
>>>>>  * This is a classic sample of DTOs.
>>>>>  * An instance of this class can represent either an user item or role
>>>>> item.
>>>>>  * This is used to represent items in lists of users and roles sent to
>>>>> the Carbon FE.
>>>>>  * It contains information to indicate whether the representing item is
>>>>> editable
>>>>>  * or selected within the given context.
>>>>>  */
>>>>>
>>>>> Here are the use cases.
>>>>>
>>>>> Usecase 1 : When listing roles we should not show the editable link if
>>>>> it is a external role.
>>>>>
>>>>
>>>> Now the external roles are also editable. Hence I added the property
>>>> "roleType" to FlaggedName class.
>>>>
>>>
>>> Is the roleType a String or an enum?
>>>
>>
>> It is a String. Is it not correct to use String type for that?
>>
>
> Using String constants to represent different types of the same thing are
> so pre-JDK 1.5. This could be seen throughout our code since when we started
> Axis2 etc. we were supporting only JDK 1.4.  For new code, it is best to use
> JDK 5/6 way of doing things. So enum is the proper thing to use here.
>
Thanks for letting me know that...I will change it to use enum.
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to