public final class PermissionGroup extends Object implements Iterable<Permission>, Comparable<PermissionGroup>
Permission
s that share the same owner
.
Sortable by the owner class name.Modifier and Type | Field and Description |
---|---|
Class |
owner |
org.jvnet.localizer.Localizable |
title
Human readable title of this permission group.
|
Constructor and Description |
---|
PermissionGroup(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.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PermissionGroup that) |
boolean |
equals(Object o) |
Permission |
find(String name)
Finds a permission that has the given name.
|
static PermissionGroup |
get(Class owner)
Gets the
PermissionGroup whose owner is the given class. |
static List<PermissionGroup> |
getAll()
Returns all the
PermissionGroup s available in the system. |
String |
getId()
Gets ID of the permission group.
|
String |
getOwnerClassName() |
List<Permission> |
getPermissions()
Lists up all the permissions in this group.
|
int |
hashCode() |
boolean |
hasPermissionContainedBy(PermissionScope scope) |
Iterator<Permission> |
iterator() |
int |
size() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
@NonNull public final Class owner
public final org.jvnet.localizer.Localizable title
public PermissionGroup(@NonNull Class owner, org.jvnet.localizer.Localizable title) throws IllegalStateException
owner
- sets owner
title
- sets title
IllegalStateException
- if this group was already registeredpublic PermissionGroup(String id, @NonNull Class owner, org.jvnet.localizer.Localizable title) throws IllegalStateException
owner
- sets owner
title
- sets title
IllegalStateException
- if this group was already registeredpublic String getId()
public String getOwnerClassName()
public Iterator<Permission> iterator()
iterator
in interface Iterable<Permission>
public List<Permission> getPermissions()
public boolean hasPermissionContainedBy(PermissionScope scope)
public Permission find(String name)
public int compareTo(PermissionGroup that)
compareTo
in interface Comparable<PermissionGroup>
public int size()
public static List<PermissionGroup> getAll()
PermissionGroup
s available in the system.@CheckForNull public static PermissionGroup get(Class owner)
PermissionGroup
whose owner
is the given class.Copyright © 2004–2021. All rights reserved.