org.objectweb.easybeans.security.permissions
Class AbsPermissionManager

java.lang.Object
  extended by org.objectweb.easybeans.security.permissions.AbsPermissionManager
Direct Known Subclasses:
PermissionManager

public abstract class AbsPermissionManager
extends java.lang.Object

Manages the permission for EasyBeans EJB3 container.

Author:
Florent Benoit

Field Summary
private  java.lang.String contextId
          Context ID.
private  java.net.URL contextIdURL
          Context ID (URL).
private static java.security.Policy policy
          Policy to use.
private  javax.security.jacc.PolicyConfiguration policyConfiguration
          JACC Policy configuration.
 
Constructor Summary
AbsPermissionManager(java.net.URL contextIdURL)
          Default Constructor.
AbsPermissionManager(java.net.URL contextIdURL, boolean remove)
          Default Constructor.
 
Method Summary
 void commit()
          Commit the Policy Configuration.
 void delete()
          Delete this object.
protected  java.lang.String getContextId()
           
protected  java.net.URL getContextIdURL()
           
protected static java.security.Policy getPolicy()
           
protected  javax.security.jacc.PolicyConfiguration getPolicyConfiguration()
           
protected  void setContextId(java.lang.String contextId)
           
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
 

Field Detail

policyConfiguration

private javax.security.jacc.PolicyConfiguration policyConfiguration
JACC Policy configuration.


contextIdURL

private java.net.URL contextIdURL
Context ID (URL).


contextId

private java.lang.String contextId
Context ID.


policy

private static java.security.Policy policy
Policy to use.

Constructor Detail

AbsPermissionManager

public AbsPermissionManager(java.net.URL contextIdURL)
                     throws PermissionManagerException
Default Constructor.

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

AbsPermissionManager

public AbsPermissionManager(java.net.URL contextIdURL,
                            boolean remove)
                     throws PermissionManagerException
Default Constructor.

Parameters:
contextIdURL - context ID URL 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

getPolicy

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

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.

getContextIdURL

protected java.net.URL getContextIdURL()
Returns:
Returns the contextId URL.