com.atlassian.jira.mock
Class MockProjectRoleManager.MockRoleActor

java.lang.Object
  extended by com.atlassian.jira.mock.MockProjectRoleManager.MockRoleActor
All Implemented Interfaces:
ProjectRoleActor, RoleActor
Enclosing class:
MockProjectRoleManager

public static class MockProjectRoleManager.MockRoleActor
extends Object
implements ProjectRoleActor


Field Summary
static String INVALID_PARAMETER
           
static String TYPE
           
 
Fields inherited from interface com.atlassian.jira.security.roles.ProjectRoleActor
GROUP_ROLE_ACTOR_TYPE, USER_ROLE_ACTOR_TYPE
 
Constructor Summary
MockProjectRoleManager.MockRoleActor(Long id, Long projectRoleId, Long projectId, Set<com.atlassian.crowd.embedded.api.User> users, String type, String parameter)
           
 
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.
 boolean equals(Object o)
           
 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.
 String getPrettyName()
           
 Long getProjectId()
          Gets the project this is associated with.
 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.
 int hashCode()
           
 boolean isActive()
          Whether this Role Actor entity is active or not;
 void setId(Long id)
           
 void setParameter(String parameter)
           
 void setProjectId(Long projectId)
           
 void setProjectRoleId(Long projectRoleId)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INVALID_PARAMETER

public static final String INVALID_PARAMETER
See Also:
Constant Field Values

TYPE

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

MockProjectRoleManager.MockRoleActor

public MockProjectRoleManager.MockRoleActor(Long id,
                                            Long projectRoleId,
                                            Long projectId,
                                            Set<com.atlassian.crowd.embedded.api.User> users,
                                            String type,
                                            String parameter)
                                     throws RoleActorDoesNotExistException
Throws:
RoleActorDoesNotExistException
Method Detail

getId

public Long getId()
Description copied from interface: RoleActor
Returns the id for the Role Actor

Specified by:
getId in interface RoleActor
Returns:
the id for the Role Actor

setId

public void setId(Long id)

getProjectRoleId

public Long getProjectRoleId()
Description copied from interface: RoleActor
This will get the ProjectRole that this RoleActor belongs to.

Specified by:
getProjectRoleId in interface RoleActor
Returns:
the project role that this instance belongs to.

setProjectRoleId

public void setProjectRoleId(Long projectRoleId)

getProjectId

public Long getProjectId()
Description copied from interface: ProjectRoleActor
Gets the project this is associated with.

Specified by:
getProjectId in interface ProjectRoleActor
Returns:
project associated with

setProjectId

public void setProjectId(Long projectId)

getPrettyName

public String getPrettyName()

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

getType

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

Specified by:
getType in interface RoleActor
Returns:
implementation type

getParameter

public String getParameter()
Description copied from interface: RoleActor
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).

Specified by:
getParameter in interface RoleActor
Returns:
the target of the role actor

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.

Specified by:
getUsers in interface RoleActor
Returns:
a Set of users encapsulated by this RoleActor.

setParameter

public void setParameter(String parameter)
                  throws RoleActorDoesNotExistException
Throws:
RoleActorDoesNotExistException

contains

public boolean contains(ApplicationUser user)
Description copied from interface: RoleActor
Does this RoleActor contain the specified user.

Specified by:
contains in interface RoleActor
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.

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

isActive

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

Specified by:
isActive in interface RoleActor

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2014 Atlassian. All Rights Reserved.