public class Policy extends All
| Modifier and Type | Class and Description |
|---|---|
private class |
Policy.PolicyIterator |
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<javax.xml.namespace.QName,java.lang.String> |
attributes |
private java.lang.String |
namespace |
private PolicyRegistry |
registry |
policyComponents| Constructor and Description |
|---|
Policy() |
Policy(PolicyOperator parent) |
Policy(PolicyRegistry r) |
Policy(PolicyRegistry r,
java.lang.String ns) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(javax.xml.namespace.QName name,
java.lang.String value)
Adds an attribute to self.
|
java.util.Iterator<java.util.List<Assertion>> |
getAlternatives()
Returns an Iterator that will return a list of assertions correspond to a
Policy alternative if any.
|
java.util.Iterator<java.util.List<Assertion>> |
getAlternatives(PolicyRegistry reg) |
java.lang.String |
getAttribute(javax.xml.namespace.QName name)
Returns the value of the attribute specified by the QName.
|
java.util.Map<javax.xml.namespace.QName,java.lang.String> |
getAttributes()
Returns a Map of all attributes of self.
|
java.lang.String |
getId()
Returns the Id attribute of self.
|
java.lang.String |
getName()
Returns the Name attribute of self.
|
java.lang.String |
getNamespace() |
PolicyRegistry |
getPolicyRegistry() |
short |
getType()
Returns Constants.TYPE_POLICY
|
Policy |
intersect(Policy policy) |
Policy |
intersect(Policy policy,
boolean strict) |
Policy |
merge(Policy policy)
Returns a Policy that is the merge of specified Policy and self.
|
Policy |
normalize(boolean deep)
Returns a Normalized version of self.
|
Policy |
normalize(PolicyRegistry reg,
boolean deep)
Returns a normalized version of self.If deep is set
false then the assertions are not normalized and it returns a
partially normalized version of self.
|
void |
serialize(javax.xml.stream.XMLStreamWriter writer)
Serializes the Policy to a XMLStreamWriter.
|
void |
setId(java.lang.String id)
Sets the wsu:Id attribute of self.
|
void |
setName(java.lang.String name)
Sets the Name attribute of self.
|
void |
setPolicyRegistry(PolicyRegistry reg) |
addAssertion, getAssertionsaddPolicyComponent, addPolicyComponents, equal, getFirstPolicyComponent, getPolicyComponents, isEmpty, normalizeprivate java.util.Map<javax.xml.namespace.QName,java.lang.String> attributes
private java.lang.String namespace
private PolicyRegistry registry
public Policy()
public Policy(PolicyRegistry r)
public Policy(PolicyRegistry r, java.lang.String ns)
public Policy(PolicyOperator parent)
public PolicyRegistry getPolicyRegistry()
public void setPolicyRegistry(PolicyRegistry reg)
public java.lang.String getNamespace()
public Policy normalize(boolean deep)
deep - a flag to indicate whether to normalize the assertionspublic Policy normalize(PolicyRegistry reg, boolean deep)
reg - a PolicyRegistry from which the PolicyReferences are resolveddeep - a flag to indicate whether to normalize the assertionspublic Policy merge(Policy policy)
policy - the Policy to be merged with selfpublic void serialize(javax.xml.stream.XMLStreamWriter writer)
throws javax.xml.stream.XMLStreamException
serialize in interface PolicyComponentserialize in class Allwriter - the writer that the component should write itselfjavax.xml.stream.XMLStreamException - if an errors in the process of serialization of the
PolicyComponent.public short getType()
getType in interface PolicyComponentgetType in class Allpublic java.util.Iterator<java.util.List<Assertion>> getAlternatives()
public java.util.Iterator<java.util.List<Assertion>> getAlternatives(PolicyRegistry reg)
public void addAttribute(javax.xml.namespace.QName name,
java.lang.String value)
name - the name of the attributevalue - the value of the attributepublic java.lang.String getAttribute(javax.xml.namespace.QName name)
name - the QName of the attributepublic java.util.Map<javax.xml.namespace.QName,java.lang.String> getAttributes()
public void setName(java.lang.String name)
name - the Name attribute of selfpublic java.lang.String getName()
public void setId(java.lang.String id)
id - the Id attribute of selfpublic java.lang.String getId()