revisited the "Geoportal-DataViewer-Configs" discovery. Removed unused

RPC
This commit is contained in:
Francesco Mangiacrapa 2022-11-14 17:01:28 +01:00
parent 942744cf05
commit 0216e43423
3 changed files with 42 additions and 42 deletions

View File

@ -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.

View File

@ -46,7 +46,7 @@ public interface GeoportalDataViewerServiceAsync {
void getMyLogin(AsyncCallback<String> callback);
void getLayerForType(String layerType, AsyncCallback<GeoInformationForWMSRequest> callback);
//void getLayerForType(String layerType, AsyncCallback<GeoInformationForWMSRequest> callback);
void getGeoNaDataViewProfile(AsyncCallback<GNADataViewerConfigProfile> callback);

View File

@ -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.