1 /** 2 * Copyright 2010 The Kuali Foundation Licensed under the 3 * Educational Community License, Version 2.0 (the "License"); you may 4 * not use this file except in compliance with the License. You may 5 * obtain a copy of the License at 6 * 7 * http://www.osedu.org/licenses/ECL-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, 10 * software distributed under the License is distributed on an "AS IS" 11 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 12 * or implied. See the License for the specific language governing 13 * permissions and limitations under the License. 14 */ 15 16 package org.kuali.student.core.proposal.service; 17 18 import java.util.List; 19 20 import javax.jws.WebParam; 21 import javax.jws.WebService; 22 import javax.jws.soap.SOAPBinding; 23 import javax.xml.bind.annotation.XmlSeeAlso; 24 25 import org.kuali.student.common.dictionary.service.DictionaryService; 26 import org.kuali.student.common.dto.ReferenceTypeInfo; 27 import org.kuali.student.common.dto.StatusInfo; 28 import org.kuali.student.common.exceptions.AlreadyExistsException; 29 import org.kuali.student.common.exceptions.DataValidationErrorException; 30 import org.kuali.student.common.exceptions.DependentObjectsExistException; 31 import org.kuali.student.common.exceptions.DoesNotExistException; 32 import org.kuali.student.common.exceptions.InvalidParameterException; 33 import org.kuali.student.common.exceptions.MissingParameterException; 34 import org.kuali.student.common.exceptions.OperationFailedException; 35 import org.kuali.student.common.exceptions.PermissionDeniedException; 36 import org.kuali.student.common.exceptions.VersionMismatchException; 37 import org.kuali.student.common.search.service.SearchService; 38 import org.kuali.student.common.validation.dto.ValidationResultInfo; 39 import org.kuali.student.core.proposal.dto.ProposalInfo; 40 import org.kuali.student.core.proposal.dto.ProposalTypeInfo; 41 42 /** 43 * 44 * @Author KSContractMojo 45 * @Author Neerav Agrawal 46 * @Since Thu May 28 10:25:06 EDT 2009 47 * @See <a href="https://test.kuali.org/confluence/display/KULSTU/Proposal+Service">ProposalService</> 48 * 49 */ 50 @WebService(name = "ProposalService", targetNamespace = "http://student.kuali.org/wsdl/proposal") 51 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) 52 @XmlSeeAlso({org.kuali.student.common.dto.ReferenceTypeInfo.class}) 53 public interface ProposalService extends DictionaryService, SearchService{ 54 /** 55 * Retrieves the list of proposal types known by this service 56 * @return list of proposal types 57 * @throws OperationFailedException unable to complete request 58 */ 59 public List<ProposalTypeInfo> getProposalTypes() throws OperationFailedException; 60 61 /** 62 * Retrieves information about a particular proposal type 63 * @param proposalTypeKey proposal type identifier 64 * @return proposal type information 65 * @throws DoesNotExistException specified proposal type not found 66 * @throws InvalidParameterException invalid proposalTypeKey 67 * @throws MissingParameterException proposalTypeKey not specified 68 * @throws OperationFailedException unable to complete request 69 */ 70 public ProposalTypeInfo getProposalType(@WebParam(name="proposalTypeKey")String proposalTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 71 72 /** 73 * Retrieves the list of types which can be referenced by a proposal. 74 * @return the list of types which can be referenced by a proposal 75 * @throws OperationFailedException unable to complete request 76 */ 77 public List<ReferenceTypeInfo> getReferenceTypes() throws OperationFailedException; 78 79 /** 80 * Retrieves the list of proposal types that are defined for a particular Reference Type 81 * @param referenceTypeKey referenceTypeKey 82 * @return List of proposal types 83 * @throws DoesNotExistException specified referenceTypeKey not found 84 * @throws InvalidParameterException invalid referenceTypeKey 85 * @throws MissingParameterException referenceTypeKey not specified 86 * @throws OperationFailedException unable to complete request 87 */ 88 public List<ProposalTypeInfo> getProposalTypesForReferenceType(@WebParam(name="referenceTypeKey")String referenceTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 89 90 /** 91 * Validates a proposal. Depending on the value of validationType, this validation could be limited to tests on just the current object and its directly contained subobjects or expanded to perform all tests related to this object. If an identifier is present for the proposal and a record is found for that identifier, the validation checks if the proposal can be shifted to the new values. If a record cannot be found for the identifier, it is assumed that the record does not exist and as such, the checks performed will be much shallower, typically mimicking those performed by setting the validationType to the current object. This is a slightly different pattern from the standard validation as the caller provides the identifier in the create statement instead of the server assigning an identifier. 92 * @param validationType Identifier of the extent of validation 93 * @param proposalInfo The proposal information to be tested. 94 * @return Results from performing the validation 95 * @throws DoesNotExistException validationTypeKey not found 96 * @throws InvalidParameterException invalid validationTypeKey, proposalInfo 97 * @throws MissingParameterException missing validationTypeKey, proposalInfo 98 * @throws OperationFailedException unable to complete request 99 */ 100 public List<ValidationResultInfo> validateProposal(@WebParam(name="validationType")String validationType, @WebParam(name="proposalInfo")ProposalInfo proposalInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 101 102 /** 103 * Retrieves the details of a single Proposal by proposalId 104 * @param proposalId Unique id of the Proposal to be retrieved 105 * @return Details of the Proposal requested 106 * @throws DoesNotExistException proposalId not found 107 * @throws InvalidParameterException invalid proposalId 108 * @throws MissingParameterException invalid proposalId 109 * @throws OperationFailedException unable to complete request 110 */ 111 public ProposalInfo getProposal(@WebParam(name="proposalId")String proposalId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 112 113 /** 114 * Retrieves the list of Proposals for the supplied list of proposalIds 115 * @param proposalIdList list of proposal identifiers 116 * @return List of proposals that match the supplied proposalId list 117 * @throws DoesNotExistException One or more proposalIds not found 118 * @throws InvalidParameterException One or more invalid proposalId 119 * @throws MissingParameterException missing proposalIdList 120 * @throws OperationFailedException unable to complete request 121 */ 122 public List<ProposalInfo> getProposalsByIdList(@WebParam(name="proposalIdList")List<String> proposalIdList) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 123 124 /** 125 * Retrieves the list of Proposals for the supplied Proposal Type 126 * @param proposalTypeKey key of the proposal type 127 * @return List of proposal information 128 * @throws DoesNotExistException proposalTypeKey not found 129 * @throws InvalidParameterException invalid proposalTypeKey 130 * @throws MissingParameterException missing proposalTypeKey 131 * @throws OperationFailedException unable to complete request 132 */ 133 public List<ProposalInfo> getProposalsByProposalType(@WebParam(name="proposalTypeKey")String proposalTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 134 135 /** 136 * Retrieves the list of Proposals for the specified Reference Type and Reference Id 137 * @param referenceTypeKey Key of the Reference Type 138 * @param referenceId Identifier of the reference 139 * @return list of Proposal information 140 * @throws DoesNotExistException referenceTypeKey or referenceId not found 141 * @throws InvalidParameterException invalid referenceTypeKey or referenceId 142 * @throws MissingParameterException missing referenceTypeKey or referenceId 143 * @throws OperationFailedException unable to complete request 144 */ 145 public List<ProposalInfo> getProposalsByReference(@WebParam(name="referenceTypeKey")String referenceTypeKey, @WebParam(name="referenceId")String referenceId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 146 147 /** 148 * Retrieves the list of Proposals for the specified proposal type and state 149 * @param proposalState Proposal State 150 * @param proposalTypeKey Proposal Type. 151 * @return list of Proposal information 152 * @throws DoesNotExistException proposalTypeKey not found 153 * @throws InvalidParameterException invalid proposalState or proposalTypeKey 154 * @throws MissingParameterException missing proposalState or proposalTypeKey 155 * @throws OperationFailedException unable to complete request 156 */ 157 public List<ProposalInfo> getProposalsByState(@WebParam(name="proposalState")String proposalState, @WebParam(name="proposalTypeKey")String proposalTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 158 159 /** 160 * @param workflowId Workflow id 161 * @return Proposal Information 162 * @throws DoesNotExistException workflowId not found 163 * @throws InvalidParameterException invalid workflowId 164 * @throws MissingParameterException missing workflowId 165 * @throws OperationFailedException unable to complete request 166 */ 167 public ProposalInfo getProposalByWorkflowId(@WebParam(name="workflowId")String workflowId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException; 168 169 170 /** 171 * Creates a new Proposal 172 * @param proposalTypeKey identifier of the Proposal Type for the Proposal being created 173 * @param proposalInfo information about the Proposal being created 174 * @return the created Proposal information 175 * @throws AlreadyExistsException Proposal already exists 176 * @throws DataValidationErrorException One or more values invalid for this operation 177 * @throws DoesNotExistException proposalTypeKey not found 178 * @throws InvalidParameterException invalid proposalTypeKey, proposalInfo 179 * @throws MissingParameterException missing proposalTypeKey, proposalInfo 180 * @throws OperationFailedException unable to complete request 181 * @throws PermissionDeniedException authorization failure 182 */ 183 public ProposalInfo createProposal(@WebParam(name="proposalTypeKey")String proposalTypeKey, @WebParam(name="proposalInfo")ProposalInfo proposalInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException; 184 185 /** 186 * Updates an existing CLU 187 * @param proposalId identifier for the Proposal to be updated 188 * @param proposalInfo updated information about the Proposal 189 * @return the updated Proposal information 190 * @throws DataValidationErrorException One or more values invalid for this operation 191 * @throws DoesNotExistException proposalId not found 192 * @throws InvalidParameterException invalid proposalId, proposalInfo 193 * @throws MissingParameterException missing proposalId, proposalInfo 194 * @throws OperationFailedException unable to complete request 195 * @throws PermissionDeniedException authorization failure 196 * @throws VersionMismatchException The action was attempted on an out of date version. 197 */ 198 public ProposalInfo updateProposal(@WebParam(name="proposalId")String proposalId, @WebParam(name="proposalInfo")ProposalInfo proposalInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException; 199 200 /** 201 * Deletes an existing Proposal 202 * @param proposalId identifier for the Proposal to be deleted 203 * @return status of the operation 204 * @throws DoesNotExistException proposalId not found 205 * @throws InvalidParameterException invalid proposalId 206 * @throws MissingParameterException missing proposalId 207 * @throws DependentObjectsExistException delete would leave orphaned objects or violate integrity constraints 208 * @throws OperationFailedException unable to complete request 209 * @throws PermissionDeniedException authorization failure 210 */ 211 public StatusInfo deleteProposal(@WebParam(name="proposalId")String proposalId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, DependentObjectsExistException, OperationFailedException, PermissionDeniedException; 212 213 }