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: * --------------------------------------------------------------------------
022: * $Id: MbeanFilteringForm.java 2994 2003-08-07 12:26:40Z antonma $
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas.webapp.jonasadmin.mbean;
027:
028: import javax.servlet.http.HttpServletRequest;
029:
030: import org.apache.struts.action.ActionErrors;
031: import org.apache.struts.action.ActionForm;
032: import org.apache.struts.action.ActionMapping;
033:
034: /**
035: * @author Michel-Ange ANTON
036: */
037:
038: public class MbeanFilteringForm extends ActionForm {
039:
040: // --------------------------------------------------------- Properties variables
041:
042: private boolean description = false;
043: private boolean value = false;
044: private String periodRow;
045: private String selectedName;
046: private String forward;
047:
048: // --------------------------------------------------------- Public Methods
049:
050: /**
051: * Reset all properties to their default values.
052: *
053: * @param mapping The mapping used to select this instance
054: * @param request The servlet request we are processing
055: */
056:
057: public void reset(ActionMapping mapping, HttpServletRequest request) {
058: description = false;
059: value = false;
060: periodRow = "2";
061: }
062:
063: /**
064: * Validate the properties that have been set from this HTTP request,
065: * and return an <code>ActionErrors</code> object that encapsulates any
066: * validation errors that have been found. If no errors are found, return
067: * <code>null</code> or an <code>ActionErrors</code> object with no
068: * recorded error messages.
069: *
070: * @param mapping The mapping used to select this instance
071: * @param request The servlet request we are processing
072: * @return ActionErrors instance
073: */
074: public ActionErrors validate(ActionMapping mapping,
075: HttpServletRequest request) {
076: ActionErrors oErrors = new ActionErrors();
077: return oErrors;
078: }
079:
080: // --------------------------------------------------------- Properties Methods
081:
082: public boolean isDescription() {
083: return description;
084: }
085:
086: public void setDescription(boolean description) {
087: this .description = description;
088: if (isDescription() == false) {
089: periodRow = "2";
090: } else {
091: periodRow = "1";
092: }
093: }
094:
095: public boolean isValue() {
096: return value;
097: }
098:
099: public void setValue(boolean value) {
100: this .value = value;
101: }
102:
103: public String getPeriodRow() {
104: return periodRow;
105: }
106:
107: public String getSelectedName() {
108: return selectedName;
109: }
110:
111: public void setSelectedName(String selectedName) {
112: this .selectedName = selectedName;
113: }
114:
115: public String getForward() {
116: return forward;
117: }
118:
119: public void setForward(String forward) {
120: this.forward = forward;
121: }
122: }
|