SimpleTimeCondition
instead.@Deprecated public class SimpleTimeCondition extends Object implements Condition
SimpleTimeCondition
is a plugin implementation
of Condition
. This lets you define the time range
of week days and/or date range during which a policy applies.Modifier and Type | Field and Description |
---|---|
static String |
REQUEST_TIME
Deprecated.
Key that is used to define current time that is passed in the
env parameter while invoking getConditionDecision
method of the SimpleTimeCondition . |
AM_IDENTITY_NAME, APPLICATION_IDLE_TIMEOUT, APPLICATION_NAME, AUTH_LEVEL, AUTH_LEVEL_CONDITION_ADVICE, AUTH_SCHEME, AUTH_SCHEME_CONDITION_ADVICE, AUTHENTICATE_TO_REALM, AUTHENTICATE_TO_REALM_CONDITION_ADVICE, AUTHENTICATE_TO_SERVICE, AUTHENTICATE_TO_SERVICE_CONDITION_ADVICE, DNS_NAME, END_DATE, END_DAY, END_IP, END_TIME, ENFORCEMENT_TIME_ZONE, INVOCATOR_PRINCIPAL_UUID, LDAP_FILTER, MAX_SESSION_TIME, REQUEST_AUTH_LEVEL, REQUEST_AUTH_SCHEMES, REQUEST_AUTHENTICATED_TO_REALMS, REQUEST_AUTHENTICATED_TO_SERVICES, REQUEST_DNS_NAME, REQUEST_IP, REQUEST_TIME_ZONE, START_DATE, START_DAY, START_IP, START_TIME, TERMINATE_SESSION, VALUE_CASE_INSENSITIVE
Constructor and Description |
---|
SimpleTimeCondition()
Deprecated.
No argument constructor
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Deprecated.
Returns a copy of this object.
|
ConditionDecision |
getConditionDecision(SSOToken token,
Map env)
Deprecated.
Gets the decision computed by this condition object, based on the
map of environment parameters
A policy would be evaluated only
if the decision of condition is allow.
|
String |
getDisplayName(String property,
Locale locale)
Deprecated.
Gets the display name for the property name.
|
Map |
getProperties()
Deprecated.
Gets the properties of the condition.
|
List |
getPropertyNames()
Deprecated.
Returns a list of property names for the condition.
|
Syntax |
getPropertySyntax(String property)
Deprecated.
Returns the syntax for a property name
|
Set |
getValidValues(String property)
Deprecated.
Returns a set of valid values given the property name.
|
void |
setProperties(Map properties)
Deprecated.
Sets the properties of the condition.
|
public static final String REQUEST_TIME
env
parameter while invoking getConditionDecision
method of the SimpleTimeCondition
. Value for the
key should be a Long
object whose value is time in
milliseconds since epoch. If no value is given for this, it is assumed
to be the current system timepublic SimpleTimeCondition()
public List getPropertyNames()
getPropertyNames
in interface Condition
public Syntax getPropertySyntax(String property)
getPropertySyntax
in interface Condition
property
- property nameSyntax for the property name
Syntax
public String getDisplayName(String property, Locale locale) throws PolicyException
locale
variable could be used by the plugin to
customize the display name for the given locale.
The locale
variable could be null
, in which
case the plugin must use the default locale.getDisplayName
in interface Condition
property
- property namelocale
- locale for which the property name must be customizedPolicyException
- is unable to gte the display name.public Set getValidValues(String property) throws PolicyException
getValidValues
in interface Condition
property
- property namePolicyException
- if unable to get the Syntax.public void setProperties(Map properties) throws PolicyException
ConditionDecision
is influenced by these
properties.setProperties
in interface Condition
properties
- the properties of the condition that governs
whether a policy applies. This plugin uses the property values
defined for keys START_TIME
, END_TIME
,
START_DAY
, END_DAY
,
START_DATE
, END_DATE
. The properties
should have at least one of the keys START_TIME
,
START_DAY
or START_DATE
.
The values of the keys should be Set where each element is a
String that conforms to the format dictated by
START_TIME
, START_DAY
and
START_DATE
. Each of the above key, if present,
should be accompanied by the key END_TIME
,
END_DAY
, END_DATE
respectively.PolicyException
- if properties is null or does not contain
keys as described above or does not follow the required patternCondition.START_TIME
,
Condition.END_TIME
,
Condition.START_DAY
,
Condition.END_DAY
,
Condition.START_DATE
,
Condition.END_DATE
,
getConditionDecision(SSOToken, Map)
public Map getProperties()
getProperties
in interface Condition
setProperties(Map)
public Object clone()
public ConditionDecision getConditionDecision(SSOToken token, Map env) throws PolicyException, SSOException
getConditionDecision
in interface Condition
token
- single sign on token of the userenv
- request specific environment map of key/value pairs
SimpleTimeCondition
looks for values of keys
REQUEST_TIME
and REQUEST_TIME_ZONE
in the env
map. If value is not defined
REQUEST_TIME_ZONE
, it is assumed to be current system
time. REQUEST_TIME_ZONE
is used only if
ENFORCEMENT_TIME_ZONE
is not defined in the condition
definition in the policy. If both
ENFORCEMENT_TIME_ZONE
and
REQUEST_TIME_ZONE
are not defined default system time
zone is used.PolicyException
- if the condition has not been initialized
with a successful call to setProperties(Map)
and/or
the value of keys REQUEST_TIME and/or
REQUEST_TIME_ZONE
are invalid.
SSOException
- if the token is invalidsetProperties(Map)
,
REQUEST_TIME
,
Condition.REQUEST_TIME_ZONE
,
Condition.ENFORCEMENT_TIME_ZONE
,
ConditionDecision
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.