Class UserRoleConstraint
- java.lang.Object
-
- org.apache.directory.fortress.core.util.time.UserRoleConstraint
-
- All Implemented Interfaces:
Validator
public class UserRoleConstraint extends Object implements Validator
This class performs dynamic constraint validation on role activation, per FC-235- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description UserRoleConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
validate(Session session, Constraint role, 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 role has a matching constraint value.
-
-
-
Method Detail
-
validate
public int validate(Session session, Constraint role, 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 role has a matching constraint value.- Specified by:
validate
in interfaceValidator
- Parameters:
session
- Contains the name and value of discriminator, passed by the caller. e.g. locale=northrole
- contains the attribute constraint allowed for a given user's role. e.g. role=tellers, locale=north.time
- contains the current time stamp, required by the interface, not used here.type
- used on this validator to prevent it from ever being applied to a user's constraint.- Returns:
- '0' if validation succeeds else
GlobalErrIds.ACTV_FAILED_ABAC
if failed.
-
-