hudson.plugins.collabnet.auth
Class CNProjectACL.CollabNetRoles
java.lang.Object
hudson.plugins.collabnet.auth.CNProjectACL.CollabNetRoles
- Enclosing class:
- CNProjectACL
public static class CNProjectACL.CollabNetRoles
- extends java.lang.Object
|
Method Summary |
static java.util.Collection<CollabNetRole> |
getAllRoles()
|
static java.util.List<java.lang.String> |
getDescriptions()
|
static CollabNetRole |
getGrantingRole(hudson.security.Permission permission)
Given a permission, return the CollabNet role which would grant
that permission (if any). |
static java.util.List<java.lang.String> |
getNames()
|
static CollabNetRole |
getRole(java.lang.String name)
Get the role which matches this name, if one exists. |
static java.util.Collection<CollabNetRole> |
getRoles(java.util.Collection<java.lang.String> names)
Get the roles matching a set of role names. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CNProjectACL.CollabNetRoles
public CNProjectACL.CollabNetRoles()
getRole
public static CollabNetRole getRole(java.lang.String name)
- Get the role which matches this name, if one exists.
This is a bit inefficient, but should be ok for small numbers
of roles. If we ever have performance problems, we might
want to consider putting this in a name->role HashMap.
- Parameters:
name - to match
- Returns:
- the matching CollabNetRole or null if none is found.
getRoles
public static java.util.Collection<CollabNetRole> getRoles(java.util.Collection<java.lang.String> names)
- Get the roles matching a set of role names.
- Parameters:
names - to match
- Returns:
- a collection of matching roles. If a name doesn't match
any CollabNetRole, it will be skipped.
getAllRoles
public static java.util.Collection<CollabNetRole> getAllRoles()
- Returns:
- all roles. Lazily initialized.
getNames
public static java.util.List<java.lang.String> getNames()
- Returns:
- an ordered List of Role names.
getDescriptions
public static java.util.List<java.lang.String> getDescriptions()
- Returns:
- an ordered List of Role descriptions.
getGrantingRole
public static CollabNetRole getGrantingRole(hudson.security.Permission permission)
- Given a permission, return the CollabNet role which would grant
that permission (if any). Returns the first permission granting
role found (but we expect only one).
- Parameters:
permission -
- Returns:
- the CollabNet role which would grant that permission, or
null if none would.
Copyright © 2010. All Rights Reserved.