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 java.util.LinkedHashMap;
22  import java.util.Map;
23  
24  /**
25   * 
26   * This class holds information about form generation.  For example: what forms are supported,
27   * the name of the generator, the location of the stylesheet.
28   */
29  public class FormMappingInfo{
30      private String nameSpace;
31      private String generatorName;
32      private String formName;
33      private String stylesheet;
34      private int sortIndex;
35      private Boolean userAttachedForm = false;
36      
37      private static final String KEY_NAMESPACE = "nameSpace";
38      private static final String KEY_MAIN_CLASS = "generatorName";
39      private static final String KEY_FORM_NAME = "formName";
40      private static final String KEY_STYLE_SHEET = "stylesheet";
41  
42      public FormMappingInfo() {
43          super();
44      }
45  
46      public FormMappingInfo(String nameSpace, String generatorName, String formName, String stylesheet, int sortIndex, Boolean userAttachedForm) {
47          this.nameSpace = nameSpace;
48          this.generatorName = generatorName;
49          this.formName = formName;
50          this.stylesheet = stylesheet;
51          this.sortIndex = sortIndex;
52          this.userAttachedForm = userAttachedForm;
53      }
54  
55      public String getGeneratorName() {
56          return generatorName;
57      }
58  
59      public void setGeneratorName(String generatorName) {
60          this.generatorName = generatorName;
61      }
62  
63      public String getNameSpace() {
64          return nameSpace;
65      }
66  
67      public void setNameSpace(String nameSpace) {
68          this.nameSpace = nameSpace;
69      }
70  
71      public String getFormName() {
72          return formName;
73      }
74  
75      public void setFormName(String formName) {
76          this.formName = formName;
77      }
78  
79      public String getStyleSheet() {
80          return stylesheet;
81      }
82  
83      public void setStyleSheet(String stylesheet) {
84          this.stylesheet = stylesheet;
85      }
86  
87      public int getSortIndex() {
88          return sortIndex;
89      }
90  
91      public void setSortIndex(int sortIndex) {
92          this.sortIndex = sortIndex;
93      }
94  
95      public Boolean getUserAttachedForm() {
96          return userAttachedForm;
97      }
98  
99      public void setUserAttachedForm(Boolean userAttachedForm) {
100         this.userAttachedForm = userAttachedForm;
101     }
102 
103     public String toString() {
104         Map<String, Object> hashMap = new LinkedHashMap<String, Object>();
105         hashMap.put(KEY_NAMESPACE, getNameSpace());
106         hashMap.put(KEY_MAIN_CLASS, getGeneratorName());
107         hashMap.put(KEY_FORM_NAME, getFormName());
108         hashMap.put(KEY_STYLE_SHEET, getStyleSheet());
109         return hashMap.toString();
110     }
111 }