com.netscape.certsrv.request
Class RequestStatus

java.lang.Object
  extended by com.netscape.certsrv.request.RequestStatus

public final class RequestStatus
extends java.lang.Object

The RequestStatus class represents the current state of a request in a request queue. The state of the request changes as actions are performed on it. The request is created in the BEGIN state, then general progresses through the PENDING, APPROVED, SVC_PENDING, and COMPLETE states. Some requests may bypass the PENDING state if no agent action is required. Requests may be CANCELED (not implemented) or REJECTED. These are error conditions, and usually result because the request was invalid or was not approved by an agent.

Version:
$Revision: 1211 $ $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Field Summary
static RequestStatus APPROVED
          The state of a request that has been approved by an agent, or automatically by the policy engine, but have not been successfully transmitted to the service module.
static java.lang.String APPROVED_STRING
           
static RequestStatus BEGIN
          The initial state of a request.
static java.lang.String BEGIN_STRING
           
static RequestStatus CANCELED
          Not implemented.
static java.lang.String CANCELED_STRING
           
static RequestStatus COMPLETE
          The normal final state of a request.
static java.lang.String COMPLETE_STRING
           
static RequestStatus PENDING
          The state of a request that is waiting for action by an agent.
static java.lang.String PENDING_STRING
           
static RequestStatus REJECTED
          The state of a request after it is rejected.
static java.lang.String REJECTED_STRING
           
static RequestStatus SVC_PENDING
          The state of a request that has been sent to the service, but has not been fully processed.
static java.lang.String SVC_PENDING_STRING
           
 
Method Summary
 boolean equals(RequestStatus rs)
          Compares current request status with request status.
 boolean equals(java.lang.String string)
          Compares request status with specified string.
static RequestStatus fromString(java.lang.String s)
          Converts a string name for a request status into the request status enum object.
 java.lang.String toString()
          Returns the string form of the RequestStatus, which may be used to record the status in a database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BEGIN_STRING

public static java.lang.String BEGIN_STRING

PENDING_STRING

public static java.lang.String PENDING_STRING

APPROVED_STRING

public static java.lang.String APPROVED_STRING

SVC_PENDING_STRING

public static java.lang.String SVC_PENDING_STRING

CANCELED_STRING

public static java.lang.String CANCELED_STRING

REJECTED_STRING

public static java.lang.String REJECTED_STRING

COMPLETE_STRING

public static java.lang.String COMPLETE_STRING

BEGIN

public static RequestStatus BEGIN
The initial state of a request. Requests in this state have not been review by policy. While in this state the source of the request (usually the servlet, but it could be some other protocol module, such as email) should populate the request with data need to service it.


PENDING

public static RequestStatus PENDING
The state of a request that is waiting for action by an agent. When the agent approves or rejects the request, process will continue as appropriate. In this state there may be PolicyMessages present that indicate the reason for the pending status.


APPROVED

public static RequestStatus APPROVED
The state of a request that has been approved by an agent, or automatically by the policy engine, but have not been successfully transmitted to the service module. These requests are resent to the service during the recovery process that runs at server startup.


SVC_PENDING

public static RequestStatus SVC_PENDING
The state of a request that has been sent to the service, but has not been fully processed. The service will invoke the serviceComplete() method to cause processing to continue.


CANCELED

public static RequestStatus CANCELED
Not implemented. This is intended to be a final state that is reached when a request is removed from the processing queue without normal notification occurring. (see REJECTED)


REJECTED

public static RequestStatus REJECTED
The state of a request after it is rejected. When a request is rejected, the notifier is called prior to making the finl status change. Rejected requests may have PolicyMessages indicating the reason for the rejection, or AgentMessages, which allow the agent to give reasons for the action.


COMPLETE

public static RequestStatus COMPLETE
The normal final state of a request. The completion status attribute gives other information about the request. The request is not necessarily successful, but may indicated that service processing did not succeed.

Method Detail

fromString

public static RequestStatus fromString(java.lang.String s)
Converts a string name for a request status into the request status enum object.

Parameters:
s - The string representation of the state.
Returns:
request status

toString

public java.lang.String toString()
Returns the string form of the RequestStatus, which may be used to record the status in a database.

Overrides:
toString in class java.lang.Object
Returns:
request status

equals

public boolean equals(java.lang.String string)
Compares request status with specified string.

Parameters:
string - string describing request status

equals

public boolean equals(RequestStatus rs)
Compares current request status with request status.

Parameters:
rs - request status