Package com.sun.identity.saml.protocol
Class AttributeQuery
- java.lang.Object
-
- com.sun.identity.saml.protocol.Query
-
- com.sun.identity.saml.protocol.SubjectQuery
-
- com.sun.identity.saml.protocol.AttributeQuery
-
public class AttributeQuery extends SubjectQuery
This concrete class extends from the abstract base classSubjectQuery. It represents the query for an attribute assertion. It corresponds to thesamlp:AttributeQueryTypein the SAML protocol schema.
-
-
Field Summary
Fields Modifier and Type Field Description protected ListattributeDesignatorsO or more AttributeDesignator of this query.protected Stringresource-
Fields inherited from class com.sun.identity.saml.protocol.SubjectQuery
subject
-
Fields inherited from class com.sun.identity.saml.protocol.Query
ATTRIBUTE_QUERY, AUTHENTICATION_QUERY, AUTHORIZATION_DECISION_QUERY, NOT_SUPPORTED_QUERY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttributeQuery()Default constructorAttributeQuery(Subject theSubject)Constructor to construct anAttributeQuerywith 0AttributeDesignator, and no Resource attribute.AttributeQuery(Subject theSubject, List designators)Constructor to construct anAttributeQuerywith a list ofAttributeDesignators.AttributeQuery(Subject theSubject, List designators, String theResource)Constructor.AttributeQuery(Element element)This constructor is used to build an Attribute Query from a DOM tree that was built from the XML string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListgetAttributeDesignator()Returns theAttributeDesignators.intgetQueryType()Returns the type of the query.StringgetResource()Returns the Resource String.StringtoString()Returns the String Representation of theAttributeQueryobject.StringtoString(boolean includeNS, boolean declareNS)Returns a String representation of thesamlp:AttributeQueryelement.-
Methods inherited from class com.sun.identity.saml.protocol.SubjectQuery
getSubject
-
-
-
-
Constructor Detail
-
AttributeQuery
protected AttributeQuery()
Default constructor
-
AttributeQuery
public AttributeQuery(Element element) throws SAMLException
This constructor is used to build an Attribute Query from a DOM tree that was built from the XML string.- Parameters:
element- the DOM tree element which contains an Attribute Query.- Throws:
SAMLException
-
AttributeQuery
public AttributeQuery(Subject theSubject, List designators, String theResource) throws SAMLException
Constructor.- Parameters:
theSubject- Subject of this query.designators- List ofAttributeDesignatorsof this query.theResource- the Resource attribute of this query in String format.- Throws:
SAMLException
-
AttributeQuery
public AttributeQuery(Subject theSubject, List designators) throws SAMLException
Constructor to construct anAttributeQuerywith a list ofAttributeDesignators.- Parameters:
theSubject- Subject of this query.designators- List ofAttributeDesignatorsof this query.- Throws:
SAMLException
-
AttributeQuery
public AttributeQuery(Subject theSubject) throws SAMLException
Constructor to construct anAttributeQuerywith 0AttributeDesignator, and no Resource attribute.- Parameters:
theSubject- Subject of this query.- Throws:
SAMLException
-
-
Method Detail
-
getResource
public String getResource()
Returns the Resource String.- Returns:
- the Resource associated with this query in String format; or null if there is none.
-
getAttributeDesignator
public List getAttributeDesignator()
Returns theAttributeDesignators.- Returns:
- the
AttributeDesignators(s) associated with this query. It could contain 0 or moreAttributeDesignators.
-
getQueryType
public int getQueryType()
Returns the type of the query.- Specified by:
getQueryTypein classQuery- Returns:
- an integer which is Query.ATTRIBUTE_QUERY.
-
toString
public String toString()
Returns the String Representation of theAttributeQueryobject.
-
toString
public String toString(boolean includeNS, boolean declareNS)
Returns a String representation of thesamlp:AttributeQueryelement.- Specified by:
toStringin classQuery- 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.
-
-