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 Object
implements DefaultRoleActors

See Also:
DefaultRoleActors

Constructor Summary
DefaultRoleActorsImpl(Long projectRoleId, RoleActor roleActor)
          This will allow you to add a single role actor to the internal Set used for the role actors.
DefaultRoleActorsImpl(Long projectRoleId, 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(Collection roleActors)
          Add the collection of RoleActors to the contained set of RoleActors and return a new DefaultRoleActors with the modified set
 boolean contains(User user)
          Does the collection of RoleActor instances contain the specified user.
 Long getProjectRoleId()
           
 Set getRoleActors()
           
 Set getRoleActorsByType(String type)
           
 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(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(Long projectRoleId,
                             Set roleActors)

DefaultRoleActorsImpl

public DefaultRoleActorsImpl(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 Set getUsers()
Specified by:
getUsers in interface DefaultRoleActors

getRoleActors

public Set getRoleActors()
Specified by:
getRoleActors in interface DefaultRoleActors

getProjectRoleId

public Long getProjectRoleId()
Specified by:
getProjectRoleId in interface DefaultRoleActors

getRoleActorsByType

public Set getRoleActorsByType(String type)
Specified by:
getRoleActorsByType in interface DefaultRoleActors

contains

public boolean contains(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(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(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-2008 Atlassian. All Rights Reserved.