com.almworks.jira.structure.api
Class PermissionSubject.ProjectRole

java.lang.Object
  extended by com.almworks.jira.structure.api.PermissionSubject
      extended by com.almworks.jira.structure.api.PermissionSubject.ProjectRole
All Implemented Interfaces:
Cloneable
Enclosing class:
PermissionSubject

public static class PermissionSubject.ProjectRole
extends PermissionSubject

Represents a specific project role in a specific project, matching the users that belong to that project role in that project.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.almworks.jira.structure.api.PermissionSubject
PermissionSubject.Anyone, PermissionSubject.JiraGroup, PermissionSubject.JiraUser, PermissionSubject.ProjectRole, PermissionSubject.Visitor<T>
 
Constructor Summary
PermissionSubject.ProjectRole()
           
PermissionSubject.ProjectRole(long projectId, long roleId)
           
 
Method Summary
 boolean equals(Object o)
           
 long getProjectId()
           
 long getRoleId()
           
 int hashCode()
           
 boolean matches(com.atlassian.crowd.embedded.api.User user)
          Used to check whether a user matches this subject.
 void setProjectId(long projectId)
           
 void setRoleId(long roleId)
           
 String toEncodedString()
           
<T> T
visit(PermissionSubject.Visitor<T> visitor, T carry)
          Calls an appropriate visitor method, passing this PermissionSubject and the carry parameter.
 
Methods inherited from class com.almworks.jira.structure.api.PermissionSubject
clone, clone, fromEncodedString, fromEncodedString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PermissionSubject.ProjectRole

public PermissionSubject.ProjectRole()

PermissionSubject.ProjectRole

public PermissionSubject.ProjectRole(long projectId,
                                     long roleId)
Method Detail

getProjectId

public long getProjectId()

setProjectId

public void setProjectId(long projectId)

getRoleId

public long getRoleId()

setRoleId

public void setRoleId(long roleId)

matches

public boolean matches(com.atlassian.crowd.embedded.api.User user)
Description copied from class: PermissionSubject
Used to check whether a user matches this subject.

Specified by:
matches in class PermissionSubject
Parameters:
user - user to check, null means anonymous
Returns:
true if the user matches

toEncodedString

public String toEncodedString()
Specified by:
toEncodedString in class PermissionSubject
Returns:
a string representation of this permission subject
See Also:
PermissionSubject.fromEncodedString(java.lang.String)

visit

public <T> T visit(PermissionSubject.Visitor<T> visitor,
                   T carry)
Description copied from class: PermissionSubject
Calls an appropriate visitor method, passing this PermissionSubject and the carry parameter.

Specified by:
visit in class PermissionSubject
Returns:
the result of the call

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013 ALMWorks. All Rights Reserved.