|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| StateService | Line # 28 | 0 | - | 0 | 0 | - |
-1.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| No Tests | |||
| 1 | /* | |
| 2 | * Copyright 2011 The Kuali Foundation Licensed under the Educational Community License, Version 1.0 (the "License"); you may | |
| 3 | * not use this file except in compliance with the License. You may obtain a copy of the License at | |
| 4 | * http://www.opensource.org/licenses/ecl1.php Unless required by applicable law or agreed to in writing, software | |
| 5 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | |
| 6 | * express or implied. See the License for the specific language governing permissions and limitations under the License. | |
| 7 | */ | |
| 8 | package org.kuali.student.contract.model.test.source; | |
| 9 | ||
| 10 | import java.util.List; | |
| 11 | ||
| 12 | import javax.jws.WebParam; | |
| 13 | import javax.jws.WebService; | |
| 14 | import javax.jws.soap.SOAPBinding; | |
| 15 | ||
| 16 | ||
| 17 | /** | |
| 18 | * Provides a read-only view of states and state flow information. | |
| 19 | * | |
| 20 | * This service needs to be implemented by any KS service that is going to handle states | |
| 21 | * | |
| 22 | * Version: 1.0 (Dev) | |
| 23 | * | |
| 24 | * @author kamal | |
| 25 | */ | |
| 26 | @WebService(name = "StateService", targetNamespace = "http://student.kuali.org/wsdl/state") | |
| 27 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
| 28 | public interface StateService { | |
| 29 | ||
| 30 | ||
| 31 | /** | |
| 32 | * | |
| 33 | * This method retrieves the list of process keys associated with a type of object. | |
| 34 | * | |
| 35 | * @param typeKey Type key | |
| 36 | * @param context Context information containing the principalId and locale information about the caller of service operation | |
| 37 | * @return List of process keys | |
| 38 | * @throws DoesNotExistException typeKey not found | |
| 39 | * @throws InvalidParameterException invalid typeKey | |
| 40 | * @throws MissingParameterException missing typeKey | |
| 41 | * @throws OperationFailedException unable to complete request | |
| 42 | */ | |
| 43 | public List<String> getProcessKeys(@WebParam(name = "typeKey") String typeKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 44 | ||
| 45 | /** | |
| 46 | * | |
| 47 | * 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. | |
| 48 | * | |
| 49 | * @param processKey Key identifying the process | |
| 50 | * @param stateKey Key of the state | |
| 51 | * @param context Context information containing the principalId and locale information about the caller of service operation | |
| 52 | * @return Information about the state | |
| 53 | * @throws DoesNotExistException processKey, stateKey not found | |
| 54 | * @throws InvalidParameterException invalid processKey, stateKey | |
| 55 | * @throws MissingParameterException missing processKey, stateKey | |
| 56 | * @throws OperationFailedException unable to complete request | |
| 57 | */ | |
| 58 | public StateInfo getState(@WebParam(name = "processKey") String processKey, @WebParam(name = "stateKey") String stateKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 59 | ||
| 60 | /** | |
| 61 | * This method returns a list of States that belong to a process. For e.g Clu states for clu proposal process | |
| 62 | * | |
| 63 | * @param processKey Key identifying the process | |
| 64 | * @param context Context information containing the principalId and locale information about the caller of service operation | |
| 65 | * @return List of StateInfo objects associated with the process | |
| 66 | * @throws DoesNotExistException processKey not found | |
| 67 | * @throws InvalidParameterException invalid processKey | |
| 68 | * @throws MissingParameterException missing processKey | |
| 69 | * @throws OperationFailedException unable to complete request | |
| 70 | */ | |
| 71 | public List<StateInfo> getStatesByProcess(@WebParam(name = "processKey") String processKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 72 | ||
| 73 | /** | |
| 74 | * This method returns a list of StateInfo objects that are valid initial states for a given process. | |
| 75 | * | |
| 76 | * Often there will be just a single initial valid state. | |
| 77 | * | |
| 78 | * ? if more than one does the order matter? i.e. the 1st one returned should be the default but others still allowed? | |
| 79 | * | |
| 80 | * @param processKey Process key | |
| 81 | * @param context Context information containing the principalId and locale information about the caller of service operation | |
| 82 | * @return list of states are valid for the given process | |
| 83 | * @throws DoesNotExistException processKey not found | |
| 84 | * @throws InvalidParameterException invalid processKey | |
| 85 | * @throws MissingParameterException missing processKey | |
| 86 | * @throws OperationFailedException unable to complete request | |
| 87 | */ | |
| 88 | public List<StateInfo> getInitialValidStates(@WebParam(name = "processKey") String processKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 89 | ||
| 90 | ||
| 91 | /** | |
| 92 | * | |
| 93 | * This method retrieves the next happy state in a process given the current state. | |
| 94 | * | |
| 95 | * @param processKey Process key | |
| 96 | * @param currentStateKey Current state key | |
| 97 | * @param context Context information containing the principalId and locale information about the caller of service operation | |
| 98 | * @return Next happy state in the process | |
| 99 | * @throws DoesNotExistException processKey or currentStateKey not found | |
| 100 | * @throws InvalidParameterException invalid processKey or currentStateKey | |
| 101 | * @throws MissingParameterException missing processKey or currentStateKey | |
| 102 | * @throws OperationFailedException unable to complete request | |
| 103 | */ | |
| 104 | public StateInfo getNextHappyState(@WebParam(name = "processKey") String processKey, @WebParam(name = "currentStateKey") String currentStateKey, @WebParam(name = "context") ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; | |
| 105 | } | |
|
||||||||||||