Class PolicyAssertion

    • Constructor Detail

      • PolicyAssertion

        protected PolicyAssertion()
      • PolicyAssertion

        @Deprecated
        protected PolicyAssertion​(AssertionData assertionData,
                                  Collection<? extends PolicyAssertion> assertionParameters,
                                  AssertionSet nestedAlternative)
        Deprecated.
        Non-abstract assertion types should derive from SimpleAssertion or ComplexAssertion instead. Policy class will not provide support for nested policy alternatives in the future. This responsibility is delegated to ComplexAssertion class instead.
        Creates generic assertionand stores the data specified in input parameters
        Parameters:
        assertionData - assertion creation data specifying the details of newly created assertion. May be null.
        assertionParameters - collection of assertions parameters of this policy assertion. May be null.
        nestedAlternative - assertion set specifying nested policy alternative. May be null.
      • PolicyAssertion

        protected PolicyAssertion​(AssertionData assertionData,
                                  Collection<? extends PolicyAssertion> assertionParameters)
        Creates generic assertionand stores the data specified in input parameters
        Parameters:
        assertionData - assertion creation data specifying the details of newly created assertion
        assertionParameters - collection of assertions parameters of this policy assertion. May be null.
    • Method Detail

      • getName

        public final QName getName()
        Returns the fully qualified name of the assertion.
        Returns:
        assertion's fully qualified name.
      • getValue

        public final String getValue()
        Returns the value of the assertion - the character data content contained in the assertion element representation.
        Returns:
        assertion's value. May return null if there is no value set for the assertion.
      • isOptional

        public boolean isOptional()
        Method specifies whether the assertion is otpional or not.
        This is a default implementation that may be overriden. The method returns true if the wsp:optional attribute is present on the assertion and its value is 'true'. Otherwise the method returns false.
        Returns:
        'true' if the assertion is optional. Returns false otherwise.
      • isIgnorable

        public boolean isIgnorable()
        Method specifies whether the assertion is ignorable or not.
        This is a default implementation that may be overriden. The method returns true if the wsp:Ignorable attribute is present on the assertion and its value is 'true'. Otherwise the method returns false.
        Returns:
        'true' if the assertion is ignorable. Returns false otherwise.
      • isPrivate

        public final boolean isPrivate()
        Method specifies whether the assertion is private or not. This is specified by our proprietary visibility element.
        Returns:
        'true' if the assertion is marked as private (i.e. should not be marshalled int generated WSDL documents). Returns false otherwise.
      • getAttributesSet

        public final Set<Map.Entry<QName,​String>> getAttributesSet()
        Returns the disconnected set of attributes attached to the assertion. Each attribute is represented as a single Map.Entry<attributeName, attributeValue> element.
        'Disconnected' means, that the result of this method will not be synchronized with any consequent assertion's attribute modification. It is also important to notice that a manipulation with returned set of attributes will not have any effect on the actual assertion's attributes.
        Returns:
        disconected set of attributes attached to the assertion.
      • getAttributes

        public final Map<QName,​String> getAttributes()
        Returns the disconnected map of attributes attached to the assertion.
        'Disconnected' means, that the result of this method will not be synchronized with any consequent assertion's attribute modification. It is also important to notice that a manipulation with returned set of attributes will not have any effect on the actual assertion's attributes.
        Returns:
        disconnected map of attributes attached to the assertion.
      • getAttributeValue

        public final String getAttributeValue​(QName name)
        Returns the value of an attribute. Returns null if an attribute with the given name does not exist.
        Parameters:
        name - The fully qualified name of the attribute
        Returns:
        The value of the attribute. Returns null if there is no such attribute or if it's value is null.
      • hasNestedAssertions

        @Deprecated
        public final boolean hasNestedAssertions()
        Deprecated.
        Use hasParameters() instead
        Returns the boolean information whether this assertion contains any parameters.
        Returns:
        true if the assertion contains parameters. Returns false otherwise.
      • hasParameters

        public final boolean hasParameters()
        Returns the boolean information whether this assertion contains any parameters.
        Returns:
        true if the assertion contains parameters. Returns false otherwise.
      • getNestedAssertionsIterator

        @Deprecated
        public final Iterator<PolicyAssertion> getNestedAssertionsIterator()
        Deprecated.
        Use getNestedParametersIterator() instead
        Returns the assertion's parameter collection iterator.
        Returns:
        the assertion's parameter collection iterator.
      • getParametersIterator

        public final Iterator<PolicyAssertion> getParametersIterator()
        Returns the assertion's parameter collection iterator.
        Returns:
        the assertion's parameter collection iterator.
      • hasNestedPolicy

        public boolean hasNestedPolicy()
        Returns the boolean information whether this assertion contains nested policy.
        Returns:
        true if the assertion contains child (nested) policy. Returns false otherwise.
      • getNestedPolicy

        public NestedPolicy getNestedPolicy()
        Returns the nested policy if any.
        Returns:
        the nested policy if the assertion contains a nested policy. Returns null otherwise.
      • getImplementation

        public <T extends PolicyAssertion> T getImplementation​(Class<T> type)
        Casts the assertion to the implementation type. Returns null if that is not possible.
        Type Parameters:
        T - The implementation type of the assertion.
        Parameters:
        type - The implementation type of the assertion. May not be null.
        Returns:
        The instance of the implementation type. Null otherwise.
      • toString

        public String toString()
        An Object.toString() method override.
        Overrides:
        toString in class Object
      • toString

        protected StringBuffer toString​(int indentLevel,
                                        StringBuffer buffer)
        A helper method that appends indented string representation of this instance to the input string buffer.
        Parameters:
        indentLevel - indentation level to be used.
        buffer - buffer to be used for appending string representation of this instance
        Returns:
        modified buffer containing new string representation of the instance
      • equals

        public boolean equals​(Object obj)
        An Object.equals(Object obj) method override.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        An Object.hashCode() method override.
        Overrides:
        hashCode in class Object