com.atlassian.jira.security.roles
Class DefaultRoleActorsImpl

java.lang.Object
  extended by com.atlassian.jira.security.roles.DefaultRoleActorsImpl
All Implemented Interfaces:
DefaultRoleActors
Direct Known Subclasses:
ProjectRoleActorsImpl

public class DefaultRoleActorsImpl
extends java.lang.Object
implements DefaultRoleActors

See Also:
DefaultRoleActors

Constructor Summary
DefaultRoleActorsImpl(java.lang.Long projectRoleId, RoleActor roleActor)
          This will allow you to add a single role actor to the internal Set used for the role actors.
DefaultRoleActorsImpl(java.lang.Long projectRoleId, java.util.Set roleActors)
           
 
Method Summary
 DefaultRoleActors addRoleActor(RoleActor roleActor)
          Add the RoleActor to the contained set of RoleActors and return a new DefaultRoleActors with the modified set
 DefaultRoleActors addRoleActors(java.util.Collection roleActors)
          Add the collection of RoleActors to the contained set of RoleActors and return a new DefaultRoleActors with the modified set
 boolean contains(com.opensymphony.user.User user)
          Does the collection of RoleActor instances contain the specified user.
 java.lang.Long getProjectRoleId()
           
 java.util.Set getRoleActors()
           
 java.util.Set getRoleActorsByType(java.lang.String type)
           
 java.util.Set getUsers()
           
 DefaultRoleActors removeRoleActor(RoleActor roleActor)
          Remove the RoleActor from the contained set of RoleActors and return a new DefaultRoleActors with the modified set
 DefaultRoleActors removeRoleActors(java.util.Collection roleActors)
          Remove the RoleActor from the contained set of RoleActors and return a new DefaultRoleActors with the modified set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRoleActorsImpl

public DefaultRoleActorsImpl(java.lang.Long projectRoleId,
                             java.util.Set roleActors)

DefaultRoleActorsImpl

public DefaultRoleActorsImpl(java.lang.Long projectRoleId,
                             RoleActor roleActor)
This will allow you to add a single role actor to the internal Set used for the role actors. This is a convience constructor to allow us to easily add a single RoleActor

Parameters:
projectRoleId - the Project Role Id we are modelling
roleActor - the Project Role we are modelling
Method Detail

getUsers

public java.util.Set getUsers()
Specified by:
getUsers in interface DefaultRoleActors

getRoleActors

public java.util.Set getRoleActors()
Specified by:
getRoleActors in interface DefaultRoleActors

getProjectRoleId

public java.lang.Long getProjectRoleId()
Specified by:
getProjectRoleId in interface DefaultRoleActors

getRoleActorsByType

public java.util.Set getRoleActorsByType(java.lang.String type)
Specified by:
getRoleActorsByType in interface DefaultRoleActors

contains

public boolean contains(com.opensymphony.user.User user)
Description copied from interface: DefaultRoleActors
Does the collection of RoleActor instances contain the specified user.

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

addRoleActor

public DefaultRoleActors addRoleActor(RoleActor roleActor)
Description copied from interface: DefaultRoleActors
Add the RoleActor to the contained set of RoleActors and return a new DefaultRoleActors with the modified set

Specified by:
addRoleActor in interface DefaultRoleActors
Parameters:
roleActor - the RoleActor to add
Returns:
a copy of this DefaultRoleActors with the added RoleActor in its set of RoleActors

addRoleActors

public DefaultRoleActors addRoleActors(java.util.Collection roleActors)
Description copied from interface: DefaultRoleActors
Add the collection of RoleActors to the contained set of RoleActors and return a new DefaultRoleActors with the modified set

Specified by:
addRoleActors in interface DefaultRoleActors
Parameters:
roleActors - the collection RoleActor to add
Returns:
a copy of this DefaultRoleActors with the added RoleActors in its set of RoleActors

removeRoleActor

public DefaultRoleActors removeRoleActor(RoleActor roleActor)
Description copied from interface: DefaultRoleActors
Remove the RoleActor from the contained set of RoleActors and return a new DefaultRoleActors with the modified set

Specified by:
removeRoleActor in interface DefaultRoleActors
Parameters:
roleActor - the RoleActor to remove
Returns:
a copy of this DefaultRoleActors with the removed RoleActor in its set of RoleActors, may be this if unchanged

removeRoleActors

public DefaultRoleActors removeRoleActors(java.util.Collection roleActors)
Description copied from interface: DefaultRoleActors
Remove the RoleActor from the contained set of RoleActors and return a new DefaultRoleActors with the modified set

Specified by:
removeRoleActors in interface DefaultRoleActors
Parameters:
roleActors - the RoleActor to add
Returns:
a copy of this DefaultRoleActors with the removed RoleActors in its set of RoleActors, may be this if unchanged.


Copyright © 2002-2010 Atlassian. All Rights Reserved.