org.edg.security.voms.request
Class CheckedRequest

java.lang.Object
  |
  +--org.edg.security.voms.request.Request
        |
        +--org.edg.security.voms.request.CheckedRequest
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ConfirmedRequest

public class CheckedRequest
extends Request

A class implementing requests which are explicitly allowed or denied by administrators.

States:
This request type has four possible states: UndecidedState, DeniedState, TimedOutState, and DoneState. The latter two are defined in Request.
Transition diagram:
The diagram below is an overview of the workflow of a CheckedRequest. Complete states are marked with an asterisk (*). TimeoutEvents are not shown, but are accepted by all incomplete states.
        +--------------+ AllowEvent  +----------+
    --->|UndecidedState|------------>|DoneState*|
        +--------------+             +----------+
              |                        ^
              |DenyEvent               |
              |                        |
              V                        |
         +------------+  AllowEvent    |
         |DeniedState*|----------------+
         +------------+
 
Security:
The CheckedRequest request type always calls the requested action's Action.checkPermission() method before processing an AllowEvent or a DenyEvent. The intent is that only those clients should be able to accept or deny a request who are able to perform its action.

Version:
$Name: v0_7_0 $
Author:
Karoly Lorentey
See Also:
Request, Request.DoneState, Request.TimedOutState, Serialized Form

Nested Class Summary
 class CheckedRequest.DeniedState
          The state of a denied request.
 class CheckedRequest.UndecidedState
          The state of a request that is pending the approval of an administrator.
 
Nested classes inherited from class org.edg.security.voms.request.Request
Request.ChronicleEntry, Request.DeletedState, Request.DoneState, Request.TimedOutState
 
Field Summary
private static org.apache.log4j.Logger log
          Logger.
private static long serialVersionUID
          Update this after each incompatible change.
 
Fields inherited from class org.edg.security.voms.request.Request
action, chronicle, notifications, PARAMETER_MAX_KEY_SIZE, PARAMETER_MAX_VALUE_SIZE, parameters, state
 
Constructor Summary
protected CheckedRequest(Action action, java.lang.String[] parameters)
          Creates a new request with the given action and client comment.
 
Method Summary
static Request createRequest(Action action, java.lang.String clientComment, java.lang.String[] parameters)
          Creates a new request with the given action and client comment.
 Request.State getDeniedState()
          Return a new instance of CheckedRequest.DeniedState.
 Request.State getUndecidedState()
          Return a new instance of CheckedRequest.UndecidedState.
 
Methods inherited from class org.edg.security.voms.request.Request
addNotification, addParameter, addParameters, chronicle, chronicle, delete, getAction, getChronicle, getDeletedState, getDetailedRequest, getDoneState, getId, getInstance, getNotifications, getParameters, getRequester, getRequesterId, getRequests, getShortRequest, getShortRequests, getStateDescription, getStateName, getTimedOutState, isComplete, isInDatabase, isPendingNotification, printChronicle, processEvent, sendPendingNotifications, store, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final org.apache.log4j.Logger log
Logger.


serialVersionUID

private static final long serialVersionUID
Update this after each incompatible change. (Comment this out and uncomment the following static initializer to generate a new UID.

See Also:
Constant Field Values
Constructor Detail

CheckedRequest

protected CheckedRequest(Action action,
                         java.lang.String[] parameters)
                  throws VOMSException
Creates a new request with the given action and client comment. The new request will be in CheckedRequest.UndecidedState.

Method Detail

getUndecidedState

public Request.State getUndecidedState()
Return a new instance of CheckedRequest.UndecidedState.

Calling these get*State() functions is the only accepted method of creating state objects. By overriding these methods, derived classes may replace entire states with a new implementation without changing code in any of the neighbouring states.


getDeniedState

public Request.State getDeniedState()
Return a new instance of CheckedRequest.DeniedState.

Calling these get*State() functions is the only accepted method of creating state objects. By overriding these methods, derived classes may replace entire states with a new implementation without changing code in any of the neighbouring states.


createRequest

public static Request createRequest(Action action,
                                    java.lang.String clientComment,
                                    java.lang.String[] parameters)
                             throws VOMSException
Creates a new request with the given action and client comment. The new request will be in CheckedRequest.UndecidedState.

VOMSException