org.rhq.core.domain.authz
Enum Permission

java.lang.Object
  extended by java.lang.Enum<Permission>
      extended by org.rhq.core.domain.authz.Permission
All Implemented Interfaces:
Serializable, Comparable<Permission>

public enum Permission
extends Enum<Permission>

An authorization permission is applied to Roles and related to Subjects that are members of those Roles. There are two types of permissions - global and resource.


Nested Class Summary
static class Permission.Target
          The target that a permission applies to.
 
Enum Constant Summary
CONFIGURE
          can C/U/D resource config (e.g. reconfiguring JBoss to listen for jnp on port 1199)
CONTROL
          can invoke operations that only change the "running" state of the resource (e.g. start/stop)
CREATE_CHILD_RESOURCES
          can manually create new child servers or services
DELETE_RESOURCE
          can delete this resource (which also implies deleting all its descendant resources)
MANAGE_ALERTS
          can C/U/D alert definitions (this implies VIEW_RESOURCE, MANAGE_MEASUREMENTS, CONTROL)
MANAGE_CONTENT
          can C/U/D content (package bits, software updates, etc) (this implies VIEW_RESOURCE)
MANAGE_INVENTORY
          can C/R/U/D all resources, groups and can import auto-discovered resources
MANAGE_MEASUREMENTS
          can C/U/D metric schedules (this implies VIEW_RESOURCE)
MANAGE_SECURITY
          can C/U/D users and roles (viewing is implied for everyone)
MANAGE_SETTINGS
          can modify the JON Server configuration and perform any server-related functionality
MODIFY_RESOURCE
          can modify resource name, description, and plugin config (e.g. set principal/credentials jboss-as plugin uses to access the managed JBossAS instance)
VIEW_RESOURCE
          can view this resource's config, metrics, and alerts
 
Field Summary
static EnumSet<Permission> RESOURCE_ALL
           
 
Method Summary
 Permission.Target getTarget()
          Returns the target that this permission applies to.
static Permission valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Permission[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MANAGE_SECURITY

public static final Permission MANAGE_SECURITY
can C/U/D users and roles (viewing is implied for everyone)


MANAGE_INVENTORY

public static final Permission MANAGE_INVENTORY
can C/R/U/D all resources, groups and can import auto-discovered resources


MANAGE_SETTINGS

public static final Permission MANAGE_SETTINGS
can modify the JON Server configuration and perform any server-related functionality


VIEW_RESOURCE

public static final Permission VIEW_RESOURCE
can view this resource's config, metrics, and alerts


MODIFY_RESOURCE

public static final Permission MODIFY_RESOURCE
can modify resource name, description, and plugin config (e.g. set principal/credentials jboss-as plugin uses to access the managed JBossAS instance)


DELETE_RESOURCE

public static final Permission DELETE_RESOURCE
can delete this resource (which also implies deleting all its descendant resources)


CREATE_CHILD_RESOURCES

public static final Permission CREATE_CHILD_RESOURCES
can manually create new child servers or services


MANAGE_ALERTS

public static final Permission MANAGE_ALERTS
can C/U/D alert definitions (this implies VIEW_RESOURCE, MANAGE_MEASUREMENTS, CONTROL)


MANAGE_MEASUREMENTS

public static final Permission MANAGE_MEASUREMENTS
can C/U/D metric schedules (this implies VIEW_RESOURCE)


MANAGE_CONTENT

public static final Permission MANAGE_CONTENT
can C/U/D content (package bits, software updates, etc) (this implies VIEW_RESOURCE)


CONTROL

public static final Permission CONTROL
can invoke operations that only change the "running" state of the resource (e.g. start/stop)


CONFIGURE

public static final Permission CONFIGURE
can C/U/D resource config (e.g. reconfiguring JBoss to listen for jnp on port 1199)

Field Detail

RESOURCE_ALL

public static final EnumSet<Permission> RESOURCE_ALL
Method Detail

values

public static Permission[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Permission c : Permission.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Permission valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getTarget

public Permission.Target getTarget()
Returns the target that this permission applies to.

Returns:
the target of this permission


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.