com.atlassian.jira.security.roles
Interface RoleActor

All Known Subinterfaces:
ProjectRoleActor
All Known Implementing Classes:
AbstractRoleActor, GroupRoleActorFactory.GroupRoleActor, MockGroupRoleActor, MockProjectRoleManager.MockRoleActor, MockRoleActor, MockUserRoleActor

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(ApplicationUser user)
          Does this RoleActor contain the specified user.
 boolean contains(com.atlassian.crowd.embedded.api.User user)
          Deprecated. Use this.contains instead. Since v6.0.
 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.
 boolean isActive()
          Whether this Role Actor entity is active or not;
 

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(ApplicationUser 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

contains

boolean contains(com.atlassian.crowd.embedded.api.User user)
Deprecated. Use this.contains instead. Since v6.0.

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

isActive

boolean isActive()
Whether this Role Actor entity is active or not;



Copyright © 2002-2014 Atlassian. All Rights Reserved.