org.opensaml.xacml.ctx.provider
Class BaseObligationHandler

java.lang.Object
  extended by org.opensaml.xacml.ctx.provider.BaseObligationHandler

public abstract class BaseObligationHandler
extends Object

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
private  String id
          ID of the handled obligation.
private  int precedence
          Precedence of this handler.
 
Constructor Summary
protected BaseObligationHandler(String obligationId)
          Constructor.
protected BaseObligationHandler(String obligationId, int handlerPrecedence)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          
abstract  void evaluateObligation(ObligationProcessingContext context, ObligationType obligation)
          Evaluates the obligation represented by this handler.
 int getHandlerPrecedence()
          Gets the precedence of the handler.
 String getObligationId()
          Gets the ID of the handled obligation.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private String id
ID of the handled obligation.


precedence

private int precedence
Precedence of this handler.

Constructor Detail

BaseObligationHandler

protected BaseObligationHandler(String obligationId)
Constructor. Obligation has the lowest precedence

Parameters:
obligationId - ID of the handled obligation

BaseObligationHandler

protected BaseObligationHandler(String obligationId,
                                int handlerPrecedence)
Constructor.

Parameters:
obligationId - ID of the handled obligation
handlerPrecedence - precedence of this handler
Method Detail

getObligationId

public String 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 context
obligation - the obligation as returned by the PDP
Throws:
ObligationProcessingException - thrown if there is a problem evaluating this handler

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object


Copyright © 1999-2012. All Rights Reserved.