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 NestedAssertion

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

All Implemented Interfaces:
Serializable, IAssertionAdvertiser, IAssertion, INestedAssertion, ISimpleAssertion, ISimpleOracleAssertion
Direct Known Subclasses:
AlgorithmSuiteAssertion, BindingAssertion, EncryptionTokenAssertion, InitiatorTokenAssertion, LayoutAssertion, MultiElementNestedAssertion, ProtectionTokenAssertion, RecipientTokenAssertion, SignatureTokenAssertion, SupportingTokenAssertion, TokenAssertion, TransportTokenAssertion, Wss10Assertion

public class NestedAssertion
extends SimpleAssertion
implements INestedAssertion

NestedAssertion wraps an assertion which is indivisible. Such assertion require domain specific knowledge for further processing. Hence this class seperates that domain specific knowledge from generic framework.

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 NestedAssertion()
           
  NestedAssertion(QName qname)
           
  NestedAssertion(QName qname, Object value)
           
  NestedAssertion(QName qname, String advertVersion)
           

 

Method Summary
 void addAssertion(IAssertion ia)
          Helper method same as doing getPolicy().addAssertion(ia)
 void addAssertions(List<IAssertion> assertionsList)
          Helper method same as doing getPolicy().addAssertions(assertionsList)
 void advertiseOracleWSPolicy(AdvertisementContext context)
          Generate advertizable Oracle WS Policy with Oracle extensions
 void advertiseWSPolicy(AdvertisementContext context)
          Generate interoperable WS-Policy with no Oracle Extensions.
protected  void checkAndAddAssertion(IAssertion assertionToAdd)
           
protected  void checkAndSetAssertion(IAssertion assertionToSet)
           
 IAssertion createInstance(QName qname)
          Creates the appropriate assertion instance NOTE: The base implementation must be overriden by the subclasses!
 IAssertion createInstance(QName qname, boolean setExtensions)
           
 boolean equals(Object obj)
          Compares the Assertionlist of two policies .It ignores the order of the Assertions.
 List<IAssertion> getAssertions()
          Helper method - same as doing getPolicy().getAssertions()
 List<IAssertion> getAssertionsByQName(QName qname)
          Helper method - same as doing getPolicy().getAssertionsByQName()
 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.
 IPolicy getPolicy()
          A NestedAssertion always contains a 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.
 IAssertion intersect(IAssertion assertion, IPolicyRegistry reg, IIntersectionContext context)
          Returns an assertion which is equivalent of intersect of self and argument.
 boolean isIdentical(Object obj)
          It is same as equals method except it emphasizes on the order, while equlas doesn't.
 IAssertion merge(IAssertion assertion)
          Returns the equivalent of merge of self and argument.
 IAssertion merge(IAssertion assertion, IPolicyRegistry reg)
          Returns the equivalent of merge of self and argument.
 IAssertion normalize()
          Normalizes the assertion and returns the normalized Assertion
 IAssertion normalize(IPolicyRegistry reg)
           
protected  void setAssertions(List<IAssertion> assertions)
           
 void setNormalized(boolean flag)
          WARNING: Do not call this method.
 void setPolicy(IPolicy policy)
          Set the nested Policy expression!
 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, getAssertionType, getAttachTo, getAttribute, getAttributes, getBindings, getCategory, getCopyOfAssertion, getDescription, getDescription, getDigest, getDigestForAttrs, getGuard, getName, getParent, getQName, getStringForMatching, getStrValue, getUniquePathToAssertion, getWSPolicy15QName, getWSPolicy2006QName, hasBindings, hasGuard, hasParent, isEnforced, isIncludedInDigestCalculation, isNormalized, isOptional, isSilent, removeAttribute, removeAttrsForOracleWSPolicyAdvertisement, removeAttrsForWSPolicyAdvertisement, removeBindings, removeGuard, setAttachTo, setAttribute, setAttributes, setBindings, setCategory, setDefaultValues, setDescription, setEnforced, setGuard, setName, setOptional, 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, getAssertionType, getAttribute, getAttributes, getDigest, getParent, getQName, getStringForMatching, hasParent, isNormalized, isOptional, removeAttribute, setAttributes, setOptional, setParent

 

Methods inherited from interface oracle.wsm.policy.model.ISimpleOracleAssertion
getAttachTo, getBindings, getCategory, getDescription, getDescription, getGuard, getName, hasBindings, hasGuard, isEnforced, isSilent, removeBindings, removeGuard, setAttachTo, setBindings, setCategory, setDescription, setEnforced, setGuard, setName, setSilent

 

Constructor Detail

NestedAssertion

protected NestedAssertion()

NestedAssertion

public NestedAssertion(QName qname)

NestedAssertion

public NestedAssertion(QName qname,
                       String advertVersion)

NestedAssertion

public NestedAssertion(QName qname,
                       Object value)

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

intersect

public IAssertion intersect(IAssertion assertion,
                            IPolicyRegistry reg,
                            IIntersectionContext context)
Description copied from interface: IAssertion
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 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 intersection of self and argument

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,
                        IPolicyRegistry reg)
Description copied from interface: IAssertion
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 IAssertion
Overrides:
merge in class SimpleAssertion
Parameters:
assertion - the assertion to merge with
reg - the policy registry that should be used to resolve external policy references
Returns:
the equivalent of merge of self and argument

merge

public IAssertion merge(IAssertion assertion)
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

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:

normalize

public IAssertion normalize(IPolicyRegistry reg)
Specified by:
normalize in interface IAssertion
Overrides:
normalize in class SimpleAssertion
Returns:

setNormalized

public void setNormalized(boolean flag)
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

checkAndAddAssertion

protected void checkAndAddAssertion(IAssertion assertionToAdd)

checkAndSetAssertion

protected void checkAndSetAssertion(IAssertion assertionToSet)

getAssertionsByQName

public List<IAssertion> getAssertionsByQName(QName qname)
Description copied from interface: INestedAssertion
Helper method - same as doing getPolicy().getAssertionsByQName()
Specified by:
getAssertionsByQName in interface INestedAssertion
Returns:

getPolicy

public IPolicy getPolicy()
Description copied from interface: INestedAssertion
A NestedAssertion always contains a Policy. The Policy may be empty
Specified by:
getPolicy in interface INestedAssertion
Returns:

setPolicy

public void setPolicy(IPolicy policy)
Description copied from interface: INestedAssertion
Set the nested Policy expression!
Specified by:
setPolicy in interface INestedAssertion

getAssertions

public List<IAssertion> getAssertions()
Description copied from interface: INestedAssertion
Helper method - same as doing getPolicy().getAssertions()
Specified by:
getAssertions in interface INestedAssertion
Returns:

setAssertions

protected void setAssertions(List<IAssertion> assertions)

addAssertion

public void addAssertion(IAssertion ia)
Description copied from interface: INestedAssertion
Helper method same as doing getPolicy().addAssertion(ia)
Specified by:
addAssertion in interface INestedAssertion

addAssertions

public void addAssertions(List<IAssertion> assertionsList)
Description copied from interface: INestedAssertion
Helper method same as doing getPolicy().addAssertions(assertionsList)
Specified by:
addAssertions in interface INestedAssertion

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

createInstance

public IAssertion createInstance(QName qname)
Description copied from interface: IAssertion
Creates the appropriate assertion instance NOTE: The base implementation must be overriden by the subclasses!
Specified by:
createInstance in interface IAssertion
Overrides:
createInstance in class SimpleAssertion
Returns:

createInstance

public IAssertion createInstance(QName qname,
                                 boolean setExtensions)
Overrides:
createInstance in class SimpleAssertion

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.