fixing GET request PATHs
This commit is contained in:
parent
49fc47eafa
commit
011f57cb25
|
@ -46,7 +46,7 @@ import com.google.common.cache.CacheLoader.InvalidCacheLoadException;
|
||||||
*
|
*
|
||||||
* Mar 23, 2023
|
* Mar 23, 2023
|
||||||
*/
|
*/
|
||||||
@Path("{targetAppId:geo(-(dv|de))?}")
|
@Path("{targetAppId:geo|geo-dv|geo-de}")
|
||||||
public class GeoportalResolver {
|
public class GeoportalResolver {
|
||||||
|
|
||||||
private static final String QP_RESOLVE_AS = "res";
|
private static final String QP_RESOLVE_AS = "res";
|
||||||
|
@ -287,16 +287,16 @@ public class GeoportalResolver {
|
||||||
|
|
||||||
String targetAppName = jsonRequest.getTargetAppName();
|
String targetAppName = jsonRequest.getTargetAppName();
|
||||||
|
|
||||||
TargetAppGeoportalCodes resoruceGeoportalCodes = null;
|
TargetAppGeoportalCodes targetAppGeoportalCodes = null;
|
||||||
|
|
||||||
if (targetAppName == null) {
|
if (targetAppName == null) {
|
||||||
resoruceGeoportalCodes = TargetAppGeoportalCodes.GEO;
|
targetAppGeoportalCodes = TargetAppGeoportalCodes.GEO;
|
||||||
LOG.error("Target application parameter is null, using default: " + resoruceGeoportalCodes);
|
LOG.error("Target application parameter is null, using default: " + targetAppGeoportalCodes);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
resoruceGeoportalCodes = TargetAppGeoportalCodes.valueOfName(jsonRequest.getTargetAppName());
|
targetAppGeoportalCodes = TargetAppGeoportalCodes.valueOfName(jsonRequest.getTargetAppName());
|
||||||
|
|
||||||
if (resoruceGeoportalCodes == null) {
|
if (targetAppGeoportalCodes == null) {
|
||||||
LOG.error("Target application parameter is malformed");
|
LOG.error("Target application parameter is malformed");
|
||||||
List<String> targetApps = Arrays.asList(TargetAppGeoportalCodes.values()).stream()
|
List<String> targetApps = Arrays.asList(TargetAppGeoportalCodes.values()).stream()
|
||||||
.map(TargetAppGeoportalCodes::getTarget_app).collect(Collectors.toList());
|
.map(TargetAppGeoportalCodes::getTarget_app).collect(Collectors.toList());
|
||||||
|
@ -305,8 +305,10 @@ public class GeoportalResolver {
|
||||||
helpURI);
|
helpURI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG.info("The target app is: " + targetAppGeoportalCodes);
|
||||||
|
|
||||||
String linkURL = String.format("%s/%s/%s/%s/%s", serverUrl, resoruceGeoportalCodes.getId(), vreName,
|
String linkURL = String.format("%s/%s/%s/%s/%s", serverUrl, targetAppGeoportalCodes.getId(), vreName,
|
||||||
jsonRequest.getItemType(), jsonRequest.getItemID());
|
jsonRequest.getItemType(), jsonRequest.getItemID());
|
||||||
|
|
||||||
if (jsonRequest.getQueryString() != null) {
|
if (jsonRequest.getQueryString() != null) {
|
||||||
|
|
Loading…
Reference in New Issue