KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > wizard > forms > DefaultWizardForm


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.wizard.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 import org.apache.struts.action.ActionErrors;
27 import org.apache.struts.action.ActionMapping;
28
29 import com.sslexplorer.wizard.AbstractWizardSequence;
30
31 public class DefaultWizardForm extends AbstractWizardForm {
32     
33     final static Log log = LogFactory.getLog(DefaultWizardForm.class);
34     
35     private boolean nextAvailable;
36     private boolean previousAvailable;
37     private String JavaDoc page;
38     private String JavaDoc focussedField;
39     private boolean autoComplete;
40     private boolean finishAvailable;
41     private String JavaDoc pageName;
42     private String JavaDoc resourceBundle;
43     private String JavaDoc resourcePrefix;
44     private int stepIndex;
45     private AbstractWizardSequence wizardSequence;
46
47     /**
48      * @param nextAvailable
49      * @param previousAvailable
50      * @param page
51      * @param focussedField
52      * @param autoComplete
53      * @param finishAvailable
54      * @param pageName
55      * @param resourceBundle
56      * @param resourcePrefix
57      * @param stepIndex
58      */

59     public DefaultWizardForm(boolean nextAvailable, boolean previousAvailable, String JavaDoc page, String JavaDoc focussedField, boolean autoComplete, boolean finishAvailable, String JavaDoc pageName, String JavaDoc resourceBundle, String JavaDoc resourcePrefix, int stepIndex) {
60         super();
61         this.nextAvailable = nextAvailable;
62         this.previousAvailable = previousAvailable;
63         this.page = page;
64         this.focussedField = focussedField;
65         this.autoComplete = autoComplete;
66         this.finishAvailable = finishAvailable;
67         this.pageName = pageName;
68         this.resourceBundle = resourceBundle;
69         this.resourcePrefix = resourcePrefix;
70         this.stepIndex = stepIndex;
71     }
72
73     /*
74      * (non-Javadoc)
75      *
76      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#init(com.sslexplorer.wizard.AbstractWizardSequence)
77      */

78     public void init(AbstractWizardSequence wizardSequence, HttpServletRequest JavaDoc request) throws Exception JavaDoc {
79         this.wizardSequence = wizardSequence;
80     }
81
82     /*
83      * (non-Javadoc)
84      *
85      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#isNextAvailable()
86      */

87     public boolean getNextAvailable() {
88         return nextAvailable;
89     }
90
91     /*
92      * (non-Javadoc)
93      *
94      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#isPreviousAvailable()
95      */

96     public boolean getPreviousAvailable() {
97         return previousAvailable;
98     }
99
100     /*
101      * (non-Javadoc)
102      *
103      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#getPage()
104      */

105     public String JavaDoc getPage() {
106         return page;
107     }
108
109     /*
110      * (non-Javadoc)
111      *
112      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#getResourcePrefix()
113      */

114     public String JavaDoc getResourcePrefix() {
115         return resourcePrefix;
116     }
117
118     /*
119      * (non-Javadoc)
120      *
121      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#getResourceBundle()
122      */

123     public String JavaDoc getResourceBundle() {
124         return resourceBundle;
125     }
126
127     /*
128      * (non-Javadoc)
129      *
130      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#getPageName()
131      */

132     public String JavaDoc getPageName() {
133         return pageName;
134     }
135
136     /*
137      * (non-Javadoc)
138      *
139      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#getFinishAvailable()
140      */

141     public boolean getFinishAvailable() {
142         return finishAvailable;
143     }
144
145     /*
146      * (non-Javadoc)
147      *
148      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#apply(com.sslexplorer.wizard.AbstractWizardSequence)
149      */

150     public void apply(AbstractWizardSequence sequence) throws Exception JavaDoc {
151     }
152
153     /*
154      * (non-Javadoc)
155      *
156      * @see org.apache.struts.action.ActionForm#validate(org.apache.struts.action.ActionMapping,
157      * javax.servlet.http.HttpServletRequest)
158      */

159     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
160         return null;
161     }
162
163     /* (non-Javadoc)
164      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#getFocussedField()
165      */

166     public String JavaDoc getFocussedField() {
167         return focussedField;
168     }
169
170
171     /* (non-Javadoc)
172      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#getAutocomplete()
173      */

174     public boolean getAutocomplete() {
175         return autoComplete;
176     }
177
178     /**
179      * @param autoComplete The autoComplete to set.
180      */

181     public void setAutoComplete(boolean autoComplete) {
182         this.autoComplete = autoComplete;
183     }
184
185     /**
186      * @param finishAvailable The finishAvailable to set.
187      */

188     public void setFinishAvailable(boolean finishAvailable) {
189         this.finishAvailable = finishAvailable;
190     }
191
192     /**
193      * @param focussedField The focussedField to set.
194      */

195     public void setFocussedField(String JavaDoc focussedField) {
196         this.focussedField = focussedField;
197     }
198
199     /**
200      * @param nextAvailable The nextAvailable to set.
201      */

202     public void setNextAvailable(boolean nextAvailable) {
203         this.nextAvailable = nextAvailable;
204     }
205
206     /**
207      * @param page The page to set.
208      */

209     public void setPage(String JavaDoc page) {
210         this.page = page;
211     }
212
213     /**
214      * @param pageName The pageName to set.
215      */

216     public void setPageName(String JavaDoc pageName) {
217         this.pageName = pageName;
218     }
219
220     /**
221      * @param previousAvailable The previousAvailable to set.
222      */

223     public void setPreviousAvailable(boolean previousAvailable) {
224         this.previousAvailable = previousAvailable;
225     }
226
227     /**
228      * @param resourceBundle The resourceBundle to set.
229      */

230     public void setResourceBundle(String JavaDoc resourceBundle) {
231         this.resourceBundle = resourceBundle;
232     }
233
234     /**
235      * @param resourcePrefix The resourcePrefix to set.
236      */

237     public void setResourcePrefix(String JavaDoc resourcePrefix) {
238         this.resourcePrefix = resourcePrefix;
239     }
240
241     /* (non-Javadoc)
242      * @see com.sslexplorer.wizard.forms.AbstractWizardForm#getStepIndex()
243      */

244     public int getStepIndex() {
245         return stepIndex;
246     }
247     
248     public AbstractWizardSequence getWizardSequence() {
249         return wizardSequence;
250     }
251 }
252
Popular Tags