KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > webapp > admin > valve > SingleSignOnValveForm


1 /*
2  * Copyright 2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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
17 package org.apache.webapp.admin.valve;
18
19 import javax.servlet.http.HttpServletRequest JavaDoc;
20 import org.apache.struts.action.ActionError;
21 import org.apache.struts.action.ActionErrors;
22 import org.apache.struts.action.ActionForm;
23 import org.apache.struts.action.ActionMapping;
24 import java.net.InetAddress JavaDoc;
25 import java.util.List JavaDoc;
26
27 import org.apache.webapp.admin.ApplicationServlet;
28 import org.apache.webapp.admin.LabelValueBean;
29
30 /**
31  * Form bean for the single sign on valve page.
32  *
33  * @author Manveen Kaur
34  * @version $Revision: 1.3 $ $Date: 2004/06/28 02:14:51 $
35  */

36
37 public final class SingleSignOnValveForm extends ValveForm {
38     
39     // ----------------------------------------------------- Instance Variables
40

41     // ------------------------------------------------------------- Properties
42

43     // --------------------------------------------------------- Public Methods
44

45     /**
46      * Reset all properties to their default values.
47      *
48      * @param mapping The mapping used to select this instance
49      * @param request The servlet request we are processing
50      */

51     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
52     
53         super.reset(mapping, request);
54         
55     }
56     
57     /**
58      * Render this object as a String.
59      */

60     public String JavaDoc toString() {
61
62         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("SingleSignOnValveForm[adminAction=");
63         sb.append(getAdminAction());
64         sb.append("',valveType=");
65         sb.append(getValveType());
66         sb.append("',objectName='");
67         sb.append(getObjectName());
68         sb.append("]");
69         return (sb.toString());
70
71     }
72     
73     /**
74      * Validate the properties that have been set from this HTTP request,
75      * and return an <code>ActionErrors</code> object that encapsulates any
76      * validation errors that have been found. If no errors are found, return
77      * <code>null</code> or an <code>ActionErrors</code> object with no
78      * recorded error messages.
79      *
80      * @param mapping The mapping used to select this instance
81      * @param request The servlet request we are processing
82      */

83     
84     public ActionErrors validate(ActionMapping mapping,
85     HttpServletRequest JavaDoc request) {
86         
87         ActionErrors errors = new ActionErrors();
88         
89         String JavaDoc submit = request.getParameter("submit");
90         
91         // front end validation when save is clicked.
92
if (submit != null) {
93              // no validation needed
94
}
95                  
96         return errors;
97     }
98 }
99
Popular Tags