Package hudson.plugins.collabnet.auth
Class CollabNetRole
- java.lang.Object
-
- hudson.plugins.collabnet.auth.CollabNetRole
-
public class CollabNetRole extends Object
This class stores information about each CollabNet Role (name, description, associated Jenkins permissions, etc.)
-
-
Constructor Summary
Constructors Constructor Description CollabNetRole(String name)
CollabNetRole(String name, String description)
CollabNetRole(String name, String description, Permission... permissions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPermission(Permission permission)
boolean
equals(Object obj)
Any two CollabNetRoles with the same name are equal.String
getDescription()
String
getName()
Collection<Permission>
getPermissions()
int
hashCode()
Override hashcode so it remains consistent with equals.boolean
hasPermission(Permission permission)
String
toString()
Override for prettier logging.
-
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the name of the role.
-
getDescription
public String getDescription()
- Returns:
- the description of the role.
-
getPermissions
public Collection<Permission> getPermissions()
- Returns:
- the Jenkins Permissions granted by this role.
-
addPermission
public void addPermission(Permission permission)
- Parameters:
permission
- to add.
-
hasPermission
public boolean hasPermission(Permission permission)
- Returns:
- true if the role has this permission.
-
equals
public boolean equals(Object obj)
Any two CollabNetRoles with the same name are equal.
-
hashCode
public int hashCode()
Override hashcode so it remains consistent with equals.
-
-