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: MailServiceForm.java 3686 2003-11-12 17:19:38Z antonma $
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas.webapp.jonasadmin.service.mail;
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: * Form used to present the Mail Service
036: * @author Adriana Danes
037: */
038: public final class MailServiceForm extends ActionForm {
039:
040: // ------------------------------------------------------------- Properties Variables
041: private int nbMimePartDatasourceFactories = 0;
042: private int nbSessionFactories = 0;
043: private int nbFactories = 0;
044:
045: // ------------------------------------------------------------- Properties Methods
046:
047: public int getNbMimePartDatasourceFactories() {
048: return nbMimePartDatasourceFactories;
049: }
050:
051: public void setNbMimePartDatasourceFactories(
052: int nbMimePartDatasourceFactories) {
053: this .nbMimePartDatasourceFactories = nbMimePartDatasourceFactories;
054: }
055:
056: public int getNbSessionFactories() {
057: return nbSessionFactories;
058: }
059:
060: public void setNbSessionFactories(int nbSessionFactories) {
061: this .nbSessionFactories = nbSessionFactories;
062: }
063:
064: public int getNbFactories() {
065: return nbFactories;
066: }
067:
068: public void setNbFactories(int nbFactories) {
069: this .nbFactories = nbFactories;
070: }
071:
072: // ------------------------------------------------------------- Public Methods
073:
074: /**
075: * Reset all properties to their default values.
076: *
077: * @param mapping The mapping used to select this instance
078: * @param request The servlet request we are processing
079: */
080: public void reset(ActionMapping mapping, HttpServletRequest request) {
081: nbMimePartDatasourceFactories = 0;
082: nbSessionFactories = 0;
083: nbFactories = 0;
084: }
085:
086: /**
087: * Validate the properties that have been set from this HTTP request,
088: * and return an <code>ActionErrors</code> object that encapsulates any
089: * validation errors that have been found. If no errors are found, return
090: * <code>null</code> or an <code>ActionErrors</code> object with no
091: * recorded error messages.
092: *
093: * @param mapping The mapping used to select this instance
094: * @param request The servlet request we are processing
095: */
096: public ActionErrors validate(ActionMapping mapping,
097: HttpServletRequest request) {
098: return new ActionErrors();
099: // TO DO voir DatasourceForm
100: }
101: }
|