|
JBoss port of sunxacml 2.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.xacml.sunxacml.attr.AttributeDesignator
public class 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()
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,
int target)
Deprecated. As of 2.0 you should avoid using this method and should instead use the version that takes a PolicyMetaData instance. This method will
only work for XACML 1.x policies. |
static AttributeDesignator |
getInstance(Node root,
int target,
PolicyMetaData metaData)
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. |
boolean |
returnsBag()
Always returns true, since a designator always returns a bag of attribute values. |
void |
setSubjectCategory(URI category)
Sets the category if this is a SubjectAttributeDesignatorType |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
PolicyMetaData
instance. This method will
only work for XACML 1.x policies.
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 static AttributeDesignator getInstance(Node root, int target, PolicyMetaData metaData) 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 fieldsmetaData
- the meta-data associated with the containing policy
ParsingException
- if the AttributeDesignatorType was invalidpublic int getDesignatorType()
public URI getType()
getType
in interface Expression
public URI getId()
public URI getCategory()
public URI getIssuer()
public boolean mustBePresent()
public boolean returnsBag()
returnsBag
in interface Expression
public boolean evaluatesToBag()
returnsBag
method from the super-interface Expression
.
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 Expression
output
- a stream into which the XML-encoded data is writtenpublic void encode(OutputStream output, Indenter indenter)
OutputStream
with
indentation.
encode
in interface Expression
output
- a stream into which the XML-encoded data is writtenindenter
- an object that creates indentation stringspublic String toString()
toString
in class Object
|
JBoss port of sunxacml 2.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |