KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > properties > attributes > wizards > forms > AttributeDefinitionSummaryForm


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.properties.attributes.wizards.forms;
21
22 import javax.servlet.http.HttpServletRequest JavaDoc;
23
24 import org.apache.commons.logging.Log;
25 import org.apache.commons.logging.LogFactory;
26
27 import com.sslexplorer.boot.PropertyClassManager;
28 import com.sslexplorer.properties.attributes.AttributesPropertyClass;
29 import com.sslexplorer.properties.attributes.wizards.actions.AttributeDefinitionDetailsAction;
30 import com.sslexplorer.properties.attributes.wizards.actions.AttributeDefinitionOptionsAction;
31 import com.sslexplorer.wizard.AbstractWizardSequence;
32 import com.sslexplorer.wizard.forms.DefaultWizardForm;
33
34 /**
35  * <p>
36  * The form for the resource summary.
37  *
38  * @author James D Robinson <a HREF="mailto:james@3sp.com">&lt;james@3sp.com&gt;</a>
39  *
40  */

41 public class AttributeDefinitionSummaryForm extends DefaultWizardForm {
42
43     final static Log log = LogFactory.getLog(AttributeDefinitionSummaryForm.class);
44
45     private String JavaDoc name, label, category;
46     private AttributesPropertyClass attributeClass;
47     private int type, weight, visibility;
48
49     /**
50      * Constructor
51      */

52     public AttributeDefinitionSummaryForm() {
53         super(false, true, "/WEB-INF/jsp/content/properties/attributeDefinitionWizard/attributeDefinitionSummary.jspf", "", true, true,
54                 "attributeDefinitionSummary", "properties", "attributeDefinitionWizard.attributeDefinitionSummary", 3);
55     }
56
57     /*
58      * (non-Javadoc)
59      *
60      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#init(com.sslexplorer.wizard.AbstractWizardSequence)
61      */

62     public void init(AbstractWizardSequence sequence, HttpServletRequest JavaDoc request) throws Exception JavaDoc {
63         name = (String JavaDoc) sequence.getAttribute(AttributeDefinitionDetailsAction.ATTR_NAME, null);
64         attributeClass = (AttributesPropertyClass)PropertyClassManager.getInstance().getPropertyClass((String JavaDoc) sequence.getAttribute(AttributeDefinitionDetailsAction.ATTR_CLASS, null));
65         type = ((Integer JavaDoc)sequence.getAttribute(AttributeDefinitionOptionsAction.ATTR_TYPE, null)).intValue();
66         label = (String JavaDoc)sequence.getAttribute(AttributeDefinitionOptionsAction.ATTR_LABEL, null);
67         category = (String JavaDoc)sequence.getAttribute(AttributeDefinitionOptionsAction.ATTR_CATEGORY, null);
68         weight = ((Integer JavaDoc)sequence.getAttribute(AttributeDefinitionOptionsAction.ATTR_SORT_ORDER, null)).intValue();
69         visibility = ((Integer JavaDoc)sequence.getAttribute(AttributeDefinitionOptionsAction.ATTR_VISIBILITY, null)).intValue();
70     }
71
72     /**
73      * Get the name of the attribute
74      *
75      * @return attribute name
76      */

77     public String JavaDoc getName() {
78         return name;
79     }
80     
81     /**
82      * Get the category.
83      *
84      * @return the category
85      */

86     public String JavaDoc getCategory() {
87         return category;
88     }
89
90     /**
91      * Get the label
92      *
93      * @return the label
94      */

95     public String JavaDoc getLabel() {
96         return label;
97     }
98
99     /**
100      * Get the visibility.
101      *
102      * @return the visibility
103      */

104     public int getVisibility() {
105         return visibility;
106     }
107
108     /**
109      * Get the weight (or sort order)
110      *
111      * @return the weight
112      */

113     public int getWeight() {
114         return weight;
115     }
116
117     /**
118      * Get the property type
119      *
120      * @return type
121      */

122     public int getType() {
123         return type;
124     }
125
126     /**
127      * Get the attribute class
128      *
129      * @return attribute class
130      */

131     public AttributesPropertyClass getAttributeClass() {
132         return attributeClass;
133     }
134 }
135
Popular Tags