KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > webapp > jonasadmin > logging > LoggingJonasForm


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer(s): Michel-Ange ANTON
22  * --------------------------------------------------------------------------
23  * $Id: LoggingJonasForm.java,v 1.3 2003/06/20 17:15:40 antonma Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package org.objectweb.jonas.webapp.jonasadmin.logging;
28
29 import java.util.ArrayList JavaDoc;
30 import java.util.List JavaDoc;
31
32 import javax.servlet.http.HttpServletRequest JavaDoc;
33
34 import org.apache.struts.action.ActionErrors;
35 import org.apache.struts.action.ActionForm;
36 import org.apache.struts.action.ActionMapping;
37
38 /**
39  * Form bean for the Jonas server form page.
40  */

41
42 public final class LoggingJonasForm extends ActionForm {
43
44 // ------------------------------------------------------------- Properties Variables
45

46     private ArrayList JavaDoc topicLevelList = new ArrayList JavaDoc();
47     private String JavaDoc[] topics = null;
48     private List JavaDoc loggerJonasLevels = null;
49     private String JavaDoc level = null;
50     private String JavaDoc topic = null;
51
52 // ------------------------------------------------------------- Public Methods
53

54     /**
55      * Reset all properties to their default values.
56      *
57      * @param mapping The mapping used to select this instance
58      * @param request The servlet request we are processing
59      */

60     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
61         level = null;
62         topic = null;
63     }
64
65     /**
66      * Validate the properties that have been set from this HTTP request,
67      * and return an <code>ActionErrors</code> object that encapsulates any
68      * validation errors that have been found. If no errors are found, return
69      * <code>null</code> or an <code>ActionErrors</code> object with no
70      * recorded error messages.
71      *
72      * @param mapping The mapping used to select this instance
73      * @param request The servlet request we are processing
74      */

75     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
76         return new ActionErrors();
77     }
78
79 // ------------------------------------------------------------- Properties Methods
80

81     public ArrayList JavaDoc getTopicLevelList() {
82         return topicLevelList;
83     }
84
85     public void setTopicLevelList(ArrayList JavaDoc topicLevelList) {
86         this.topicLevelList = topicLevelList;
87     }
88
89     public String JavaDoc[] getTopics() {
90         return topics;
91     }
92
93     public void setTopics(String JavaDoc[] topics) {
94         this.topics = topics;
95     }
96
97     public List JavaDoc getLoggerJonasLevels() {
98         return loggerJonasLevels;
99     }
100
101     public void setLoggerJonasLevels(List JavaDoc loggerJonasLevels) {
102         this.loggerJonasLevels = loggerJonasLevels;
103     }
104
105     public String JavaDoc getLevel() {
106         return level;
107     }
108
109     public void setLevel(String JavaDoc level) {
110         this.level = level;
111     }
112
113     public String JavaDoc getTopic() {
114         return topic;
115     }
116
117     public void setTopic(String JavaDoc topic) {
118         this.topic = topic;
119     }
120
121 }
122
Popular Tags