org.glite.authz.pep.obligation
Class BaseObligationHandler

java.lang.Object
  extended by org.glite.authz.pep.obligation.BaseObligationHandler
All Implemented Interfaces:
org.glite.authz.pep.obligation.ObligationHandler
Direct Known Subclasses:
EESObligationHandler

public abstract class BaseObligationHandler
extends java.lang.Object
implements org.glite.authz.pep.obligation.ObligationHandler

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.


Constructor Summary
protected BaseObligationHandler(java.lang.String obligationId)
          Deprecated. use the new constructor #AbstractObligationHandler(String, String)
protected BaseObligationHandler(java.lang.String name, java.lang.String obligationId)
          Constructor.
protected BaseObligationHandler(java.lang.String name, java.lang.String obligationId, int handlerPrecedence)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 int getHandlerPrecedence()
          Gets the precedence of the handler.
 java.lang.String getId()
          Gets a unique identifier (name) for this obligation handle.
 java.lang.String getObligationId()
          Gets the ID of the handled obligation.
 int hashCode()
          
protected  void setId(java.lang.String id)
          Sets the obligation handler unique identifier (name)
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.glite.authz.pep.obligation.ObligationHandler
evaluateObligation
 

Constructor Detail

BaseObligationHandler

protected BaseObligationHandler(java.lang.String obligationId)
Deprecated. use the new constructor #AbstractObligationHandler(String, String)

Old constructor, keep for back compatibility (EES OH!!!).

Parameters:
obligationId - ID of the handled obligation

BaseObligationHandler

protected BaseObligationHandler(java.lang.String name,
                                java.lang.String obligationId)
Constructor. Obligation has the lowest precedence, zero.

Parameters:
name - the obligation handler unique identifier (name)
obligationId - ID of the handled obligation

BaseObligationHandler

protected BaseObligationHandler(java.lang.String name,
                                java.lang.String obligationId,
                                int handlerPrecedence)
Constructor.

Parameters:
name - the obligation handler unique identifier (name)
obligationId - ID of the handled obligation
handlerPrecedence - precedence of this handler, must be 0 or greater
Method Detail

getObligationId

public java.lang.String getObligationId()
Gets the ID of the handled obligation.

Specified by:
getObligationId in interface org.glite.authz.pep.obligation.ObligationHandler
Returns:
ID of the handled obligation

getHandlerPrecedence

public int getHandlerPrecedence()
Gets the precedence of the handler.

Specified by:
getHandlerPrecedence in interface org.glite.authz.pep.obligation.ObligationHandler
Returns:
precedence of the handler

getId

public java.lang.String getId()
Gets a unique identifier (name) for this obligation handle.

Specified by:
getId in interface org.glite.authz.pep.obligation.ObligationHandler
Returns:
the unique identifier (name) for this obligation handle

setId

protected void setId(java.lang.String id)
Sets the obligation handler unique identifier (name)

Parameters:
id - the obligation handler unique identifier (name)

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object


Copyright © 2008-2012 EMI - European Middleware Initiative. All Rights Reserved.