Package hudson.security
Class PermissionGroup
java.lang.Object
hudson.security.PermissionGroup
- All Implemented Interfaces:
Comparable<PermissionGroup>,Iterable<Permission>
public final class PermissionGroup
extends Object
implements Iterable<Permission>, Comparable<PermissionGroup>
Group of
Permissions that share the same owner.
Sortable by the owner class name.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPermissionGroup(Class owner, org.jvnet.localizer.Localizable title) Both creates a registers a new permission group.PermissionGroup(String id, Class owner, org.jvnet.localizer.Localizable title) Both creates a registers a new permission group. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(PermissionGroup that) booleanFinds a permission that has the given name.static PermissionGroupGets thePermissionGroupwhoseowneris the given class.static List<PermissionGroup>getAll()Returns all thePermissionGroups available in the system.getId()Gets ID of the permission group.Lists up all the permissions in this group.inthashCode()booleaniterator()intsize()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
owner
-
title
public final org.jvnet.localizer.Localizable titleHuman readable title of this permission group. This should be short.
-
-
Constructor Details
-
PermissionGroup
public PermissionGroup(@NonNull Class owner, org.jvnet.localizer.Localizable title) throws IllegalStateException Both creates a registers a new permission group.- Parameters:
owner- setsownertitle- setstitle- Throws:
IllegalStateException- if this group was already registered
-
PermissionGroup
public PermissionGroup(String id, @NonNull Class owner, org.jvnet.localizer.Localizable title) throws IllegalStateException Both creates a registers a new permission group.- Parameters:
owner- setsownertitle- setstitle- Throws:
IllegalStateException- if this group was already registered- Since:
- 2.127
-
-
Method Details
-
getId
Gets ID of the permission group.- Returns:
- Non-localizable ID of the permission group.
-
getOwnerClassName
-
iterator
- Specified by:
iteratorin interfaceIterable<Permission>
-
getPermissions
Lists up all the permissions in this group. -
hasPermissionContainedBy
-
find
Finds a permission that has the given name. -
compareTo
- Specified by:
compareToin interfaceComparable<PermissionGroup>
-
equals
-
hashCode
public int hashCode() -
size
public int size() -
toString
-
getAll
Returns all thePermissionGroups available in the system.- Returns:
- always non-null. Read-only.
-
get
Gets thePermissionGroupwhoseowneris the given class.- Returns:
- null if not found.
-