001: /*
002: * Created on Jan 23, 2004
003: *
004: * To change the template for this generated file go to
005: * Window - Preferences - Java - Code Generation - Code and Comments
006: */
007: package org.vfny.geoserver.form.validation;
008:
009: import org.apache.struts.action.ActionErrors;
010: import org.apache.struts.action.ActionForm;
011: import org.apache.struts.action.ActionMapping;
012: import org.vfny.geoserver.config.validation.ValidationConfig;
013: import java.util.Collection;
014: import java.util.Set;
015: import javax.servlet.http.HttpServletRequest;
016:
017: /**
018: * ValidationTestNewForm purpose.
019: * <p>
020: * Description of ValidationTestNewForm ...
021: * </p>
022: *
023: * <p>
024: * Capabilities:
025: * </p>
026: * <ul>
027: * <li>
028: * Feature: description
029: * </li>
030: * </ul>
031: * <p>
032: * Example Use:
033: * </p>
034: * <pre><code>
035: * ValidationTestNewForm x = new ValidationTestNewForm(...);
036: * </code></pre>
037: *
038: * @author User, Refractions Research, Inc.
039: * @author $Author: emperorkefka $ (last modification)
040: * @version $Id: ValidationTestNewForm.java 6177 2007-02-19 10:11:27Z aaime $
041: */
042: public class ValidationTestNewForm extends ActionForm {
043: private String newName;
044: private String selectedPlugIn;
045:
046: //Key is the PlugIn name, Value is the description
047: private Collection plugInConfigs;
048: private Set plugInNames;
049:
050: public void reset(ActionMapping arg0, HttpServletRequest request) {
051: super .reset(arg0, request);
052:
053: ValidationConfig validationConfig = (ValidationConfig) this
054: .getServlet().getServletContext().getAttribute(
055: ValidationConfig.CONFIG_KEY);
056: plugInConfigs = validationConfig.getPlugIns().values();
057: plugInNames = validationConfig.getPlugInNames();
058:
059: newName = "";
060: }
061:
062: public ActionErrors validate(ActionMapping mapping,
063: HttpServletRequest request) {
064: ActionErrors errors = new ActionErrors();
065:
066: return errors;
067: }
068:
069: public Collection getPlugInConfigs() {
070: return plugInConfigs;
071: }
072:
073: public Set getPlugIns() {
074: return plugInNames;
075: }
076:
077: /**
078: * Access newName property.
079: *
080: * @return Returns the newName.
081: */
082: public String getNewName() {
083: return newName;
084: }
085:
086: /**
087: * Set newName to newName.
088: *
089: * @param newName The newName to set.
090: */
091: public void setNewName(String newName) {
092: this .newName = newName;
093: }
094:
095: /**
096: * Access selectedPlugIn property.
097: *
098: * @return Returns the selectedPlugIn.
099: */
100: public String getSelectedPlugIn() {
101: return selectedPlugIn;
102: }
103:
104: /**
105: * Set selectedPlugIn to selectedPlugIn.
106: *
107: * @param selectedPlugIn The selectedPlugIn to set.
108: */
109: public void setSelectedPlugIn(String selectedPlugIn) {
110: this.selectedPlugIn = selectedPlugIn;
111: }
112: }
|