org.jboss.security.authorization
Interface PolicyRegistration


public interface PolicyRegistration

Interface to register policies

Since:
Jun 18, 2006
Version:
$Revision: 71491 $
Author:
Anil Saldhana

Field Summary
static java.lang.String ACL
          Represents a ACL policy
static java.lang.String CUSTOM
          Represents a Custom policy
static java.lang.String JACC
          Represents a JACC policy
static java.lang.String XACML
          Represents an xacml policy
 
Method Summary
 void deRegisterPolicy(java.lang.String contextID, java.lang.String type)
          Unregister a policy
<T> T
getPolicy(java.lang.String contextID, java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> contextMap)
          Obtain the registered policy for the context id
 void registerPolicy(java.lang.String contextID, java.lang.String type, java.io.InputStream stream)
          Register a policy given a xml based stream and a context id
 void registerPolicy(java.lang.String contextID, java.lang.String type, java.net.URL location)
          Register a policy given the location and a context id
 void registerPolicyConfigFile(java.lang.String contextId, java.lang.String type, java.io.InputStream stream)
          Register a policy config file (that lists locations of policies)
 

Field Detail

XACML

static final java.lang.String XACML
Represents an xacml policy

See Also:
Constant Field Values

JACC

static final java.lang.String JACC
Represents a JACC policy

See Also:
Constant Field Values

ACL

static final java.lang.String ACL
Represents a ACL policy

See Also:
Constant Field Values

CUSTOM

static final java.lang.String CUSTOM
Represents a Custom policy

See Also:
Constant Field Values
Method Detail

registerPolicy

void registerPolicy(java.lang.String contextID,
                    java.lang.String type,
                    java.net.URL location)
Register a policy given the location and a context id

Parameters:
contextID - an unique id representing the context
type - type of policy
location - location of the Policy File

registerPolicy

void registerPolicy(java.lang.String contextID,
                    java.lang.String type,
                    java.io.InputStream stream)
Register a policy given a xml based stream and a context id

Parameters:
contextID - an unique id representing the context
type - type of policy
stream - InputStream that is an XML stream

registerPolicyConfigFile

void registerPolicyConfigFile(java.lang.String contextId,
                              java.lang.String type,
                              java.io.InputStream stream)
Register a policy config file (that lists locations of policies)

Parameters:
contextId - an unique id representing the context
type - type of policy
stream - xml stream

deRegisterPolicy

void deRegisterPolicy(java.lang.String contextID,
                      java.lang.String type)
Unregister a policy

Parameters:
contextID - Context ID
type - the type of policy

getPolicy

<T> T getPolicy(java.lang.String contextID,
                java.lang.String type,
                java.util.Map<java.lang.String,java.lang.Object> contextMap)
Obtain the registered policy for the context id

Parameters:
contextID - Context ID
type - the type of policy (xacml, jacc, custom etc)
contextMap - A map that can be used by the implementation to determine the policy choice (typically null)


Copyright © 2009 JBoss Inc.. All Rights Reserved.