public class

MockRoleActor

extends Object
implements ProjectRoleActor
java.lang.Object
   ↳ com.atlassian.jira.security.roles.MockRoleActor
Known Direct Subclasses

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.security.roles.ProjectRoleActor
Public Constructors
MockRoleActor(String descriptor, String parameter)
MockRoleActor(Long projectRoleId, Long projectId, String descriptor, String parameter, String type)
MockRoleActor(Long projectRoleId, Long projectId, String parameter, String type)
Public Methods
boolean contains(ApplicationUser 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<ApplicationUser> getUsers()
Will provide a Set of users encapsulated by this RoleActor.
int hashCode()
boolean isActive()
Whether this Role Actor entity is active or not;
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.security.roles.ProjectRoleActor
From interface com.atlassian.jira.security.roles.RoleActor

Public Constructors

public MockRoleActor (String descriptor, String parameter)

public MockRoleActor (Long projectRoleId, Long projectId, String descriptor, String parameter, String type)

public MockRoleActor (Long projectRoleId, Long projectId, String parameter, String type)

Public Methods

public 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

public boolean equals (Object o)

public 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

public Long getId ()

Returns the id for the Role Actor

Returns
  • the id for the Role Actor

public 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

public String getPrettyName ()

public Long getProjectId ()

Gets the project this is associated with.

Returns
  • project associated with

public Long getProjectRoleId ()

This will get the ProjectRole that this RoleActor belongs to.

Returns
  • the project role that this instance belongs to.

public String getType ()

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

Returns
  • implementation type

public Set<ApplicationUser> getUsers ()

Will provide a Set of users encapsulated by this RoleActor.

Returns
  • a Set of users encapsulated by this RoleActor.

public int hashCode ()

public boolean isActive ()

Whether this Role Actor entity is active or not;