com.atlassian.jira.security.roles.actor
Class GroupRoleActorFactory.GroupRoleActor

java.lang.Object
  extended by com.atlassian.jira.security.roles.actor.AbstractRoleActor
      extended by com.atlassian.jira.security.roles.actor.GroupRoleActorFactory.GroupRoleActor
All Implemented Interfaces:
ProjectRoleActor, RoleActor
Enclosing class:
GroupRoleActorFactory

public class GroupRoleActorFactory.GroupRoleActor
extends AbstractRoleActor


Field Summary
 
Fields inherited from interface com.atlassian.jira.security.roles.ProjectRoleActor
GROUP_ROLE_ACTOR_TYPE, USER_ROLE_ACTOR_TYPE
 
Method Summary
 boolean contains(ApplicationUser user)
          Does this RoleActor contain the specified user.
 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.
 com.atlassian.crowd.embedded.api.Group getGroup()
          Returns a Group object that represents a valid (existing) group or throws an IllegalArgumentException if the group does not exist
 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;
 
Methods inherited from class com.atlassian.jira.security.roles.actor.AbstractRoleActor
equals, getId, getParameter, getProjectId, getProjectRoleId, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

isActive

public boolean isActive()
Description copied from interface: RoleActor
Whether this Role Actor entity is active or not;

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

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:
implementation type

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
Returns:
pretty descriptor

getUsers

public Set<com.atlassian.crowd.embedded.api.User> 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.

contains

public boolean contains(ApplicationUser user)
Description copied from interface: RoleActor
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

public boolean contains(com.atlassian.crowd.embedded.api.User user)
Description copied from interface: RoleActor
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

getGroup

public com.atlassian.crowd.embedded.api.Group getGroup()
                                                throws IllegalArgumentException
Returns a Group object that represents a valid (existing) group or throws an IllegalArgumentException if the group does not exist

Returns:
group
Throws:
IllegalArgumentException - if group does not exist


Copyright © 2002-2014 Atlassian. All Rights Reserved.