001: /*
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * Initial developer(s): Michel-Ange ANTON
022: * --------------------------------------------------------------------------
023: * $Id: LoggingJonasForm.java 2637 2003-06-20 17:15:42Z antonma $
024: * --------------------------------------------------------------------------
025: */
026:
027: package org.objectweb.jonas.webapp.jonasadmin.logging;
028:
029: import java.util.ArrayList;
030: import java.util.List;
031:
032: import javax.servlet.http.HttpServletRequest;
033:
034: import org.apache.struts.action.ActionErrors;
035: import org.apache.struts.action.ActionForm;
036: import org.apache.struts.action.ActionMapping;
037:
038: /**
039: * Form bean for the Jonas server form page.
040: */
041:
042: public final class LoggingJonasForm extends ActionForm {
043:
044: // ------------------------------------------------------------- Properties Variables
045:
046: private ArrayList topicLevelList = new ArrayList();
047: private String[] topics = null;
048: private List loggerJonasLevels = null;
049: private String level = null;
050: private String topic = null;
051:
052: // ------------------------------------------------------------- Public Methods
053:
054: /**
055: * Reset all properties to their default values.
056: *
057: * @param mapping The mapping used to select this instance
058: * @param request The servlet request we are processing
059: */
060: public void reset(ActionMapping mapping, HttpServletRequest request) {
061: level = null;
062: topic = null;
063: }
064:
065: /**
066: * Validate the properties that have been set from this HTTP request,
067: * and return an <code>ActionErrors</code> object that encapsulates any
068: * validation errors that have been found. If no errors are found, return
069: * <code>null</code> or an <code>ActionErrors</code> object with no
070: * recorded error messages.
071: *
072: * @param mapping The mapping used to select this instance
073: * @param request The servlet request we are processing
074: */
075: public ActionErrors validate(ActionMapping mapping,
076: HttpServletRequest request) {
077: return new ActionErrors();
078: }
079:
080: // ------------------------------------------------------------- Properties Methods
081:
082: public ArrayList getTopicLevelList() {
083: return topicLevelList;
084: }
085:
086: public void setTopicLevelList(ArrayList topicLevelList) {
087: this .topicLevelList = topicLevelList;
088: }
089:
090: public String[] getTopics() {
091: return topics;
092: }
093:
094: public void setTopics(String[] topics) {
095: this .topics = topics;
096: }
097:
098: public List getLoggerJonasLevels() {
099: return loggerJonasLevels;
100: }
101:
102: public void setLoggerJonasLevels(List loggerJonasLevels) {
103: this .loggerJonasLevels = loggerJonasLevels;
104: }
105:
106: public String getLevel() {
107: return level;
108: }
109:
110: public void setLevel(String level) {
111: this .level = level;
112: }
113:
114: public String getTopic() {
115: return topic;
116: }
117:
118: public void setTopic(String topic) {
119: this.topic = topic;
120: }
121:
122: }
|