org.kuali.student.contract.model.test.source
Interface StateService

All Known Subinterfaces:
AtpService, LprService

public interface StateService

Provides a read-only view of states and state flow information. This service needs to be implemented by any KS service that is going to handle states Version: 1.0 (Dev)

Author:
kamal

Method Summary
 List<StateInfo> getInitialValidStates(String processKey, ContextInfo context)
          This method returns a list of StateInfo objects that are valid initial states for a given process.
 StateInfo getNextHappyState(String processKey, String currentStateKey, ContextInfo context)
          This method retrieves the next happy state in a process given the current state.
 List<String> getProcessKeys(String typeKey, ContextInfo context)
          This method retrieves the list of process keys associated with a type of object.
 StateInfo getState(String processKey, String stateKey, ContextInfo context)
          This method returns information about a state for a given process.
 List<StateInfo> getStatesByProcess(String processKey, ContextInfo context)
          This method returns a list of States that belong to a process.
 

Method Detail

getProcessKeys

List<String> getProcessKeys(String typeKey,
                            ContextInfo context)
                            throws DoesNotExistException,
                                   InvalidParameterException,
                                   MissingParameterException,
                                   OperationFailedException
This method retrieves the list of process keys associated with a type of object.

Parameters:
typeKey - Type key
context - Context information containing the principalId and locale information about the caller of service operation
Returns:
List of process keys
Throws:
DoesNotExistException - typeKey not found
InvalidParameterException - invalid typeKey
MissingParameterException - missing typeKey
OperationFailedException - unable to complete request

getState

StateInfo getState(String processKey,
                   String stateKey,
                   ContextInfo context)
                   throws DoesNotExistException,
                          InvalidParameterException,
                          MissingParameterException,
                          OperationFailedException
This method returns information about a state for a given process. State keys can be reused and state key along with process key uniquely identifies the state instance within a process.

Parameters:
processKey - Key identifying the process
stateKey - Key of the state
context - Context information containing the principalId and locale information about the caller of service operation
Returns:
Information about the state
Throws:
DoesNotExistException - processKey, stateKey not found
InvalidParameterException - invalid processKey, stateKey
MissingParameterException - missing processKey, stateKey
OperationFailedException - unable to complete request

getStatesByProcess

List<StateInfo> getStatesByProcess(String processKey,
                                   ContextInfo context)
                                   throws DoesNotExistException,
                                          InvalidParameterException,
                                          MissingParameterException,
                                          OperationFailedException
This method returns a list of States that belong to a process. For e.g Clu states for clu proposal process

Parameters:
processKey - Key identifying the process
context - Context information containing the principalId and locale information about the caller of service operation
Returns:
List of StateInfo objects associated with the process
Throws:
DoesNotExistException - processKey not found
InvalidParameterException - invalid processKey
MissingParameterException - missing processKey
OperationFailedException - unable to complete request

getInitialValidStates

List<StateInfo> getInitialValidStates(String processKey,
                                      ContextInfo context)
                                      throws DoesNotExistException,
                                             InvalidParameterException,
                                             MissingParameterException,
                                             OperationFailedException
This method returns a list of StateInfo objects that are valid initial states for a given process. Often there will be just a single initial valid state. ? if more than one does the order matter? i.e. the 1st one returned should be the default but others still allowed?

Parameters:
processKey - Process key
context - Context information containing the principalId and locale information about the caller of service operation
Returns:
list of states are valid for the given process
Throws:
DoesNotExistException - processKey not found
InvalidParameterException - invalid processKey
MissingParameterException - missing processKey
OperationFailedException - unable to complete request

getNextHappyState

StateInfo getNextHappyState(String processKey,
                            String currentStateKey,
                            ContextInfo context)
                            throws DoesNotExistException,
                                   InvalidParameterException,
                                   MissingParameterException,
                                   OperationFailedException
This method retrieves the next happy state in a process given the current state.

Parameters:
processKey - Process key
currentStateKey - Current state key
context - Context information containing the principalId and locale information about the caller of service operation
Returns:
Next happy state in the process
Throws:
DoesNotExistException - processKey or currentStateKey not found
InvalidParameterException - invalid processKey or currentStateKey
MissingParameterException - missing processKey or currentStateKey
OperationFailedException - unable to complete request


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.