1 /*
2 * Copyright 2005-2014 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl1.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.coeus.s2sgen.api.generate;
17
18 import org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract;
19 import org.kuali.coeus.propdev.api.s2s.S2sUserAttachedFormFileContract;
20 import org.kuali.coeus.s2sgen.api.core.S2SException;
21
22 /**
23 *
24 * This service allows s2s form generation or form validation.
25 */
26 public interface FormGeneratorService {
27
28
29 /**
30 * This service method executes form validation for a given proposal development document. The proposal development
31 * document cannot be null.
32 *
33 * @param pdDoc the proposal development document. cannot be null.
34 * @return the result of the validation
35 * @throws S2SException if unable to validate
36 * @throws java.lang.IllegalArgumentException if the pdDoc is null
37 */
38 FormValidationResult validateForms(ProposalDevelopmentDocumentContract pdDoc) throws S2SException;
39
40 /**
41 * This service method executes form generation for a given proposal development document. The proposal development
42 * document cannot be null. Note that validation is also executed as well.
43 *
44 * @param pdDoc the proposal development document. cannot be null.
45 * @return the result of the generation.
46 * @throws S2SException if unable to validate
47 * @throws java.lang.IllegalArgumentException if the pdDoc is null
48 */
49 FormGenerationResult generateAndValidateForms(ProposalDevelopmentDocumentContract pdDoc) throws S2SException;
50
51 /**
52 * This service method executes user attach form file validation. The user attached from form file
53 * cannot be null.
54 *
55 * @param s2sUserAttachedFormFile the user attached form file. cannot be null.
56 * @return the result of the validation
57 * @throws S2SException if unable to validate
58 * @throws java.lang.IllegalArgumentException if the s2sUserAttachedFormFile is null
59 */
60
61 FormValidationResult validateUserAttachedFormFile(S2sUserAttachedFormFileContract s2sUserAttachedFormFile) throws S2SException;
62 }