public final class Role extends Object implements Comparable
Permissions.| Modifier and Type | Field and Description |
|---|---|
static String |
GLOBAL_ROLE_PATTERN |
| Constructor and Description |
|---|
Role(String name,
String pattern,
Set<String> permissionIds,
String description) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o)
Compare role names.
|
boolean |
equals(Object obj) |
String |
getDescription()
Gets the role description.
|
String |
getName()
Getter for the role name.
|
Pattern |
getPattern()
Getter for the regexp pattern.
|
Set<hudson.security.Permission> |
getPermissions()
Getter for the
Permissions set. |
Boolean |
hasAnyPermission(Set<hudson.security.Permission> permissions)
Checks if the role holds any of the given
Permission. |
int |
hashCode() |
Boolean |
hasPermission(hudson.security.Permission permission)
Checks if the role holds the given
Permission. |
public static final String GLOBAL_ROLE_PATTERN
@DataBoundConstructor public Role(@Nonnull String name, @CheckForNull String pattern, @CheckForNull Set<String> permissionIds, @CheckForNull String description)
public final String getName()
public final Pattern getPattern()
public final Set<hudson.security.Permission> getPermissions()
Permissions set.Permissions set@CheckForNull public String getDescription()
null if not setpublic final Boolean hasPermission(hudson.security.Permission permission)
Permission.permission - The permission you want to checkpublic final Boolean hasAnyPermission(Set<hudson.security.Permission> permissions)
Permission.permissions - A Permissions setPermissionspublic int compareTo(Object o)
compareTo in interface Comparableo - The object you want to compare this instance toCopyright © 2016–2019. All rights reserved.