01: /*
02: * Created on Feb 18, 2004
03: *
04: * To change the template for this generated file go to
05: * Window - Preferences - Java - Code Generation - Code and Comments
06: */
07: package org.vfny.geoserver.action.data;
08:
09: import org.apache.struts.action.ActionForm;
10: import org.apache.struts.action.ActionForward;
11: import org.apache.struts.action.ActionMapping;
12: import org.vfny.geoserver.action.ConfigAction;
13: import org.vfny.geoserver.config.NameSpaceConfig;
14: import org.vfny.geoserver.form.data.DataNamespacesNewForm;
15: import org.vfny.geoserver.global.UserContainer;
16: import java.io.IOException;
17: import javax.servlet.ServletException;
18: import javax.servlet.http.HttpServletRequest;
19: import javax.servlet.http.HttpServletResponse;
20:
21: /**
22: * DataNamespacesNewAction purpose.
23: * <p>
24: * Description of DataNamespacesNewAction ...
25: *
26: * @author rgould, Refractions Research, Inc.
27: * @author $Author: dmzwiers $ (last modification)
28: * @version $Id: DataNamespacesNewAction.java 6177 2007-02-19 10:11:27Z aaime $
29: */
30: public class DataNamespacesNewAction extends ConfigAction {
31: public ActionForward execute(ActionMapping mapping,
32: ActionForm form, UserContainer user,
33: HttpServletRequest request, HttpServletResponse response)
34: throws IOException, ServletException {
35: DataNamespacesNewForm namespacesForm = (DataNamespacesNewForm) form;
36:
37: String prefix = namespacesForm.getPrefix();
38:
39: NameSpaceConfig config = new NameSpaceConfig();
40: config.setPrefix(prefix);
41:
42: getUserContainer(request).setNamespaceConfig(config);
43:
44: return mapping.findForward("config.data.namespace.editor");
45: }
46: }
|