public abstract class PolicyModelGenerator extends Object
| Modifier and Type | Class | Description |
|---|---|---|
protected static class |
PolicyModelGenerator.PolicySourceModelCreator |
Allows derived classes to pass their own implementation of PolicySourceModelCreator
into the PolicyModelGenerator instance.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
PolicyModelGenerator() |
This protected constructor avoids direct instantiation from outside of the class
|
| Modifier and Type | Method | Description |
|---|---|---|
protected static PolicyModelGenerator |
getCompactGenerator(PolicyModelGenerator.PolicySourceModelCreator creator) |
Allows derived classes to create instances of the package private
CompactModelGenerator.
|
static PolicyModelGenerator |
getGenerator() |
Factory method that returns a
PolicyModelGenerator instance. |
protected static PolicyModelGenerator |
getNormalizedGenerator(PolicyModelGenerator.PolicySourceModelCreator creator) |
Allows derived classes to create instances of the package private
NormalizedModelGenerator.
|
abstract PolicySourceModel |
translate(Policy policy) |
This method translates a
Policy into a
policy infoset. |
protected void |
translate(ModelNode node,
AssertionSet assertions) |
Add the contents of the assertion set as child node to the given model node.
|
protected abstract ModelNode |
translate(ModelNode parentAssertion,
NestedPolicy policy) |
Iterates through a nested policy and returns the corresponding policy info model.
|
protected void |
translate(ModelNode assertionNode,
Iterator<PolicyAssertion> assertionParametersIterator) |
Iterates through all contained assertions and adds them to the info model.
|
protected PolicyModelGenerator()
public static PolicyModelGenerator getGenerator()
PolicyModelGenerator instance.PolicyModelGenerator instanceprotected static PolicyModelGenerator getCompactGenerator(PolicyModelGenerator.PolicySourceModelCreator creator)
creator - An implementation of the PolicySourceModelCreator.protected static PolicyModelGenerator getNormalizedGenerator(PolicyModelGenerator.PolicySourceModelCreator creator)
creator - An implementation of the PolicySourceModelCreator.public abstract PolicySourceModel translate(Policy policy) throws PolicyException
Policy into a
policy infoset. The resulting
PolicySourceModel is disconnected from the input policy, thus any
additional changes in the policy will have no effect on the PolicySourceModel.policy - The policy to be translated into an infoset. May be null.PolicyException - in case Policy translation fails.protected abstract ModelNode translate(ModelNode parentAssertion, NestedPolicy policy)
parentAssertion - The parent node.policy - The nested policy.protected void translate(ModelNode node, AssertionSet assertions)
node - The content of this assertion set are added as child nodes to this node.
May not be null.assertions - The assertions that are to be added to the node. May not be null.protected void translate(ModelNode assertionNode, Iterator<PolicyAssertion> assertionParametersIterator)
assertionParametersIterator - The contained assertions.assertionNode - The node to which the assertions are added as child nodesCopyright © 2006–2018 Oracle Corporation. All rights reserved.