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: ContainerForm.java 8144 2006-03-20 15:03:22Z danesa $
023: * --------------------------------------------------------------------------
024: */package org.objectweb.jonas.webapp.jonasadmin.service.container;
025:
026: import java.util.ArrayList;
027:
028: import javax.servlet.http.HttpServletRequest;
029:
030: import org.apache.struts.action.ActionErrors;
031: import org.apache.struts.action.ActionMapping;
032: import org.objectweb.jonas.webapp.jonasadmin.service.ModuleForm;
033:
034: /**
035: *
036: * @author Michel-Ange ANTON
037: * @author Adriana Danes
038: *
039: */
040: public class ContainerForm extends ModuleForm {
041:
042: // --------------------------------------------------------- Properties variables
043:
044: private String path = null;
045: private String filename = null;
046: private String containerName = null;
047: private int currentNumberOfMDBType = 0;
048: private int currentNumberOfSBFType = 0;
049: private int currentNumberOfBMPType = 0;
050: private int currentNumberOfSBLType = 0;
051: private int currentNumberOfCMPType = 0;
052: private int currentNumberOfBeanType = 0;
053: private ArrayList ejbs = new ArrayList();
054:
055: // --------------------------------------------------------- Public Methods
056:
057: /**
058: * Reset all properties to their default values.
059: *
060: * @param mapping The mapping used to select this instance
061: * @param request The servlet request we are processing
062: */
063:
064: public void reset(ActionMapping mapping, HttpServletRequest request) {
065: containerName = null;
066: currentNumberOfMDBType = 0;
067: currentNumberOfSBFType = 0;
068: currentNumberOfBMPType = 0;
069: currentNumberOfSBLType = 0;
070: currentNumberOfCMPType = 0;
071: currentNumberOfBeanType = 0;
072: }
073:
074: /**
075: * Validate the properties that have been set from this HTTP request,
076: * and return an <code>ActionErrors</code> object that encapsulates any
077: * validation errors that have been found. If no errors are found, return
078: * <code>null</code> or an <code>ActionErrors</code> object with no
079: * recorded error messages.
080: *
081: * @param mapping The mapping used to select this instance
082: * @param request The servlet request we are processing
083: */
084: public ActionErrors validate(ActionMapping mapping,
085: HttpServletRequest request) {
086: ActionErrors oErrors = new ActionErrors();
087: return oErrors;
088: }
089:
090: // --------------------------------------------------------- Properties Methods
091:
092: public String getFilename() {
093: return filename;
094: }
095:
096: public String getContainerName() {
097: return containerName;
098: }
099:
100: public int getCurrentNumberOfMDBType() {
101: return currentNumberOfMDBType;
102: }
103:
104: public int getCurrentNumberOfSBFType() {
105: return currentNumberOfSBFType;
106: }
107:
108: public int getCurrentNumberOfBMPType() {
109: return currentNumberOfBMPType;
110: }
111:
112: public int getCurrentNumberOfSBLType() {
113: return currentNumberOfSBLType;
114: }
115:
116: public int getCurrentNumberOfCMPType() {
117: return currentNumberOfCMPType;
118: }
119:
120: public int getCurrentNumberOfBeanType() {
121: return currentNumberOfBeanType;
122: }
123:
124: public void setFilename(String filename) {
125: this .filename = filename;
126: }
127:
128: public void setContainerName(String containerName) {
129: this .containerName = containerName;
130: }
131:
132: public void setCurrentNumberOfMDBType(int currentNumberOfMDBType) {
133: this .currentNumberOfMDBType = currentNumberOfMDBType;
134: }
135:
136: public void setCurrentNumberOfSBFType(int currentNumberOfSBFType) {
137: this .currentNumberOfSBFType = currentNumberOfSBFType;
138: }
139:
140: public void setCurrentNumberOfBMPType(int currentNumberOfBMPType) {
141: this .currentNumberOfBMPType = currentNumberOfBMPType;
142: }
143:
144: public void setCurrentNumberOfSBLType(int currentNumberOfSBLType) {
145: this .currentNumberOfSBLType = currentNumberOfSBLType;
146: }
147:
148: public void setCurrentNumberOfCMPType(int currentNumberOfCMPType) {
149: this .currentNumberOfCMPType = currentNumberOfCMPType;
150: }
151:
152: public void setCurrentNumberOfBeanType(int currentNumberOfBeanType) {
153: this .currentNumberOfBeanType = currentNumberOfBeanType;
154: }
155:
156: public ArrayList getEjbs() {
157: return ejbs;
158: }
159:
160: public void setEjbs(ArrayList ejbs) {
161: this .ejbs = ejbs;
162: }
163:
164: public String getPath() {
165: return path;
166: }
167:
168: public void setPath(String path) {
169: this.path = path;
170: }
171: }
|