From 1e710a28fb33f23664bc66fb7caec0c673ac0d43 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Thu, 10 Dec 2015 16:38:33 +0000 Subject: [PATCH] Updadet javadoc Refactor on method parameter git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gis-viewer@121760 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/commons/utils/WmsParameters.java | 3 --- .../client/commons/utils/WmsUrlValidator.java | 26 +++++++++---------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/gisviewer/client/commons/utils/WmsParameters.java b/src/main/java/org/gcube/portlets/user/gisviewer/client/commons/utils/WmsParameters.java index 76ccc06..8ac9589 100644 --- a/src/main/java/org/gcube/portlets/user/gisviewer/client/commons/utils/WmsParameters.java +++ b/src/main/java/org/gcube/portlets/user/gisviewer/client/commons/utils/WmsParameters.java @@ -21,11 +21,8 @@ package org.gcube.portlets.user.gisviewer.client.commons.utils; * sld No A URL referencing a StyledLayerDescriptor XML file which controls or enhances map layers and styling * sld_body No A URL-encoded StyledLayerDescriptor XML document which controls or enhances map layers and styling * - */ -/** * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it * @Apr 26, 2013 - * */ public enum WmsParameters { diff --git a/src/main/java/org/gcube/portlets/user/gisviewer/client/commons/utils/WmsUrlValidator.java b/src/main/java/org/gcube/portlets/user/gisviewer/client/commons/utils/WmsUrlValidator.java index d4e84fa..3020a91 100644 --- a/src/main/java/org/gcube/portlets/user/gisviewer/client/commons/utils/WmsUrlValidator.java +++ b/src/main/java/org/gcube/portlets/user/gisviewer/client/commons/utils/WmsUrlValidator.java @@ -48,11 +48,11 @@ public class WmsUrlValidator { * Parses the wms request. * * @param returnEmptyParameter the return empty parameter - * @param fillEmptyParameterAsDefault the fill empty parameter as default + * @param fillEmptyParameterAsDefaultValue the fill empty parameter as default * @return * @throws Exception */ - public String parseWmsRequest(boolean returnEmptyParameter, boolean fillEmptyParameterAsDefault) throws Exception{ + public String parseWmsRequest(boolean returnEmptyParameter, boolean fillEmptyParameterAsDefaultValue) throws Exception{ if(wmsParameters==null || wmsParameters.isEmpty()){ String msg = "IT IS NOT POSSIBLE TO PARSE WMS URL, 'WMS PARAMETERS' not found!"; @@ -63,57 +63,57 @@ public class WmsUrlValidator { for (WmsParameters wmsParam : WmsParameters.values()) { if(wmsParam.equals(WmsParameters.BBOX)){ - String value = validateValueOfParameter(WmsParameters.BBOX, wmsParameters, fillEmptyParameterAsDefault); + String value = validateValueOfParameter(WmsParameters.BBOX, wmsParameters, fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), value); } if(wmsParam.equals(WmsParameters.FORMAT)){ - String value = validateValueOfParameter(WmsParameters.FORMAT, wmsParameters, fillEmptyParameterAsDefault); + String value = validateValueOfParameter(WmsParameters.FORMAT, wmsParameters, fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), value); } if(wmsParam.equals(WmsParameters.HEIGHT)){ - String value = validateValueOfParameter( WmsParameters.HEIGHT, wmsParameters, fillEmptyParameterAsDefault); + String value = validateValueOfParameter( WmsParameters.HEIGHT, wmsParameters, fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), value); } if(wmsParam.equals(WmsParameters.CRS)){ - String crs = validateValueOfParameter(WmsParameters.CRS, wmsParameters, fillEmptyParameterAsDefault); + String crs = validateValueOfParameter(WmsParameters.CRS, wmsParameters, fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), crs); } if(wmsParam.equals(WmsParameters.WIDTH)){ - String value = validateValueOfParameter(WmsParameters.WIDTH, wmsParameters, fillEmptyParameterAsDefault); + String value = validateValueOfParameter(WmsParameters.WIDTH, wmsParameters, fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), value); } if(wmsParam.equals(WmsParameters.REQUEST)){ - String value = validateValueOfParameter(WmsParameters.REQUEST, wmsParameters, fillEmptyParameterAsDefault); + String value = validateValueOfParameter(WmsParameters.REQUEST, wmsParameters, fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), value); } if(wmsParam.equals(WmsParameters.SERVICE)){ - String value = validateValueOfParameter(WmsParameters.SERVICE, wmsParameters,fillEmptyParameterAsDefault); + String value = validateValueOfParameter(WmsParameters.SERVICE, wmsParameters,fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), value); } if(wmsParam.equals(WmsParameters.SRS)){ - String value = validateValueOfParameter(WmsParameters.SRS, wmsParameters, fillEmptyParameterAsDefault); + String value = validateValueOfParameter(WmsParameters.SRS, wmsParameters, fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), value); } if(wmsParam.equals(WmsParameters.STYLES)){ - String styles = validateValueOfParameter(WmsParameters.STYLES, wmsParameters, fillEmptyParameterAsDefault); + String styles = validateValueOfParameter(WmsParameters.STYLES, wmsParameters, fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), styles); } if(wmsParam.equals(WmsParameters.VERSION)){ - String version = validateValueOfParameter(WmsParameters.VERSION, wmsParameters, fillEmptyParameterAsDefault); + String version = validateValueOfParameter(WmsParameters.VERSION, wmsParameters, fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), version); } if(wmsParam.equals(WmsParameters.LAYERS)){ - String layers = validateValueOfParameter(WmsParameters.LAYERS, wmsParameters, fillEmptyParameterAsDefault); + String layers = validateValueOfParameter(WmsParameters.LAYERS, wmsParameters, fillEmptyParameterAsDefaultValue); parametersValue.put(wmsParam.getParameter(), layers); } }