hudson.security
Class PermissionGroup

java.lang.Object
  extended by 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
 Class owner
           
 org.jvnet.localizer.Localizable title
          Human readable title of this permission group.
 
Constructor Summary
PermissionGroup(Class owner, org.jvnet.localizer.Localizable title)
           
 
Method Summary
 int compareTo(PermissionGroup that)
           
 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 PermissionGroups available in the system.
 List<Permission> getPermissions()
          Lists up all the permissions in this group.
 boolean hasPermissionContainedBy(PermissionScope scope)
           
 Iterator<Permission> iterator()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

public final Class owner

title

public final org.jvnet.localizer.Localizable title
Human readable title of this permission group. This should be short.

Constructor Detail

PermissionGroup

public PermissionGroup(Class owner,
                       org.jvnet.localizer.Localizable title)
Method Detail

iterator

public Iterator<Permission> iterator()
Specified by:
iterator in interface Iterable<Permission>

getPermissions

public List<Permission> getPermissions()
Lists up all the permissions in this group.


hasPermissionContainedBy

public boolean hasPermissionContainedBy(PermissionScope scope)

find

public Permission find(String name)
Finds a permission that has the given name.


compareTo

public int compareTo(PermissionGroup that)
Specified by:
compareTo in interface Comparable<PermissionGroup>

size

public int size()

getAll

public static List<PermissionGroup> getAll()
Returns all the PermissionGroups available in the system.

Returns:
always non-null. Read-only.

get

public static PermissionGroup get(Class owner)
Gets the PermissionGroup whose owner is the given class.

Returns:
null if not found.


Copyright © 2004-2013. All Rights Reserved.