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