org.qi4j.library.rest.server.api.constraint
Class Requires.RequiresRoleConstraint

java.lang.Object
  extended by org.qi4j.library.rest.server.api.constraint.Requires.RequiresRoleConstraint
All Implemented Interfaces:
java.io.Serializable, Constraint<Requires,ObjectSelection>
Enclosing class:
Requires

public static class Requires.RequiresRoleConstraint
extends java.lang.Object
implements Constraint<Requires,ObjectSelection>

See Also:
Serialized Form

Constructor Summary
Requires.RequiresRoleConstraint()
           
 
Method Summary
 boolean isValid(Requires requires, ObjectSelection objectSelection)
          For each value or parameter which should be checked this method will be invoked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Requires.RequiresRoleConstraint

public Requires.RequiresRoleConstraint()
Method Detail

isValid

public boolean isValid(Requires requires,
                       ObjectSelection objectSelection)
Description copied from interface: Constraint
For each value or parameter which should be checked this method will be invoked. If the method returns true the value is valid. If it returns false the value is considered invalid. When all constraints have been checked a ConstraintViolationException will be thrown with all the constraint violations that were found.

Specified by:
isValid in interface Constraint<Requires,ObjectSelection>
Parameters:
requires - the annotation to match
objectSelection - the value to be checked
Returns:
true if valid, false if invalid