Class BaseObligationHandler
java.lang.Object
org.opensaml.xacml.ctx.provider.impl.BaseObligationHandler
Base class for all obligation handlers.
Handlers are executed in order of precedence. Handlers with a higher precedence are executed before those with a
lower precedence. Handlers with the same precedence are executed in random order.
Obligation handlers must be stateless.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
ID of the handled obligation.private int
Precedence of this handler. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseObligationHandler
(String obligationId) Constructor.protected
BaseObligationHandler
(String obligationId, int handlerPrecedence) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
abstract void
evaluateObligation
(ObligationProcessingContext context, ObligationType obligation) Evaluates the obligation represented by this handler.int
Gets the precedence of the handler.Gets the ID of the handled obligation.int
hashCode()
-
Field Details
-
id
ID of the handled obligation. -
precedence
private int precedencePrecedence of this handler.
-
-
Constructor Details
-
BaseObligationHandler
Constructor. Obligation has the lowest precedence- Parameters:
obligationId
- ID of the handled obligation
-
BaseObligationHandler
Constructor.- Parameters:
obligationId
- ID of the handled obligationhandlerPrecedence
- precedence of this handler
-
-
Method Details
-
getObligationId
Gets the ID of the handled obligation.- Returns:
- ID of the handled obligation
-
getHandlerPrecedence
public int getHandlerPrecedence()Gets the precedence of the handler.- Returns:
- precedence of the handler
-
evaluateObligation
public abstract void evaluateObligation(ObligationProcessingContext context, ObligationType obligation) throws ObligationProcessingException Evaluates the obligation represented by this handler.- Parameters:
context
- current processing contextobligation
- the obligation as returned by the PDP- Throws:
ObligationProcessingException
- thrown if there is a problem evaluating this handler
-
hashCode
public int hashCode() -
equals
-