public class ClockTime extends Object implements Validator
Constraint
. This validator will ensure the current time falls between Constraint.getBeginTime()
and Constraint.getEndTime()
The format requires military time, i.e. 0800 for 8:00 am, 1700 for 5:00 pm. The constant GlobalIds.NONE
may be used to disable checks for a particular entity.
for Constraint
validations that occur in
User
maps to 'ftCstr' attribute on 'ftUserAttrs' object classUserRole
maps to 'ftRC' attribute on 'ftUserAttrs' object classRole
maps to 'ftCstr' attribute on 'ftRls' object classAdminRole
maps to 'ftCstr' attribute on 'ftRls' object classUserAdminRole
maps to 'ftARC' attribute on 'ftRls' object classConstructor and Description |
---|
ClockTime() |
Modifier and Type | Method and Description |
---|---|
int |
validate(Session session,
Constraint constraint,
Time time,
VUtil.ConstraintType type)
This method is called during entity activation,
VUtil.validateConstraints(org.apache.directory.fortress.core.model.Session, org.apache.directory.fortress.core.util.VUtil.ConstraintType, boolean) and ensures the current time is
between Constraint.getBeginTime() and Constraint.getBeginTime() . |
public int validate(Session session, Constraint constraint, Time time, VUtil.ConstraintType type)
VUtil.validateConstraints(org.apache.directory.fortress.core.model.Session, org.apache.directory.fortress.core.util.VUtil.ConstraintType, boolean)
and ensures the current time is
between Constraint.getBeginTime()
and Constraint.getBeginTime()
.validate
in interface Validator
session
- required for Validator
interface but not used here.constraint
- contains the begin and end times. Maps listed above.time
- contains the current time.type
- required by interface, not used here.GlobalErrIds.ACTV_FAILED_TIME
if failed.Copyright © 2003-2016, The Apache Software Foundation. All Rights Reserved. Generated 20160718-1621