KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > security > forms > PromptForSessionPasswordForm


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.security.forms;
21
22 import org.apache.struts.action.ActionMapping;
23
24 import com.sslexplorer.core.forms.CoreForm;
25
26 /**
27  * <p>
28  * Form to hold the prompted session password.
29  *
30  * @author James D Robinson <a HREF="mailto:james@3sp.com">&lt;james@3sp.com&gt;</a>
31  */

32 public class PromptForSessionPasswordForm extends CoreForm {
33
34     // Private instance varaibles
35
private String JavaDoc password;
36     private String JavaDoc forwardTo;
37     private String JavaDoc target;
38     private String JavaDoc folder;
39
40     /**
41      * Get the password.
42      *
43      * @return password
44      */

45     public String JavaDoc getPassword() {
46         return password;
47     }
48
49     /**
50      * Set the password.
51      *
52      * @param password password
53      */

54     public void setPassword(String JavaDoc password) {
55         this.password = password.trim();
56     }
57
58     /*
59      * (non-Javadoc)
60      *
61      * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping,
62      * javax.servlet.http.HttpServletRequest)
63      */

64     public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest JavaDoc request) {
65         super.reset(mapping, request);
66         password = null;
67     }
68
69     /**
70      * Set where the browser should go to when the password has been entered.
71      *
72      * @param forwardTo forward to address
73      */

74     public void setForwardTo(String JavaDoc forwardTo) {
75         this.forwardTo = forwardTo;
76     }
77
78     /**
79      * Get the address to forward to.
80      *
81      * @return forward to address
82      */

83     public String JavaDoc getForwardTo() {
84         return forwardTo;
85     }
86
87     /**
88      * Set the target frame of the forwardTo to forward to.
89      *
90      * @param target target frame
91      */

92     public void setTarget(String JavaDoc target) {
93         this.target = target;
94     }
95
96     /**
97      * Get the target frame of the forwardTo to forward to.
98      *
99      * @return target frame
100      */

101     public String JavaDoc getTarget() {
102         return target;
103     }
104
105     /**
106      * Set the folder of the forwardTo to forward to. This is used for web folders
107      * only
108      *
109      * @param folder folder
110      */

111     public void setFolder(String JavaDoc folder) {
112         this.folder = folder;
113     }
114
115     /**
116      * Get the folder of the forwardTo to forward to. This is used for web folders
117      * only
118      *
119      * @return folder
120      */

121     public String JavaDoc getFolder() {
122         return folder;
123     }
124 }
Popular Tags