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: ModuleForm.java 8144 2006-03-20 15:03:22Z danesa $
023: * --------------------------------------------------------------------------
024: */package org.objectweb.jonas.webapp.jonasadmin.service;
025:
026: import java.net.URL;
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: import org.objectweb.jonas.webapp.jonasadmin.JonasAdminJmx;
034:
035: /**
036: * @author Adriana Danes
037: */
038: public class ModuleForm extends ActionForm {
039:
040: // --------------------------------------------------------- Properties variables
041: /**
042: * True if the module is included in a EAR
043: */
044: private boolean inEar = false;
045: /**
046: * File name of the EAR containing the module
047: */
048: private String earFilename = null;
049: /**
050: * Path of the EAR file containing the module
051: */
052: private String earPath = null;
053: /**
054: * J2EEApplication MBean OBJECT_NAME
055: */
056: private String earON = null;
057:
058: // --------------------------------------------------------- Public Methods
059:
060: public ActionErrors validate(ActionMapping mapping,
061: HttpServletRequest request) {
062: ActionErrors oErrors = new ActionErrors();
063: return oErrors;
064: }
065:
066: // --------------------------------------------------------- Properties Methods
067:
068: public String getEarFilename() {
069: return earFilename;
070: }
071:
072: public String getEarPath() {
073: return earPath;
074: }
075:
076: public void setEarPath(URL p_Url) {
077: this .earPath = null;
078: if (p_Url != null) {
079: this .earPath = p_Url.getPath();
080: this .earFilename = JonasAdminJmx
081: .extractFilename(this .earPath);
082: }
083: }
084:
085: public boolean isInEar() {
086: return inEar;
087: }
088:
089: public void setInEar(boolean inEar) {
090: this .inEar = inEar;
091: }
092:
093: public String getEarON() {
094: return earON;
095: }
096:
097: public void setEarON(String earON) {
098: this.earON = earON;
099: }
100:
101: }
|