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 SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionPermissionGroup(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 SummaryModifier 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.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Field Details- 
owner
- 
titlepublic final org.jvnet.localizer.Localizable titleHuman readable title of this permission group. This should be short.
 
- 
- 
Constructor Details- 
PermissionGrouppublic PermissionGroup(@NonNull Class owner, org.jvnet.localizer.Localizable title) throws IllegalStateException Both creates a registers a new permission group.- Parameters:
- owner- sets- owner
- title- sets- title
- Throws:
- IllegalStateException- if this group was already registered
 
- 
PermissionGrouppublic PermissionGroup(String id, @NonNull Class owner, org.jvnet.localizer.Localizable title) throws IllegalStateException Both creates a registers a new permission group.- Parameters:
- owner- sets- owner
- title- sets- title
- Throws:
- IllegalStateException- if this group was already registered
- Since:
- 2.127
 
 
- 
- 
Method Details- 
getIdGets ID of the permission group.- Returns:
- Non-localizable ID of the permission group.
 
- 
getOwnerClassName
- 
iterator- Specified by:
- iteratorin interface- Iterable<Permission>
 
- 
getPermissionsLists up all the permissions in this group.
- 
hasPermissionContainedBy
- 
findFinds a permission that has the given name.
- 
compareTo- Specified by:
- compareToin interface- Comparable<PermissionGroup>
 
- 
equals
- 
hashCodepublic int hashCode()
- 
sizepublic int size()
- 
toString
- 
getAllReturns all thePermissionGroups available in the system.- Returns:
- always non-null. Read-only.
 
- 
getGets thePermissionGroupwhoseowneris the given class.- Returns:
- null if not found.
 
 
-