View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
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.kfs.module.ar.web.struts;
20  
21  import org.apache.struts.upload.FormFile;
22  import org.kuali.kfs.module.ar.businessobject.TemplateBase;
23  import org.kuali.rice.kns.web.struts.form.KualiForm;
24  
25  
26  /**
27   * Base class for the Template upload forms.
28   */
29  public abstract class AccountsReceivableTemplateUploadForm extends KualiForm {
30  
31      protected FormFile uploadedFile;
32      protected boolean active;
33      protected boolean restrictUseByChartOrg;
34      protected String fileName;
35      private String htmlFormAction;
36  
37      /**
38       * Gets the uploadedFile attribute.
39       *
40       * @return Returns the uploadedFile.
41       */
42      public FormFile getUploadedFile() {
43          return uploadedFile;
44      }
45  
46      /**
47       * Sets the uploadedFile attribute value.
48       *
49       * @param uploadedFile The uploadedFile to set.
50       */
51      public void setUploadedFile(FormFile uploadedFile) {
52          this.uploadedFile = uploadedFile;
53      }
54  
55      /**
56       * Gets the active attribute.
57       *
58       * @return Returns the active.
59       */
60      public boolean isActive() {
61          return active;
62      }
63  
64      /**
65       * Sets the active attribute value.
66       *
67       * @param active The active to set.
68       */
69      public void setActive(boolean active) {
70          this.active = active;
71      }
72  
73      /**
74       * Gets the restrictUseByChartOrg attribute.
75       *
76       * @return Returns the restrictUseByChartOrg.
77       */
78      public boolean isRestrictUseByChartOrg() {
79          return restrictUseByChartOrg;
80      }
81  
82      /**
83       * Sets the restrictUseByChartOrg attribute value.
84       *
85       * @param restrictUseByChartOrg The restrictUseByChartOrg to set.
86       */
87      public void setRestrictUseByChartOrg(boolean restrictUseByChartOrg) {
88          this.restrictUseByChartOrg = restrictUseByChartOrg;
89      }
90  
91      /**
92       * Gets the fileName attribute.
93       *
94       * @return Returns the fileName.
95       */
96      public String getFileName() {
97          return fileName;
98      }
99  
100     /**
101      * Sets the fileName attribute value.
102      *
103      * @param fileName The fileName to set.
104      */
105     public void setFileName(String fileName) {
106         this.fileName = fileName;
107     }
108 
109     public String getHtmlFormAction() {
110         return htmlFormAction;
111     }
112 
113     public void setHtmlFormAction(String htmlFormAction) {
114         this.htmlFormAction = htmlFormAction;
115     }
116 
117     /**
118      * Overridden by child classes to return their specific template code.
119      *
120      * @return
121      */
122     public abstract String getTemplateCode();
123 
124     /**
125      * Overridden by child classes to return their specific template.
126      *
127      * @return
128      */
129     public abstract Class<? extends TemplateBase> getTemplateClass();
130 
131     /**
132      * Overridden by child classes to return their specific error property name.
133      *
134      * @return
135      */
136     public abstract String getErrorPropertyName();
137 
138     /**
139      * Overridden by child classes to return their specific template type.
140      *
141      * @return
142      */
143     public abstract String getTemplateType();
144 
145     /**
146      * Overridden by child classes to return their specific prefix for the new file name
147      * used to store the template.
148      *
149      * @return
150      */
151     public abstract String getNewFileNamePrefix();
152 
153 }