@Internal public class

GroupRoleActorFactory

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

@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).

Summary

Nested Classes
class GroupRoleActorFactory.GroupRoleActor  
Public Constructors
GroupRoleActorFactory(GroupManager groupManager, DbConnectionManager dbConnectionManager)
Public Methods
ProjectRoleActor createRoleActor(Long id, Long projectRoleId, Long projectId, String type, String groupName)
Create instance of the ProjectRoleActor representing a role actor stored in the database.
@Nonnull Set<ProjectRoleActor> getAllRoleActorsForUser(ApplicationUser user)
Find and return all role actors for the given user.
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

Public Constructors

public GroupRoleActorFactory (GroupManager groupManager, DbConnectionManager dbConnectionManager)

Public Methods

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

Create instance of the ProjectRoleActor representing a role actor stored in the database. In order to add a new role actor please pass a null id.

Parameters
id of the ProjectRoleActor
projectRoleId of the ProjectRole associated with the actor.
projectId of the Project associated with the actor.
type of the actor which determines the implementation.
groupName saying with which exact entity is actor associated ie. group name, user name.
Returns
  • implementation representing ProjectRoleActor.

@Nonnull public Set<ProjectRoleActor> getAllRoleActorsForUser (ApplicationUser user)

Find and return all role actors for the given user.

Parameters
user for which actors will be obtained
Returns
  • a set of actors being associated with the given user or empty set if none found.

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.