From: Marcus <the...@us...> - 2004-03-26 19:13:06
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1533 Added Files: ConfigurationForm.java Log Message: initial import --- NEW FILE: ConfigurationForm.java --- /* * juNK - a file search system for smb shares * * Copyright 2004 by * Marcus Proest (theevilflow at users dot sf dot net) * Uwe van Heesch (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). * * junk is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * junk is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with junk; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package junk.util; import java.util.HashMap; import java.util.Set; import org.apache.struts.action.ActionForm; /** * Form to dynamically handle the configuration data * @author flow */ public class ConfigurationForm extends ActionForm { private final HashMap values = new HashMap(); /** * save a value specified by key * @param key the key identifying the value * @param value the value to be saved */ public void setValue(String key, Object value) { values.put(key, value); } /** * return the data identified by key * @param key identifier * @return the data identified by key */ public Object getValue(String key) { return values.get(key); } /** * returns a set of keys * @return a set of keys */ public Set keySet() { return values.keySet(); } /** * clear all data */ public void reset() { values.clear(); } } |