Class ResponseImpl

  • All Implemented Interfaces:
    Response

    public class ResponseImpl
    extends Object
    implements Response
    The Response element is a container of one or more Results issuded by authorization authority.

    schema:

          <xs:complexType name="ResponseType">
              <xs:sequence>
                  <xs:element ref="xacml-context:Result" 
                          maxOccurs="unbounded"/>
              <xs:sequence>
          <xs:complexType>
     
    • Constructor Detail

      • ResponseImpl

        public ResponseImpl()
        Constructs a Response object
      • ResponseImpl

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

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

      • getResults

        public List getResults()
        Returns the Results of this object
        Specified by:
        getResults in interface Response
        Returns:
        the Results of this object
      • setResults

        public void setResults​(List values)
                        throws XACMLException
        Sets the Results of this object
        Specified by:
        setResults in interface Response
        Parameters:
        values - the Results of this object.
        Throws:
        XACMLException - if the object is immutable.
      • toXMLString

        public String toXMLString()
                           throws XACMLException
        Returns a string representation of this object
        Specified by:
        toXMLString in interface Response
        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 Response
        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 Response
        Returns:
        true if the object is mutable, false otherwise
      • makeImmutable

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