public class Policy extends All
policyComponents| Constructor and Description |
|---|
Policy() |
Policy(PolicyOperator parent) |
Policy(PolicyRegistry r) |
Policy(PolicyRegistry r,
String ns) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(QName name,
String value)
Adds an attribute to self.
|
Iterator<List<Assertion>> |
getAlternatives()
Returns an Iterator that will return a list of assertions correspond to a
Policy alternative if any.
|
Iterator<List<Assertion>> |
getAlternatives(PolicyRegistry reg) |
String |
getAttribute(QName name)
Returns the value of the attribute specified by the QName.
|
Map<QName,String> |
getAttributes()
Returns a
Map of all attributes of self. |
String |
getId()
Returns the Id attribute of self.
|
String |
getName()
Returns the
Name attribute of self. |
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(XMLStreamWriter writer)
Serializes the Policy to a XMLStreamWriter.
|
void |
setId(String id)
Sets the wsu:Id attribute of self.
|
void |
setName(String name)
Sets the
Name attribute of self. |
void |
setPolicyRegistry(PolicyRegistry reg) |
addAssertion, getAssertionsaddPolicyComponent, addPolicyComponents, equal, getFirstPolicyComponent, getPolicyComponents, isEmpty, normalizepublic Policy()
public Policy(PolicyRegistry r)
public Policy(PolicyRegistry r, String ns)
public Policy(PolicyOperator parent)
public PolicyRegistry getPolicyRegistry()
public void setPolicyRegistry(PolicyRegistry reg)
public String getNamespace()
public Policy normalize(boolean deep)
deep is set
false then the assertions are not normalized and it returns a
partially normalized version of self.deep - a flag to indicate whether to normalize the assertionspublic Policy normalize(PolicyRegistry reg, boolean deep)
deep is set
false then the assertions are not normalized and it returns a
partially normalized version of self.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(XMLStreamWriter writer) throws XMLStreamException
serialize in interface PolicyComponentserialize in class Allwriter - the writer that the component should write itselfXMLStreamException - if an errors in the process of serialization of the
PolicyComponent.public short getType()
getType in interface PolicyComponentgetType in class Allpublic Iterator<List<Assertion>> getAlternatives()
iterator.next() will return a
list of assertions correspond to a Policy alternative if any and
iterator.hasNext() will indicates whether there is another
Policy alternative.public Iterator<List<Assertion>> getAlternatives(PolicyRegistry reg)
public void addAttribute(QName name, String value)
name - the name of the attributevalue - the value of the attributepublic String getAttribute(QName name)
null if not present.name - the QName of the attributepublic Map<QName,String> getAttributes()
Map of all attributes of self.public void setName(String name)
Name attribute of self.name - the Name attribute of selfpublic String getName()
Name attribute of self.public void setId(String id)
id - the Id attribute of selfpublic String getId()
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.