|
SunTM's XACML Implementation for JavaTM | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xacml.attr.AttributeDesignator
Represents all four kinds of Designators in XACML.
Field Summary | |
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 Summary | |
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,
URI issuer)
Creates a new AttributeDesignator with the optional
issuer. |
Method Summary | |
void |
encode(OutputStream output)
Encodes this designator into its XML representation and writes this encoding to the given OutputStream with no
indentation. |
void |
encode(OutputStream output,
Indenter indenter)
Encodes this designator into its XML representation and writes this encoding to the given OutputStream with
indentation. |
EvaluationResult |
evaluate(EvaluationCtx context)
Evaluates the pre-assigned meta-data against the given context, trying to find some matching values. |
boolean |
evaluatesToBag()
Always returns true, since a designator always returns a bag of attribute values. |
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,
int target)
Creates a new AttributeDesignator based on the DOM
root of the XML data. |
URI |
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. |
void |
setSubjectCategory(URI category)
Sets the category if this is a SubjectAttributeDesignatorType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
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
Constructor Detail |
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, URI 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 specified
IllegalArgumentException
- if the input target isn't a valid valueMethod Detail |
public void setSubjectCategory(URI category)
category
- the subject categorypublic static AttributeDesignator getInstance(Node root, int target) throws ParsingException
AttributeDesignator
based on the DOM
root of the XML data.
root
- the DOM root of the AttributeDesignatorType XML typetarget
- the type of designator to create as specified in the
four member *_TARGET fields
ParsingException
- if the AttributeDesignatorType was invalidpublic int getDesignatorType()
public URI getType()
getType
in interface Evaluatable
public URI getId()
public URI getCategory()
public URI getIssuer()
public boolean mustBePresent()
public boolean evaluatesToBag()
evaluatesToBag
in interface Evaluatable
public List getChildren()
getChildren
in interface Evaluatable
List
public EvaluationResult evaluate(EvaluationCtx context)
evaluate
in interface Evaluatable
context
- the representation of the request
public void encode(OutputStream output)
OutputStream
with no
indentation.
encode
in interface Evaluatable
output
- a stream into which the XML-encoded data is writtenpublic void encode(OutputStream output, Indenter indenter)
OutputStream
with
indentation.
encode
in interface Evaluatable
output
- a stream into which the XML-encoded data is writtenindenter
- an object that creates indentation strings
|
Sun's XACML Implementation Version 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.