@Internal public class

UserRoleActorFactory

extends Object
implements RoleActorFactory
java.lang.Object
   ↳ com.atlassian.jira.security.roles.actor.UserRoleActorFactory

@Internal

This class is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Class Overview

Responsible for construction of UserRoleActor instances. Also optimises the lookup where we have many users in a particular role for a project by doing a map lookup based on the username.

Access to the actual User instance is via a UserFactory so we can unit-test. The production dependency is set in the default ctor.

Summary

Constants
String TYPE
Public Constructors
UserRoleActorFactory(UserManager userManager)
Public Methods
ProjectRoleActor createRoleActor(Long id, Long projectRoleId, Long projectId, String type, String parameter)
Create instances of the ProjectRoleActor
Set<RoleActor> optimizeRoleActorSet(Set<RoleActor> roleActors)
if RoleActors can be aggregated and queried in a more optimised way, then optimize the set to reduce its size so we reduce the number of iterations across the set.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.security.roles.RoleActorFactory

Constants

public static final String TYPE

Constant Value: "atlassian-user-role-actor"

Public Constructors

public UserRoleActorFactory (UserManager userManager)

Public Methods

public ProjectRoleActor createRoleActor (Long id, Long projectRoleId, Long projectId, String type, String parameter)

Create instances of the ProjectRoleActor

public Set<RoleActor> optimizeRoleActorSet (Set<RoleActor> roleActors)

if RoleActors can be aggregated and queried in a more optimised way, then optimize the set to reduce its size so we reduce the number of iterations across the set.

Parameters
roleActors a Set of RoleActor instances
Returns
  • the optimized Set perhaps containing aggregations that can be queried more efficiently.