com.atlassian.jira.security.roles
Interface RoleActor

All Known Subinterfaces:
ProjectRoleActor
All Known Implementing Classes:
AbstractRoleActor, GroupRoleActorFactory.GroupRoleActor

public interface RoleActor

This is an abstraction that allows us to associate users with ProjectRoles.

Please note: implementations must be immutable as caching presumes this.


Method Summary
 boolean contains(com.opensymphony.user.User user)
          Does this RoleActor contain the specified user.
 java.lang.String getDescriptor()
          Returns a pretty viewable representation of the contents of the RoleActor (e.g.
 java.lang.Long getId()
          The id for the Role Actor
 java.lang.String getParameter()
          Returns the string that identifies the target of this role actor (ex.
 java.lang.Long getProjectRoleId()
          This will get the ProjectRole that this RoleActor belongs to.
 java.lang.String getType()
          Returns a string that identifies the implementation type.
 java.util.Set getUsers()
          Will provide a Set of users encapsulated by this RoleActor.
 

Method Detail

getId

java.lang.Long getId()
The id for the Role Actor


getProjectRoleId

java.lang.Long getProjectRoleId()
This will get the ProjectRole that this RoleActor belongs to.

Returns:
the project role that this instance belongs to.

getDescriptor

java.lang.String getDescriptor()
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.

Returns:
pretty descriptor

getType

java.lang.String getType()
Returns a string that identifies the implementation type. This allows us to group common types.

Returns:
implementation type

getParameter

java.lang.String getParameter()
Returns the string that identifies the target of this role actor (ex. if you are a group role actor, then this will be the unique identifier of the group, the group name).

Returns:
the target of the role actor

getUsers

java.util.Set getUsers()
Will provide a Set of users encapsulated by this RoleActor.

Returns:
a Set of users encapsulated by this RoleActor.

contains

boolean contains(com.opensymphony.user.User user)
Does this RoleActor contain the specified user.

Parameters:
user - the user to check if they are contained
Returns:
true if the user is matched by this RoleActor


Copyright © 2002-2010 Atlassian. All Rights Reserved.