org.objectweb.jonas_lib.security
Class AbsPermissionManager

java.lang.Object
  extended by org.objectweb.jonas_lib.security.AbsPermissionManager
Direct Known Subclasses:
PermissionManager, PermissionManager

public abstract class AbsPermissionManager
extends java.lang.Object

Defines an abstract PermissionManager class which will manage JACC permissions for an ejbjar, webapp, etc.

Author:
Florent Benoit

Constructor Summary
AbsPermissionManager(java.lang.String contextId)
          Default Constructor
AbsPermissionManager(java.lang.String contextId, boolean remove)
          Default Constructor
 
Method Summary
 void commit()
          Commit the Policy Configuration
 void delete()
          Delete this object
protected  java.lang.String getContextId()
           
protected static java.security.Policy getPolicy()
           
protected  javax.security.jacc.PolicyConfiguration getPolicyConfiguration()
           
protected abstract  void resetDeploymentDesc()
          Reset Deployment Descriptor
protected  void setContextId(java.lang.String contextId)
           
protected static void setPolicy(java.security.Policy policy)
           
protected  void setPolicyConfiguration(javax.security.jacc.PolicyConfiguration policyConfiguration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsPermissionManager

public AbsPermissionManager(java.lang.String contextId)
                     throws PermissionManagerException
Default Constructor

Parameters:
contextId - context ID used for PolicyContext
Throws:
PermissionManagerException - if permissions can't be set

AbsPermissionManager

public AbsPermissionManager(java.lang.String contextId,
                            boolean remove)
                     throws PermissionManagerException
Default Constructor

Parameters:
contextId - context ID used for PolicyContext
remove - - if true, the policy configuration will be removed.
Throws:
PermissionManagerException - if permissions can't be set
Method Detail

delete

public void delete()
            throws PermissionManagerException
Delete this object

Throws:
PermissionManagerException - if the configuration can't be deleted

commit

public void commit()
            throws PermissionManagerException
Commit the Policy Configuration

Throws:
PermissionManagerException - if commit can't be done

resetDeploymentDesc

protected abstract void resetDeploymentDesc()
Reset Deployment Descriptor


getPolicy

protected static java.security.Policy getPolicy()
Returns:
Returns the policy.

setPolicy

protected static void setPolicy(java.security.Policy policy)
Parameters:
policy - The policy to set.

getContextId

protected java.lang.String getContextId()
Returns:
Returns the contextId.

setContextId

protected void setContextId(java.lang.String contextId)
Parameters:
contextId - The contextId to set.

getPolicyConfiguration

protected javax.security.jacc.PolicyConfiguration getPolicyConfiguration()
Returns:
Returns the policyConfiguration.

setPolicyConfiguration

protected void setPolicyConfiguration(javax.security.jacc.PolicyConfiguration policyConfiguration)
Parameters:
policyConfiguration - The policyConfiguration to set.