View Javadoc
1   /*
2    * Kuali Coeus, a comprehensive research administration system for higher education.
3    * 
4    * Copyright 2005-2015 Kuali, Inc.
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  package org.kuali.coeus.s2sgen.api.generate;
20  
21  import org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract;
22  import org.kuali.coeus.propdev.api.s2s.S2sUserAttachedFormFileContract;
23  import org.kuali.coeus.s2sgen.api.core.S2SException;
24  
25  /**
26   * 
27   * This service allows s2s form generation or form validation.
28   */
29  public interface FormGeneratorService {
30  
31  
32      /**
33       * This service method executes form validation for a given proposal development document.  The proposal development
34       * document cannot be null.
35       *
36       * @param pdDoc the proposal development document.  cannot be null.
37       * @return the result of the validation
38       * @throws S2SException if unable to validate
39       * @throws java.lang.IllegalArgumentException if the pdDoc is null
40       */
41  	FormValidationResult validateForms(ProposalDevelopmentDocumentContract pdDoc) throws S2SException;
42  
43      /**
44       * This service method executes form generation for a given proposal development document.  The proposal development
45       * document cannot be null.  Note that validation is also executed as well.
46       *
47       * @param pdDoc the proposal development document.  cannot be null.
48       * @return the result of the generation.
49       * @throws S2SException if unable to validate
50       * @throws java.lang.IllegalArgumentException if the pdDoc is null
51       */
52      FormGenerationResult generateAndValidateForms(ProposalDevelopmentDocumentContract pdDoc) throws S2SException;
53  
54      /**
55       * This service method executes user attach form file validation.  The user attached from form file
56       * cannot be null.
57       *
58       * @param s2sUserAttachedFormFile the user attached form file.  cannot be null.
59       * @param formName is the formName. cannot be null.
60       * @return the result of the validation
61       * @throws S2SException if unable to validate
62       * @throws java.lang.IllegalArgumentException if the s2sUserAttachedFormFile is null or if the formName is null.
63       */
64  
65      FormValidationResult validateUserAttachedFormFile(S2sUserAttachedFormFileContract s2sUserAttachedFormFile,String formName) throws S2SException;
66  }