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.atlassian.crowd.embedded.api.User user)
          Does this RoleActor contain the specified user.
 String getDescriptor()
          Returns a pretty viewable representation of the contents of the RoleActor (e.g.
 Long getId()
          Returns the id for the Role Actor
 String getParameter()
          Returns the string that identifies the target of this role actor (ex.
 Long getProjectRoleId()
          This will get the ProjectRole that this RoleActor belongs to.
 String getType()
          Returns a string that identifies the implementation type.
 Set<com.atlassian.crowd.embedded.api.User> getUsers()
          Will provide a Set of users encapsulated by this RoleActor.
 

Method Detail

getId

Long getId()
Returns the id for the Role Actor

Returns:
the id for the Role Actor

getProjectRoleId

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

Returns:
the project role that this instance belongs to.

getDescriptor

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

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

Returns:
implementation type

getParameter

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

Set<com.atlassian.crowd.embedded.api.User> getUsers()
Will provide a Set of users encapsulated by this RoleActor.

Returns:
a Set of users encapsulated by this RoleActor.

contains

boolean contains(com.atlassian.crowd.embedded.api.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-2012 Atlassian. All Rights Reserved.