org.apache.neethi
Class PolicyEngine

java.lang.Object
  extended by org.apache.neethi.PolicyEngine

public class PolicyEngine
extends java.lang.Object

PolicyEngine provides set of methods to create a Policy object from an InputStream, OMElement, .. etc. It maintains an instance of AssertionBuilderFactory that can return AssertionBuilders that can create a Domain Assertion out of an OMElement. These AssertionBuilders are used when constructing a Policy object.


Field Summary
static java.lang.String ALL
           
static java.lang.String EXACTLY_ONE
           
static java.lang.String POLICY
           
static java.lang.String POLICY_NAMESPACE
           
static java.lang.String POLICY_REF
           
 
Constructor Summary
PolicyEngine()
           
 
Method Summary
static Policy getPolicy(java.io.InputStream inputStream)
          Creates a Policy object from an InputStream.
static Policy getPolicy(org.apache.axiom.om.OMElement element)
          Creates a Policy object from an OMElement.
static PolicyReference getPolicyReference(org.apache.axiom.om.OMElement element)
          Creates a PolicyReference object from an OMElement.
static PolicyReference getPolicyReferene(java.io.InputStream inputStream)
          Creates a PolicyReference object.
static void registerBuilder(javax.xml.namespace.QName qname, AssertionBuilder builder)
          Registers an AssertionBuilder instances and associates it with a QName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLICY_NAMESPACE

public static final java.lang.String POLICY_NAMESPACE
See Also:
Constant Field Values

POLICY

public static final java.lang.String POLICY
See Also:
Constant Field Values

EXACTLY_ONE

public static final java.lang.String EXACTLY_ONE
See Also:
Constant Field Values

ALL

public static final java.lang.String ALL
See Also:
Constant Field Values

POLICY_REF

public static final java.lang.String POLICY_REF
See Also:
Constant Field Values
Constructor Detail

PolicyEngine

public PolicyEngine()
Method Detail

registerBuilder

public static void registerBuilder(javax.xml.namespace.QName qname,
                                   AssertionBuilder builder)
Registers an AssertionBuilder instances and associates it with a QName. PolicyManager or other AssertionBuilders instances can use this AssertionBuilder instance to process and build an Assertion from a OMElement with the specified QName.

Parameters:
qname - the QName of the Assertion that the Builder can build
builder - the AssertionBuilder that can build assertions that of 'qname' type

getPolicy

public static Policy getPolicy(java.io.InputStream inputStream)
Creates a Policy object from an InputStream.

Parameters:
inputStream - the InputStream of the Policy
Returns:
a Policy object of the Policy that is fed as a InputStream

getPolicyReferene

public static PolicyReference getPolicyReferene(java.io.InputStream inputStream)
Creates a PolicyReference object.

Parameters:
inputStream - the InputStream of the PolicyReference
Returns:
a PolicyReference object of the PolicyReference

getPolicy

public static Policy getPolicy(org.apache.axiom.om.OMElement element)
Creates a Policy object from an OMElement.

Parameters:
element - the Policy element

getPolicyReference

public static PolicyReference getPolicyReference(org.apache.axiom.om.OMElement element)
Creates a PolicyReference object from an OMElement.

Parameters:
element - the PolicyReference element
Returns:
a PolicyReference object of the PolicyReference element


Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.