Class ResultImpl

  • All Implemented Interfaces:
    Result

    public class ResultImpl
    extends Object
    implements Result
    The Result element contains decision, status and obligations per resource id

    schema

      <xs:complexType name="ResultType">
          <xs:sequence>
              <xs:element ref="xacml-context:Decision"/>
              <xs:element ref="xacml-context:Status" minOccurs="0"/>
              <xs:element ref="xacml:Obligations" minOccurs="0"/>
          <xs:sequence>
          <xs:attribute name="ResourceId" type="xs:string" use="optional"/>
      <xs:complexType>
    
     
    • Constructor Detail

      • ResultImpl

        public ResultImpl​(String xml)
                   throws XACMLException
        Constructs a Result object from an XML string
        Parameters:
        xml - string representing a Result object
        Throws:
        SAMLException - if the XML string could not be processed
        XACMLException
      • ResultImpl

        public ResultImpl​(Element element)
                   throws XACMLException
        Constructs a Result object from an XML DOM element
        Parameters:
        element - XML DOM element representing a Result object
        Throws:
        SAMLException - if the DOM element could not be processed
        XACMLException
    • Method Detail

      • getResourceId

        public String getResourceId()
        Returns resourceId of this object
        Specified by:
        getResourceId in interface Result
        Returns:
        resourceId of this object
      • setResourceId

        public void setResourceId​(String resourceId)
                           throws XACMLException
        Sets resourceId of this object
        Specified by:
        setResourceId in interface Result
        Parameters:
        resourceId - resourceId of this object
        Throws:
        XACMLException - if the object is immutable
      • getDecision

        public Decision getDecision()
        Returns the Decision of this object
        Specified by:
        getDecision in interface Result
        Returns:
        the Decision of this object
      • getStatus

        public Status getStatus()
        Returns the Status of this object
        Specified by:
        getStatus in interface Result
        Returns:
        the Status of this object
      • getObligations

        public Obligations getObligations()
        Returns the Obligations of this object
        Specified by:
        getObligations in interface Result
        Returns:
        the Obligations of this object
      • toXMLString

        public String toXMLString()
                           throws XACMLException
        Returns a string representation of this object
        Specified by:
        toXMLString in interface Result
        Returns:
        a string representation of this object
        Throws:
        XACMLException - if conversion fails for any reason
      • toXMLString

        public String toXMLString​(boolean includeNSPrefix,
                                  boolean declareNS)
                           throws XACMLException
        Returns a string representation of this object
        Specified by:
        toXMLString in interface Result
        Parameters:
        includeNSPrefix - Determines whether or not the namespace qualifier is prepended to the Element when converted
        declareNS - Determines whether or not the namespace is declared within the Element.
        Returns:
        a string representation of this object
        Throws:
        XACMLException - if conversion fails for any reason
      • isMutable

        public boolean isMutable()
        Checks if the object is mutable
        Specified by:
        isMutable in interface Result
        Returns:
        true if the object is mutable, false otherwise
      • makeImmutable

        public void makeImmutable()
        Makes the object immutable
        Specified by:
        makeImmutable in interface Result