Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


oracle.wsm.policy.model.impl
Class CompositeAssertion

java.lang.Object
  extended by oracle.wsm.policy.model.impl.SimpleAssertion
      extended by oracle.wsm.policy.model.impl.CompositeAssertion

All Implemented Interfaces:
Serializable, IAssertionAdvertiser, IAssertion, ICompositeAssertion, ISimpleAssertion, ISimpleOracleAssertion
Direct Known Subclasses:
AndCompositeAssertion, XorCompositeAssertion

public abstract class CompositeAssertion
extends SimpleAssertion
implements ICompositeAssertion

CompositeAssertion abstract class implements few method which are common to composite assertions. A composite assertion as some terms (if any) and implicit logic that whether all (or any) of its terms should be statisfied.

See Also:
Serialized Form

Nested Class Summary

 

Nested classes/interfaces inherited from interface oracle.wsm.policy.model.IAssertion
IAssertion.AssertionTypes

 

Field Summary

 

Fields inherited from interface oracle.wsm.policy.model.ISimpleAssertion
attachToAttrQName, categoryAttrQName, descAttrQName, enforcedAttrQName, NameAttrQName, optionalAttrQName, silentAttrQName, StageAttrQName, statusAttrQName

 

Constructor Summary
protected CompositeAssertion(QName qname)
           

 

Method Summary
 void addAssertion(IAssertion assertion)
          Adds an assertion as one of its terms
 void addAssertion(int index, IAssertion ia)
           
 void addAssertions(List<IAssertion> assertions)
          Adds set of assertions as its terms
 void advertiseOracleWSPolicy(AdvertisementContext context)
          Generate advertizable Oracle WS Policy with Oracle extensions
 void advertiseWSPolicy(AdvertisementContext context)
          Generate interoperable WS-Policy with no Oracle Extensions.
 void clearAssertions()
           
 boolean equals(Object obj)
          Compares the Assertionlist of two policies .It ignores the order of the Assertions.
 IAssertion getAssertion(int index)
           
 List<IAssertion> getAssertions()
           
 IAssertion[] getAssertionsArray()
           
 List<IAssertion> getAssertionsByQName(QName qname)
           
 String getDigest(List<String> namespaces, List<QName> qnames, boolean inclusionOrExclusionCriteria)
          Create a unique string representation that identifies this policy uniquely independent of the order of the assertions to enable a fast path intersection with another policy.
 int hashCode()
          Returns an integer value which is uniquely identifies an object of this class.
 IAssertion intersect(IAssertion assertion, IIntersectionContext context)
          Returns an assertion which is the equivalent of intersect of self and argument.
 boolean isEmpty()
          Returns true if no terms exist or false otherwise
 boolean isIdentical(Object obj)
          It is same as equals method except it emphasizes on the order, while equlas doesn't.
 boolean isOptional()
          Returns true if the Assertion is optional.
 IAssertion merge(IAssertion assertion)
          Returns the equivalent of merge of self and argument.
 IAssertion normalize()
          Normalizes the assertion and returns the normalized Assertion
 boolean removeAssertion(IAssertion assertion)
           
 void removeAssertion(int index)
           
 void removeAssertions(List<IAssertion> assertionsList)
           
 void setAssertions(List<IAssertion> assertions)
           
 void setNormalized(boolean value)
          WARNING: Do not call this method.
 void setOptional(boolean isOptional)
          Specifies if the Assertion is optional.
 int size()
           
 String toString()
          Returns the assertion list of a policy as a string
 void validate(IValidationContext context)
          Validate this assertion If any errors are found, they are added to the passed Validation Context object

 

