|
|||||||||
Home >> All >> com >> sun >> xacml >> finder >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
com.sun.xacml.finder.impl
Class CurrentEnvModule

java.lang.Objectcom.sun.xacml.finder.AttributeFinderModule
com.sun.xacml.finder.impl.CurrentEnvModule
- public class CurrentEnvModule
- extends com.sun.xacml.finder.AttributeFinderModule
Supports the current date, time, and dateTime values. The XACML specification states that these three values must always be available to a PDP. They may be included in the request, but if they're not, a PDP must be able to recognize the attribute and generate the correct value. The module provides support for this feature by generating real-time values as known at the host where this module is running.
This class uses the caching functions of EvaluationCtx
to
make sure that values are constant within an evaluation, if that is the
desired behavior.
- Since:
- 1.0
Field Summary | |
static java.lang.String |
ENVIRONMENT_CURRENT_DATE
Standard environment variable that represents the current date |
static java.lang.String |
ENVIRONMENT_CURRENT_DATETIME
Standard environment variable that represents the current date and time |
static java.lang.String |
ENVIRONMENT_CURRENT_TIME
Standard environment variable that represents the current time |
Constructor Summary | |
CurrentEnvModule()
|
Method Summary | |
com.sun.xacml.cond.EvaluationResult |
findAttribute(java.net.URI attributeType,
java.net.URI attributeId,
java.net.URI issuer,
java.net.URI subjectCategory,
com.sun.xacml.EvaluationCtx context,
int designatorType)
Used to get the current time, date, or dateTime. |
java.util.Set |
getSupportedDesignatorTypes()
Returns a Set with a single Integer
specifying that environment attributes are supported by this
module. |
private com.sun.xacml.cond.EvaluationResult |
handleDate(java.net.URI type,
java.net.URI issuer,
com.sun.xacml.EvaluationCtx context)
Handles requests for the current Date. |
private com.sun.xacml.cond.EvaluationResult |
handleDateTime(java.net.URI type,
java.net.URI issuer,
com.sun.xacml.EvaluationCtx context)
Handles requests for the current DateTime. |
private com.sun.xacml.cond.EvaluationResult |
handleTime(java.net.URI type,
java.net.URI issuer,
com.sun.xacml.EvaluationCtx context)
Handles requests for the current Time. |
boolean |
isDesignatorSupported()
Returns true always because this module supports designators. |
private com.sun.xacml.cond.EvaluationResult |
makeBag(com.sun.xacml.attr.AttributeValue attribute)
Private helper that makes a bag containing only the given attribute. |
private com.sun.xacml.cond.EvaluationResult |
makeProcessingError(java.lang.String message)
Private helper that generates a new processing error status and includes the given string. |
Methods inherited from class com.sun.xacml.finder.AttributeFinderModule |
findAttribute, getIdentifier, getSupportedIds, invalidateCache, isSelectorSupported |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
ENVIRONMENT_CURRENT_TIME
public static final java.lang.String ENVIRONMENT_CURRENT_TIME
- Standard environment variable that represents the current time
- See Also:
- Constant Field Values
ENVIRONMENT_CURRENT_DATE
public static final java.lang.String ENVIRONMENT_CURRENT_DATE
- Standard environment variable that represents the current date
- See Also:
- Constant Field Values
ENVIRONMENT_CURRENT_DATETIME
public static final java.lang.String ENVIRONMENT_CURRENT_DATETIME
- Standard environment variable that represents the current date and time
- See Also:
- Constant Field Values
Constructor Detail |
CurrentEnvModule
public CurrentEnvModule()
Method Detail |
isDesignatorSupported
public boolean isDesignatorSupported()
- Returns true always because this module supports designators.
getSupportedDesignatorTypes
public java.util.Set getSupportedDesignatorTypes()
- Returns a
Set
with a singleInteger
specifying that environment attributes are supported by this module.
findAttribute
public com.sun.xacml.cond.EvaluationResult findAttribute(java.net.URI attributeType, java.net.URI attributeId, java.net.URI issuer, java.net.URI subjectCategory, com.sun.xacml.EvaluationCtx context, int designatorType)
- Used to get the current time, date, or dateTime. If one of those
values isn't being asked for, or if the types are wrong, then an
empty bag is returned.
handleTime
private com.sun.xacml.cond.EvaluationResult handleTime(java.net.URI type, java.net.URI issuer, com.sun.xacml.EvaluationCtx context)
- Handles requests for the current Time.
handleDate
private com.sun.xacml.cond.EvaluationResult handleDate(java.net.URI type, java.net.URI issuer, com.sun.xacml.EvaluationCtx context)
- Handles requests for the current Date.
handleDateTime
private com.sun.xacml.cond.EvaluationResult handleDateTime(java.net.URI type, java.net.URI issuer, com.sun.xacml.EvaluationCtx context)
- Handles requests for the current DateTime.
makeProcessingError
private com.sun.xacml.cond.EvaluationResult makeProcessingError(java.lang.String message)
- Private helper that generates a new processing error status and
includes the given string.
makeBag
private com.sun.xacml.cond.EvaluationResult makeBag(com.sun.xacml.attr.AttributeValue attribute)
- Private helper that makes a bag containing only the given attribute.
|
|||||||||
Home >> All >> com >> sun >> xacml >> finder >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |