Class AuthorizationDecisionQuery


  • public class AuthorizationDecisionQuery
    extends SubjectQuery
    This concrete class extends from the abstract base class SubjectQuery. It represents the query for an authorization decision assertion. It corresponds to the <samlp:AuthorizationDecisionQueryType> in the SAML protocol schema.
    • Field Detail

      • resource

        protected String resource
      • actions

        protected List actions
    • Constructor Detail

      • AuthorizationDecisionQuery

        protected AuthorizationDecisionQuery()
        Default Constructor
      • AuthorizationDecisionQuery

        public AuthorizationDecisionQuery​(Element element)
                                   throws SAMLException
        This constructor is used to build an Authorization Decision Query from a DOM tree that was built from the XML string.
        Parameters:
        element - the DOM tree element which contains an Authorization Decision Query.
        Throws:
        SAMLException - when an error occurs.
      • AuthorizationDecisionQuery

        public AuthorizationDecisionQuery​(Subject theSubject,
                                          List theActions,
                                          Evidence theEvidence,
                                          String theResource)
                                   throws SAMLException
        Constructor
        Parameters:
        theSubject - The subject of the query.
        theActions - The List of Actions of the query.
        theEvidence - The evidence of the query. It could be null when there is no Evidence in the query.
        theResource - A string representing the resource of the query.
        Throws:
        SAMLException - when an error occurs.
      • AuthorizationDecisionQuery

        public AuthorizationDecisionQuery​(Subject theSubject,
                                          List theActions,
                                          String theResource)
                                   throws SAMLException
        Constructor
        Parameters:
        theSubject - The subject of the query.
        theActions - The List of Actions of the query.
        theResource - A string representing the resource of the query.
        Throws:
        SAMLException - when an error occurs.
    • Method Detail

      • getAction

        public List getAction()
        Returns the List of Actions.
        Returns:
        The Actions included in the query.
      • getEvidence

        public Evidence getEvidence()
        Returns the Evidence
        Returns:
        the Evidence in the query. A null is returned if there is no Evidence in the query.
      • getResource

        public String getResource()
        Accessor for the Resource
        Returns:
        A string representing the resource.
      • getQueryType

        public int getQueryType()
        Returns the type of the query.
        Specified by:
        getQueryType in class Query
        Returns:
        an integer which is Query.AUTHORIZATION_DECISION_QUERY.
      • toString

        public String toString()
        This method translates the AuthorizationDecisionQuery to an XML document String based on the AuthorizationDecisionQuery schema.
        Overrides:
        toString in class Object
        Returns:
        An XML String representing the AuthorizationDecisionQuery.
      • toString

        public String toString​(boolean includeNS,
                               boolean declareNS)
        Create a String representation of the samlp:AuthorizationDecisionQuery element.
        Specified by:
        toString in class Query
        Parameters:
        includeNS - 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 containing the valid XML for this element