01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.vfny.geoserver.action.wms;
06:
07: import org.apache.struts.action.ActionForm;
08: import org.apache.struts.action.ActionForward;
09: import org.apache.struts.action.ActionMapping;
10: import org.vfny.geoserver.action.ConfigAction;
11: import org.vfny.geoserver.config.WMSConfig;
12: import org.vfny.geoserver.form.wms.WMSRenderingForm;
13: import org.vfny.geoserver.global.UserContainer;
14: import java.io.IOException;
15: import javax.servlet.ServletException;
16: import javax.servlet.http.HttpServletRequest;
17: import javax.servlet.http.HttpServletResponse;
18:
19: public class WMSRenderingAction extends ConfigAction {
20: public ActionForward execute(ActionMapping mapping,
21: ActionForm form, UserContainer user,
22: HttpServletRequest request, HttpServletResponse response)
23: throws IOException, ServletException {
24: WMSConfig config = getWMSConfig();
25: WMSRenderingForm renderingForm = (WMSRenderingForm) form;
26:
27: boolean svgAntiAlias = renderingForm.getSvgAntiAlias();
28:
29: if (renderingForm.isSvgAntiAliasChecked() == false) {
30: svgAntiAlias = false;
31: }
32:
33: config.setSvgRenderer(renderingForm.getSvgRenderer());
34: config.setSvgAntiAlias(svgAntiAlias);
35: config.setAllowInterpolation(renderingForm
36: .getAllowInterpolation());
37: getApplicationState().notifyConfigChanged();
38:
39: return mapping.findForward("config");
40: }
41: }
|