org.apache.neethi
Class PolicyEngine

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

public class PolicyEngine
extends Object

PolicyEngine provides set of static methods to create a Policy object from an InputStream, OMElement, .. etc. It wrappers a static PolicyBuilder to actually do the building. This class is provided to ease transition from Neethi 2.x to Neethi 3.x


Field Summary
static String ALL
           
static String EXACTLY_ONE
           
static String POLICY
           
static String POLICY_NAMESPACE
           
static String POLICY_REF
           
 
Constructor Summary
PolicyEngine()
           
 
Method Summary
static Policy getPolicy(InputStream inputStream)
          Creates a Policy object from an InputStream.
static Policy getPolicy(Object element)
          Creates a Policy object from an Element.
static Policy getPolicy(org.apache.axiom.om.OMElement element)
          Creates a Policy object from an OMElement.
static PolicyReference getPolicyReference(Object element)
          Creates a PolicyReference object from an Element.
static PolicyReference getPolicyReference(org.apache.axiom.om.OMElement element)
          Creates a PolicyReference object from an OMElement.
static PolicyReference getPolicyReferene(InputStream inputStream)
          Creates a PolicyReference object.
static void registerBuilder(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 String POLICY_NAMESPACE
See Also:
Constant Field Values

POLICY

public static final String POLICY
See Also:
Constant Field Values

EXACTLY_ONE

public static final String EXACTLY_ONE
See Also:
Constant Field Values

ALL

public static final String ALL
See Also:
Constant Field Values

POLICY_REF

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

PolicyEngine

public PolicyEngine()
Method Detail

registerBuilder

public static void registerBuilder(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(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(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

getPolicy

public static Policy getPolicy(Object element)
Creates a Policy object from an Element.

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

getPolicyReference

public static PolicyReference getPolicyReference(Object element)
Creates a PolicyReference object from an Element.

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


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