hudson.plugins.collabnet.auth
Class CollabNetRole

java.lang.Object
  extended by hudson.plugins.collabnet.auth.CollabNetRole

public class CollabNetRole
extends java.lang.Object

This class stores information about each CollabNet Role (name, description, associated hudson permissions, etc.)


Constructor Summary
CollabNetRole(java.lang.String name)
           
CollabNetRole(java.lang.String name, java.lang.String description)
           
CollabNetRole(java.lang.String name, java.lang.String description, java.util.Collection<hudson.security.Permission> permissions)
           
 
Method Summary
 void addPermission(hudson.security.Permission permission)
           
 boolean equals(java.lang.Object obj)
          Any two CollabNetRoles with the same name are equal.
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 java.util.Collection<hudson.security.Permission> getPermissions()
           
 int hashCode()
          Override hashcode so it remains consistent with equals.
 boolean hasPermission(hudson.security.Permission permission)
           
 java.lang.String toString()
          Override for prettier logging.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollabNetRole

public CollabNetRole(java.lang.String name,
                     java.lang.String description,
                     java.util.Collection<hudson.security.Permission> permissions)

CollabNetRole

public CollabNetRole(java.lang.String name,
                     java.lang.String description)

CollabNetRole

public CollabNetRole(java.lang.String name)
Method Detail

getName

public java.lang.String getName()
Returns:
the name of the role.

getDescription

public java.lang.String getDescription()
Returns:
the description of the role.

getPermissions

public java.util.Collection<hudson.security.Permission> getPermissions()
Returns:
the Hudson Permissions granted by this role.

addPermission

public void addPermission(hudson.security.Permission permission)
Parameters:
permission - to add.

hasPermission

public boolean hasPermission(hudson.security.Permission permission)
Returns:
true if the role has this permission.

equals

public boolean equals(java.lang.Object obj)
Any two CollabNetRoles with the same name are equal.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Override hashcode so it remains consistent with equals.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Override for prettier logging.

Overrides:
toString in class java.lang.Object


Copyright © 2010. All Rights Reserved.