com.atlassian.jira.security.roles.actor
Class UserRoleActor

java.lang.Object
  extended bycom.atlassian.jira.security.roles.actor.AbstractRoleActor
      extended bycom.atlassian.jira.security.roles.actor.UserRoleActor
All Implemented Interfaces:
ProjectRoleActor, RoleActor

public class UserRoleActor
extends AbstractRoleActor

Represents a User actor for project roles.


Field Summary
static String TYPE
           
 
Fields inherited from class com.atlassian.jira.security.roles.actor.AbstractRoleActor
parameter
 
Constructor Summary
UserRoleActor(JiraAuthenticationContext jiraAuthenticationContext)
           
 
Method Summary
 boolean equals(Object o)
           
 String getDescriptor()
          Returns a pretty viewable representation of the contents of the RoleActor (e.g.
 String getPrettyName()
          Gets the pretty viewable name for this role actor, this is the user-presentable version of the role actors type.
 String getType()
          Returns a string that identifies the implementation type.
 Set getUsers()
          Will provide a Set of users encapsulated by this RoleActor.
 int hashCode()
           
 void setParameter(String parameter)
          Sets the username.
 void setUser(User user)
          Convenience alternative to setParameter(String), note that this sets the parameter value to the name of the given user.
 
Methods inherited from class com.atlassian.jira.security.roles.actor.AbstractRoleActor
getId, getParameter, getProject, getProjectRole, setId, setProject, setProjectRole
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final String TYPE
See Also:
Constant Field Values
Constructor Detail

UserRoleActor

public UserRoleActor(JiraAuthenticationContext jiraAuthenticationContext)
Method Detail

getType

public String getType()
Description copied from interface: RoleActor
Returns a string that identifies the implementation type. This allows us to group common types.

Returns:
implmentation type

getPrettyName

public String getPrettyName()
Description copied from interface: RoleActor
Gets the pretty viewable name for this role actor, this is the user-presentable version of the role actors type.

Returns:
a pretty viewable name

getDescriptor

public String getDescriptor()
Description copied from interface: RoleActor
Returns a pretty viewable representation of the contents of the RoleActor (e.g. if a UserRoleActor, then their full name, James Brown, if a GroupRoleActor, then the name of the group, Business Analysts). NOTE that the returned value is used in RoleActorComparator for sorting.

Specified by:
getDescriptor in interface RoleActor
Overrides:
getDescriptor in class AbstractRoleActor

getUsers

public Set getUsers()
Description copied from interface: RoleActor
Will provide a Set of users encapsulated by this RoleActor.

Returns:
a Set of users encapsulated by this RoleActor.

setUser

public void setUser(User user)
Convenience alternative to setParameter(String), note that this sets the parameter value to the name of the given user.

Parameters:
user - the user.

setParameter

public void setParameter(String parameter)
Sets the username.

Parameters:
parameter - the username.

equals

public boolean equals(Object o)

hashCode

public int hashCode()


Copyright © 2002-2007 Atlassian. All Rights Reserved.