diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerService.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerService.java index f6fbad2..837c552 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerService.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerService.java @@ -61,14 +61,14 @@ public interface GeoportalDataViewerService extends RemoteService { */ String getMyLogin(); - /** - * Gets the layer for type. - * - * @param layerType the layer type - * @return the layer for type - * @throws Exception the exception - */ - GeoInformationForWMSRequest getLayerForType(String layerType) throws Exception; +// /** +// * Gets the layer for type. +// * +// * @param layerType the layer type +// * @return the layer for type +// * @throws Exception the exception +// */ +// GeoInformationForWMSRequest getLayerForType(String layerType) throws Exception; /** * Gets the geo na data view profile. diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerServiceAsync.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerServiceAsync.java index f3d1a9e..7fdc3ea 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerServiceAsync.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/GeoportalDataViewerServiceAsync.java @@ -46,7 +46,7 @@ public interface GeoportalDataViewerServiceAsync { void getMyLogin(AsyncCallback callback); - void getLayerForType(String layerType, AsyncCallback callback); + //void getLayerForType(String layerType, AsyncCallback callback); void getGeoNaDataViewProfile(AsyncCallback callback); diff --git a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalDataViewerServiceImpl.java b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalDataViewerServiceImpl.java index 8db8c8f..55b09b2 100644 --- a/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalDataViewerServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/geoportaldataviewer/server/GeoportalDataViewerServiceImpl.java @@ -283,39 +283,39 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme } } - /** - * Gets the layer for type. - * - * @param layerType the layer type - * @return the layer for type - * @throws Exception the exception - */ - @Override - public GeoInformationForWMSRequest getLayerForType(String layerType) throws Exception { - LOG.info("Called getLayerForType for:" + layerType); - - if (layerType == null || layerType.isEmpty()) - throw new Exception("The input parameter layerType is null or empty"); - - SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true); - - GNADataViewerConfigProfile profile = getGNADataVieweConfigProfile(); - LOG.info("Read profile: " + profile); - - String lowerLayerType = layerType.toLowerCase(); - LOG.info("Reading map layers for type:" + lowerLayerType); - LayerItem layer = profile.getMapLayers().get(lowerLayerType); - - if (layer == null || layer.getWmsLink() == null) - throw new Exception( - "The layer type " + lowerLayerType + " has not been found. Please check your input parameter"); - - if (layer.getWmsLink() == null) - throw new Exception("The layer type " + lowerLayerType - + " has not a WMS Link associated. Please check your input parameter"); - - return parseWmsRequest(layer.getWmsLink(), null); - } +// /** +// * Gets the layer for type. +// * +// * @param layerType the layer type +// * @return the layer for type +// * @throws Exception the exception +// */ +// @Override +// public GeoInformationForWMSRequest getLayerForType(String layerType) throws Exception { +// LOG.info("Called getLayerForType for:" + layerType); +// +// if (layerType == null || layerType.isEmpty()) +// throw new Exception("The input parameter layerType is null or empty"); +// +// SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true); +// +// GNADataViewerConfigProfile profile = getGNADataVieweConfigProfile(); +// LOG.info("Read profile: " + profile); +// +// String lowerLayerType = layerType.toLowerCase(); +// LOG.info("Reading map layers for type:" + lowerLayerType); +// LayerItem layer = profile.getMapLayers().get(lowerLayerType); +// +// if (layer == null || layer.getWmsLink() == null) +// throw new Exception( +// "The layer type " + lowerLayerType + " has not been found. Please check your input parameter"); +// +// if (layer.getWmsLink() == null) +// throw new Exception("The layer type " + lowerLayerType +// + " has not a WMS Link associated. Please check your input parameter"); +// +// return parseWmsRequest(layer.getWmsLink(), null); +// } /** * Gets the geo na data view profile.