Class Timeout
- java.lang.Object
-
- org.apache.directory.fortress.core.util.time.Timeout
-
- All Implemented Interfaces:
Validator
public class Timeout extends Object implements Validator
This class performs timeout validation forConstraint
. This validator will ensure the elapsed time an entity is active is less thanConstraint.getTimeout()
andConstraint.getEndTime()
The timeout is in minutes and is stored as integer value. i.e. 30 for 30 minutes. A value of '0' specifies no timeout for a particular entity.Constraint Targets include
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 class
- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description Timeout()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 elapsed time a particular entity has been activated does not exceed specified.
-
-
-
Method Detail
-
validate
public 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 elapsed time a particular entity has been activated does not exceed specified. valueConstraint.getTimeout()
.- Specified by:
validate
in interfaceValidator
- Parameters:
session
- required forValidator
interface but not used here.constraint
- contains the elapsed time entity may remain inactive in minutes. Maps listed above.time
- contains the current timestamp.type
- required by interface, not used here.- Returns:
- '0' if validation succeeds else
GlobalErrIds.ACTV_FAILED_TIMEOUT
if failed.
-
-