Methods inherited from class oracle.wsm.policy.model.impl.SimpleAssertion
addAttribute, cloneAttrs, createInstance, createInstance, getAssertionType, getAttachTo, getAttribute, getAttributes, getBindings, getCategory, getCopyOfAssertion, getDescription, getDescription, getDigest, getDigestForAttrs, getGuard, getName, getParent, getQName, getStringForMatching, getStrValue, getUniquePathToAssertion, getWSPolicy15QName, getWSPolicy2006QName, hasBindings, hasGuard, hasParent, intersect, isEnforced, isIncludedInDigestCalculation, isNormalized, isSilent, merge, normalize, removeAttribute, removeAttrsForOracleWSPolicyAdvertisement, removeAttrsForWSPolicyAdvertisement, removeBindings, removeGuard, setAttachTo, setAttribute, setAttributes, setBindings, setCategory, setDefaultValues, setDescription, setEnforced, setGuard, setName, setParent, setSilent, setStrValue

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface oracle.wsm.policy.model.IAssertion
addAttribute, createInstance, getAssertionType, getAttribute, getAttributes, getDigest, getParent, getQName, getStringForMatching, hasParent, intersect, isNormalized, merge, normalize, removeAttribute, setAttributes, setParent

 

Constructor Detail

CompositeAssertion

protected CompositeAssertion(QName qname)

Method Detail

validate

public void validate(IValidationContext context)
Description copied from interface: IAssertion
Validate this assertion If any errors are found, they are added to the passed Validation Context object
Specified by:
validate in interface IAssertion
Overrides:
validate in class SimpleAssertion

addAssertion

public void addAssertion(IAssertion assertion)
Adds an assertion as one of its terms
Specified by:
addAssertion in interface ICompositeAssertion
Parameters:
assertion - the assertion that should be added as its term

addAssertions

public void addAssertions(List<IAssertion> assertions)
Adds set of assertions as its terms
Specified by:
addAssertions in interface ICompositeAssertion
Parameters:
assertions - the set of assertions that should be added as its terms

getAssertions

public List<IAssertion> getAssertions()
Specified by:
getAssertions in interface ICompositeAssertion

isEmpty

public boolean isEmpty()
Returns true if no terms exist or false otherwise
Specified by:
isEmpty in interface ICompositeAssertion
Returns:
true if no terms exist or false otherwise

removeAssertion

public boolean removeAssertion(IAssertion assertion)
Specified by:
removeAssertion in interface ICompositeAssertion

size

public int size()
Specified by:
size in interface ICompositeAssertion

normalize

public IAssertion normalize()
Description copied from interface: IAssertion
Normalizes the assertion and returns the normalized Assertion
Specified by:
normalize in interface IAssertion
Overrides:
normalize in class SimpleAssertion
Returns:

intersect

public IAssertion intersect(IAssertion assertion,
                            IIntersectionContext context)
                     throws UnsupportedOperationException
Description copied from interface: IAssertion
Returns an assertion which is the equivalent of intersect of self and argument. The rules to construct the equivalent assertion are specified in WS Policy 1.0 specification.
Specified by:
intersect in interface IAssertion
Overrides:
intersect in class SimpleAssertion
Parameters:
assertion - the assertion to intersect with
context - - The intersection context is passed to capture the running context of the intersection and to accumulate intersection failures
Returns:
the equivalent of intersect of self and the argument
Throws:
UnsupportedOperationException

merge

public IAssertion merge(IAssertion assertion)
                 throws UnsupportedOperationException
Description copied from interface: IAssertion
Returns the equivalent of merge of self and argument. The rules to construct the equivalent of merge are defined in WS Policy specification.
Specified by:
merge in interface IAssertion
Overrides:
merge in class SimpleAssertion
Parameters:
assertion - the argument to merge with
Returns:
the equivalent of the merge of self and argument
Throws:
UnsupportedOperationException

setNormalized

public void setNormalized(boolean value)
Description copied from interface: IAssertion
WARNING: Do not call this method. Instead call the various normalize() methods - which in turn use this method.
Specified by:
setNormalized in interface IAssertion
Overrides:
setNormalized in class SimpleAssertion

removeAssertions

public void removeAssertions(List<IAssertion> assertionsList)
Specified by:
removeAssertions in interface ICompositeAssertion

