public class AttributeDesignator extends AbstractDesignator
Modifier and Type | Field and Description |
---|---|
static int |
ACTION_TARGET
Tells designator to search in the action section of the request
|
static int |
ENVIRONMENT_TARGET
Tells designator to search in the environment section of the request
|
static int |
RESOURCE_TARGET
Tells designator to search in the resource section of the request
|
static String |
SUBJECT_CATEGORY_DEFAULT
The standard URI for the default subject category value
|
static int |
SUBJECT_TARGET
Tells designator to search in the subject section of the request
|
Constructor and Description |
---|
AttributeDesignator(int target,
URI type,
URI id,
boolean mustBePresent)
Creates a new
AttributeDesignator without the optional issuer. |
AttributeDesignator(int target,
URI type,
URI id,
boolean mustBePresent,
String issuer)
Creates a new
AttributeDesignator with the optional issuer. |
AttributeDesignator(int target,
URI type,
URI id,
boolean mustBePresent,
String issuer,
URI category)
Creates a new
AttributeDesignator with the optional issuer. |
Modifier and Type | Method and Description |
---|---|
void |
encode(StringBuilder builder)
Encodes this
AttributeDesignator into its XML form and writes this out to the provided
StringBuilder |
EvaluationResult |
evaluate(EvaluationCtx evaluationCtx)
Evaluates the pre-assigned meta-data against the given context, trying to find some matching
values.
|
boolean |
evaluatesToBag()
Deprecated.
As of 2.0, you should use the
returnsBag method from the
super-interface Expression . |
URI |
getCategory()
Returns the subject category for this designator.
|
List |
getChildren()
Always returns an empty list since designators never have children.
|
int |
getDesignatorType()
Returns the type of this designator as specified by the *_TARGET fields.
|
URI |
getId()
Returns the AttributeId of the values resolved by this designator.
|
static AttributeDesignator |
getInstance(Node root)
Creates a new
AttributeDesignator based on the DOM root of the XML data. |
String |
getIssuer()
Returns the issuer of the values resolved by this designator if specified.
|
URI |
getType()
Returns the type of attribute that is resolved by this designator.
|
boolean |
mustBePresent()
Returns whether or not a value is required to be resolved by this designator.
|
boolean |
returnsBag()
Always returns true, since a designator always returns a bag of attribute values.
|
public static final int SUBJECT_TARGET
public static final int RESOURCE_TARGET
public static final int ACTION_TARGET
public static final int ENVIRONMENT_TARGET
public static final String SUBJECT_CATEGORY_DEFAULT
public AttributeDesignator(int target, URI type, URI id, boolean mustBePresent)
AttributeDesignator
without the optional issuer.target
- the type of designator as specified by the 4 member *_TARGET fieldstype
- the data type resolved by this designatorid
- the attribute id looked for by this designatormustBePresent
- whether resolution must find a valuepublic AttributeDesignator(int target, URI type, URI id, boolean mustBePresent, String issuer) throws IllegalArgumentException
AttributeDesignator
with the optional issuer.target
- the type of designator as specified by the 4 member *_TARGET fieldstype
- the data type resolved by this designatorid
- the attribute id looked for by this designatormustBePresent
- whether resolution must find a valueissuer
- the issuer of the values to search for or null if no issuer is specifiedIllegalArgumentException
- if the input target isn't a valid valuepublic AttributeDesignator(int target, URI type, URI id, boolean mustBePresent, String issuer, URI category) throws IllegalArgumentException
AttributeDesignator
with the optional issuer.target
- the type of designator as specified by the 4 member *_TARGET fieldstype
- the data type resolved by this designatorid
- the attribute id looked for by this designatormustBePresent
- whether resolution must find a valueissuer
- the issuer of the values to search for or null if no issuer is specifiedIllegalArgumentException
- if the input target isn't a valid valuepublic static AttributeDesignator getInstance(Node root) throws ParsingException
AttributeDesignator
based on the DOM root of the XML data.root
- the DOM root of the AttributeDesignatorType XML typeParsingException
- if the AttributeDesignatorType was invalidpublic int getDesignatorType()
public URI getType()
public URI getId()
getId
in class AbstractDesignator
public URI getCategory()
public String getIssuer()
public boolean mustBePresent()
public boolean returnsBag()
public boolean evaluatesToBag()
returnsBag
method from the
super-interface Expression
.public List getChildren()
List
public EvaluationResult evaluate(EvaluationCtx evaluationCtx)
evaluationCtx
- the representation of the requestpublic void encode(StringBuilder builder)
AttributeDesignator
into its XML form and writes this out to the provided
StringBuilder
builder
- string stream into which the XML-encoded data is writtenCopyright © 2019 WSO2. All rights reserved.