|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.systinet.wasp.policy.PolicyElement
This class represents the base class for the WSO2 SOA Enablement Server policy framework.
A policy element defines a PolicyUsage
and preference.
It provides methods for reading readStandardAttributes(javax.xml.transform.dom.DOMSource)
and writing writeStandardAttributes(javax.xml.transform.dom.DOMSource)
of these attributes
from a DOMSource
.
Constructor Summary | |
protected |
PolicyElement()
This only sets the preference to 100 . |
Method Summary | |
abstract javax.xml.transform.Source |
getContent()
Gets the content of this object as Source |
PolicyElement |
getParentElement()
Gets the parent policy element of this element or null ,
if any parent if not specified. |
int |
getPreference()
Gets the preference of the policy element. |
PolicyUsage |
getUsage()
Gets the usage of the policy element. |
protected void |
readStandardAttributes(javax.xml.transform.dom.DOMSource domSource)
Reads the usage and preference from given XML source. |
void |
setParentElement(PolicyElement parentElement)
Sets the parent policy element of this element. |
void |
setPreference(int preference)
Sets the preference of the policy element. |
void |
setUsage(PolicyUsage usage)
Sets the usage of the policy element. |
protected void |
writeStandardAttributes(javax.xml.transform.dom.DOMSource domSource)
Writes the usage and preference to given XML source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected PolicyElement()
100
. Any subclass must call this to ensure that a policy element or
an assertion created at runtime has enough big preference to override a persistent policy assertions.
When the policy element is loaded from XML source, the preference is set to 0
if it's not present.
Method Detail |
public PolicyUsage getUsage()
PolicyUsage.OBSERVED
otherwise.
public void setUsage(PolicyUsage usage)
usage
- usage to setpublic int getPreference()
public void setPreference(int preference)
preference
- preference to setpublic PolicyElement getParentElement()
null
,
if any parent if not specified.
null
public void setParentElement(PolicyElement parentElement) throws PolicyException
PolicyCompositor
.
The parent can be set only once, that means there is no possible to
add one instance of a policy element to more than one compositor.
parentElement
- parent policy element
PolicyException
- when the parent element was already setprotected void readStandardAttributes(javax.xml.transform.dom.DOMSource domSource)
domSource
- source to readprotected void writeStandardAttributes(javax.xml.transform.dom.DOMSource domSource)
domSource
- source where the attributes will be writtenpublic abstract javax.xml.transform.Source getContent() throws PolicyException
Source
Source
PolicyException
- when an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |