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: * Initial developer(s): Michel-Ange ANTON
022: * --------------------------------------------------------------------------
023: * $Id: ItemsRealmsForm.java 2637 2003-06-20 17:15:42Z antonma $
024: * --------------------------------------------------------------------------
025: */
026:
027: package org.objectweb.jonas.webapp.jonasadmin.security;
028:
029: import java.util.ArrayList;
030:
031: import javax.servlet.http.HttpServletRequest;
032:
033: import org.apache.struts.action.ActionErrors;
034: import org.apache.struts.action.ActionForm;
035: import org.apache.struts.action.ActionMapping;
036:
037: public class ItemsRealmsForm extends ActionForm {
038:
039: // --------------------------------------------------------- Constants
040:
041: // --------------------------------------------------------- Properties variables
042: private String action = null;
043: private String[] selectedItems = new String[0];
044: private ArrayList selectedRealmItem = new ArrayList();
045:
046: // --------------------------------------------------------- Public Methods
047:
048: /**
049: * Reset all properties to their default values.
050: *
051: * @param mapping The mapping used to select this instance
052: * @param request The servlet request we are processing
053: */
054: public void reset(ActionMapping mapping, HttpServletRequest request) {
055: selectedItems = new String[0];
056: }
057:
058: /**
059: * Validate the properties that have been set from this HTTP request,
060: * and return an <code>ActionErrors</code> object that encapsulates any
061: * validation errors that have been found. If no errors are found, return
062: * <code>null</code> or an <code>ActionErrors</code> object with no
063: * recorded error messages.
064: *
065: * @param mapping The mapping used to select this instance
066: * @param request The servlet request we are processing
067: */
068: public ActionErrors validate(ActionMapping mapping,
069: HttpServletRequest request) {
070: ActionErrors oErrors = new ActionErrors();
071: return oErrors;
072: }
073:
074: public String[] getSelectedItems() {
075: return selectedItems;
076: }
077:
078: public void setSelectedItems(String[] selectedItems) {
079: this .selectedItems = selectedItems;
080: }
081:
082: public String getAction() {
083: return action;
084: }
085:
086: public void setAction(String action) {
087: this .action = action;
088: }
089:
090: public ArrayList getSelectedRealmItem() {
091: return selectedRealmItem;
092: }
093:
094: public void setSelectedRealmItem(ArrayList selectedRealmItem) {
095: this .selectedRealmItem = selectedRealmItem;
096: }
097:
098: // --------------------------------------------------------- Properties Methods
099:
100: }
|