getAssertion

public IAssertion getAssertion(int index)
Specified by:
getAssertion in interface ICompositeAssertion

getAssertionsArray

public IAssertion[] getAssertionsArray()
Specified by:
getAssertionsArray in interface ICompositeAssertion

removeAssertion

public void removeAssertion(int index)

clearAssertions

public void clearAssertions()
Specified by:
clearAssertions in interface ICompositeAssertion

addAssertion

public void addAssertion(int index,
                         IAssertion ia)
Specified by:
addAssertion in interface ICompositeAssertion

getAssertionsByQName

public List<IAssertion> getAssertionsByQName(QName qname)
Specified by:
getAssertionsByQName in interface ICompositeAssertion

isOptional

public boolean isOptional()
Description copied from interface: IAssertion
Returns true if the Assertion is optional.
Specified by:
isOptional in interface IAssertion
Overrides:
isOptional in class SimpleAssertion

setOptional

public void setOptional(boolean isOptional)
Description copied from interface: IAssertion
Specifies if the Assertion is optional. Maps to the wsp:Optional attribute defined in WS-Policy.
Specified by:
setOptional in interface IAssertion
Overrides:
setOptional in class SimpleAssertion

setAssertions

public void setAssertions(List<IAssertion> assertions)
Specified by:
setAssertions in interface ICompositeAssertion

equals

public boolean equals(Object obj)
Compares the Assertionlist of two policies .It ignores the order of the Assertions.
Overrides:
equals in class SimpleAssertion

isIdentical

public boolean isIdentical(Object obj)
It is same as equals method except it emphasizes on the order, while equlas doesn't.
Specified by:
isIdentical in interface IAssertion
Overrides:
isIdentical in class SimpleAssertion

toString

public String toString()
Returns the assertion list of a policy as a string
Overrides:
toString in class SimpleAssertion

hashCode

public int hashCode()
Returns an integer value which is uniquely identifies an object of this class.
Overrides:
hashCode in class SimpleAssertion

advertiseOracleWSPolicy

public void advertiseOracleWSPolicy(AdvertisementContext context)
                             throws AdvertisementException
Generate advertizable Oracle WS Policy with Oracle extensions
Specified by:
advertiseOracleWSPolicy in interface IAssertionAdvertiser
Overrides:
advertiseOracleWSPolicy in class SimpleAssertion
Parameters:
context -
Throws:
AdvertisementException

advertiseWSPolicy

public void advertiseWSPolicy(AdvertisementContext context)
                       throws AdvertisementException
Generate interoperable WS-Policy with no Oracle Extensions.
Specified by:
advertiseWSPolicy in interface IAssertionAdvertiser
Overrides:
advertiseWSPolicy in class SimpleAssertion
Parameters:
config -
policyAttachment -
Throws:
AdvertisementException

getDigest

public String getDigest(List<String> namespaces,
                        List<QName> qnames,
                        boolean inclusionOrExclusionCriteria)
Create a unique string representation that identifies this policy uniquely independent of the order of the assertions to enable a fast path intersection with another policy. if inclusionOrExclusionCriteria is true then:
Only assertions that are either in the namespace in the namespace list or the assertion qname mentioned in the qnames list are included in digest calculation. Basically this projects out the assertions belonging to the namespace or qname if namespaces is empty and qnames is empty then it is equivalent to calling getDigest() if inclusionOrExclusionCriteria is false then:
The assertions that are in the namespace list or assertion qname are no included in the digest calculation.
Specified by:
getDigest in interface IAssertion
Overrides:
getDigest in class SimpleAssertion
Parameters:
namespaces - - list of strings that define the namespaces to be include or excluded in digest calculation
qnames - - list of qnames that define the qnames to be included or excluded in digest calculation
inclusionOrExclusionCriteria - - whether the list of namespaces or qnames should be included or excluded in the digest calculation

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


Copyright © 2007, 2009, Oracle and/or its affiliates. All rights reserved.