Skip navigation links

Oracle® WebCenter Content Java API Reference for Imaging
11g Release 1 (11.1.1)

E12853-03


oracle.imaging
Class BasePermissions

java.lang.Object
  extended by oracle.imaging.BasePermissions

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Definition.Permissions, Document.Permissions, SystemSecurity.Permissions

public abstract class BasePermissions
extends java.lang.Object
implements java.io.Serializable

The BasePermissions class provides the definition of all permissions within the Imaging System. The class provides a basic getter and setter for permissions that is controlled by the sub-classes. Each sub-class of BasePermissions defines the subset of permissions that are valid from the complete enumeration set provided by: BasePermissions.Permission. Each subclass will implement a getter and a setter for each permission that is valid. The methods implemented in the BasePermissions class will check the list of valid permissions for this instance and throw the runtime IllegalArgumentException if the permission is not valid for this instance.

See Also:
Serialized Form

Nested Class Summary
static class BasePermissions.Permission
          The enumeration of all permissions within the Imaging System.

 

Field Summary
protected  java.util.Map<BasePermissions.Permission,java.lang.String> permissionPropertyMap
           
protected  java.util.Map<java.lang.String,BasePermissions.Permission> propertyPermissionMap
           

 

Constructor Summary
protected BasePermissions()
          Default constructor required for JAXB serialization.

 

Method Summary
protected  void addPermissions(java.util.List<BasePermissions.Permission> permissions)
           
protected static short convertBoolToShort(boolean boolVal)
           
protected static java.lang.Boolean convertShortToBool(short shortVal)
           
 java.util.Set<BasePermissions.Permission> getKeys()
          Gets the permissions defined for this implementation from the enumeration of permissions.
 boolean getPermission(BasePermissions.Permission perm)
          Gets state of the permission for this instance.
 void setAll(boolean value)
           
 void setPermission(BasePermissions.Permission perm, boolean value)
          Sets state of the permission for this instance.
 BasePermissions.Permission toEnum(java.lang.String propName)
          Gets the permission enumeration based off the specified property name.
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

permissionPropertyMap

protected java.util.Map<BasePermissions.Permission,java.lang.String> permissionPropertyMap

propertyPermissionMap

protected java.util.Map<java.lang.String,BasePermissions.Permission> propertyPermissionMap

Constructor Detail

BasePermissions

protected BasePermissions()
Default constructor required for JAXB serialization.

Method Detail

convertBoolToShort

protected static short convertBoolToShort(boolean boolVal)

convertShortToBool

protected static java.lang.Boolean convertShortToBool(short shortVal)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addPermissions

protected void addPermissions(java.util.List<BasePermissions.Permission> permissions)

setAll

public void setAll(boolean value)

getKeys

public java.util.Set<BasePermissions.Permission> getKeys()
Gets the permissions defined for this implementation from the enumeration of permissions. Each of the concrete implementing classes will define the set of permissions valid for that implementation.
Returns:
the set of permissions valid for this implementation.

toEnum

public BasePermissions.Permission toEnum(java.lang.String propName)
Gets the permission enumeration based off the specified property name.
Parameters:
propName - Property name of the permission enumeration to return.
Returns:
The permission enumeration matching the property name.

getPermission

public boolean getPermission(BasePermissions.Permission perm)
Gets state of the permission for this instance. A value of true implies that this object has the specified permission. If the permission is not valid for the implementation, then an IllegalArgumentException is thrown. The preferred method is to use the getters implemented by the concrete implementations of this class.
Parameters:
perm - the permission whose state is being requested.
Returns:
the current state of the permission.

setPermission

public void setPermission(BasePermissions.Permission perm,
                          boolean value)
Sets state of the permission for this instance. A value of true implies that this object has the specified permission. If the permission is not valid for the implementation, then an IllegalArgumentException is thrown. The preferred method is to use the setters implemented by the concrete implementations of this class.
Parameters:
perm - the permission whose state is being changed.
value - true if this object has this specific permission.

Skip navigation links

Oracle® WebCenter Content Java API Reference for Imaging
11g Release 1 (11.1.1)

E12853-03


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.