org.apache.ws.policy
Class XorCompositeAssertion
java.lang.Object
org.apache.ws.policy.AbstractAssertion
org.apache.ws.policy.XorCompositeAssertion
- All Implemented Interfaces:
- Assertion, CompositeAssertion
- public class XorCompositeAssertion
- extends AbstractAssertion
- implements CompositeAssertion
XorCompositeAssertion requires that exactly one of its terms are met.
Sanka Samaranayake (sanka@apache.org)
Methods inherited from class org.apache.ws.policy.AbstractAssertion |
addTerms, getLineNo, getParent, getSource, getTerms, hasParent, intersect, isEmpty, isNormalized, merge, normalize, remove, setLineNo, setNormalized, setParent, setSource, size |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.ws.policy.Assertion |
addTerms, getLineNo, getParent, getSource, getTerms, hasParent, intersect, isEmpty, isNormalized, merge, normalize, remove, setLineNo, setNormalized, setParent, setSource, size |
XorCompositeAssertion
public XorCompositeAssertion()
addTerm
public void addTerm(Assertion assertion)
- Description copied from interface:
Assertion
- Adds an assertion as a term of this assertion.
- Specified by:
addTerm
in interface Assertion
- Overrides:
addTerm
in class AbstractAssertion
- Parameters:
assertion
- the term to add
normalize
public Assertion normalize(PolicyRegistry reg)
- Description copied from interface:
Assertion
- Returns a new assertion which is the normalized form of this assertion.
- Specified by:
normalize
in interface Assertion
- Parameters:
reg
- the registry which is used to resolve any policy references in
the process of normalization.
- Returns:
intersect
public Assertion intersect(Assertion assertion,
PolicyRegistry reg)
- Description copied from interface:
Assertion
- Returns an assertion which is equivalent of intersect of self and
argument. Here the external policy are resolved via a policy registry
that is supplied as an argument.
- Specified by:
intersect
in interface Assertion
- Parameters:
assertion
- the assertion to intersect with
- Returns:
- the equivalent of intersection of self and argument
merge
public Assertion merge(Assertion assertion,
PolicyRegistry reg)
- Description copied from interface:
Assertion
- Returns the equivalent of merge of self and argument. The rules to
construct argument are specified in WS Policy specification 1.0 Here the
external policy references are resolved via a policy registry that is
supplied as an argument
- Specified by:
merge
in interface Assertion
- Parameters:
assertion
- the assertion to merge withreg
- the policy registry that should be used to resolve external
policy references
- Returns:
- the equivalent of merge of self and argument
getType
public final short getType()
- Description copied from interface:
Assertion
- Returns a short type which describes the type of the assertion.
- Specified by:
getType
in interface Assertion
- Returns:
- a short value of one of following values:
PRIMITIVE_TYPE : if the assertion is a PrimitiveAssertion
COMPOSITE_AND_TYPE : if the assertion is a AndCompositeAssertion
COMPOSITE_XOR_TYPE : if the assertion is a XorCompositeAssertion
COMPOSITE_POLICY_TYPE : if the assertion is a Policy
POLICY_REFERENCE_TYPE : if the assertion is a PolicyReferece
Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.