so the 2 options are:
long taskDbid = ...;
|
| taskService.addTaskRole(taskDbid, IdentityType.USER, "johndoe",
Role.ROLENAME_CANDIDATE_USER);
|
or
long taskDbid = ...;
|
| taskService.addTaskRole(taskDbid, new User("johndoe"),
Role.ROLENAME_CANDIDATE_USER);
|
where
public interface Identity {
| getId();
| }
|
| public class User implements Identity {
| public User(String userId) {...}
| ...
| }
|
| public class Group implements Identity {
| public Group(String groupId) {...}
| ...
| }
both are acceptable to me. but working with objects in a session facade can lead to
confusion. so i am leaning a bit more towards first option with identityType =
IdentityType.USER and identityId = "johndoe"
WDYT ?
do these 2 options reflect the choice correctly ? or do you see other diffs as well ?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210628#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...