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: FactoryRealmForm.java 4408 2004-03-19 14:31:54Z sauthieg $
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas.webapp.jonasadmin.security;
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: public class FactoryRealmForm extends ActionForm {
038:
039: // --------------------------------------------------------- Constants
040:
041: // --------------------------------------------------------- Properties variables
042:
043: private String resource = null;
044: private String action = null;
045: private boolean save = false;
046: private String name = null;
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: save = false;
059: action = "apply";
060: }
061:
062: /**
063: * Validate the properties that have been set from this HTTP request,
064: * and return an <code>ActionErrors</code> object that encapsulates any
065: * validation errors that have been found. If no errors are found, return
066: * <code>null</code> or an <code>ActionErrors</code> object with no
067: * recorded error messages.
068: *
069: * @param mapping The mapping used to select this instance
070: * @param request The servlet request we are processing
071: * @return List of errors
072: */
073: public ActionErrors validate(ActionMapping mapping,
074: HttpServletRequest request) {
075: ActionErrors oErrors = new ActionErrors();
076: return oErrors;
077: }
078:
079: // --------------------------------------------------------- Properties Methods
080:
081: public String getResource() {
082: return resource;
083: }
084:
085: public void setResource(String resource) {
086: this .resource = resource;
087: }
088:
089: public String getAction() {
090: return action;
091: }
092:
093: public void setAction(String action) {
094: this .action = action;
095: }
096:
097: public boolean isSave() {
098: return save;
099: }
100:
101: public void setSave(boolean save) {
102: this .save = save;
103: }
104:
105: public String getName() {
106: return name;
107: }
108:
109: public void setName(String name) {
110: this.name = name;
111: }
112: }
|