record url changed to item url

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@142574 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-02-15 15:57:03 +00:00
parent 481feb093f
commit 90a19689f5
2 changed files with 8 additions and 8 deletions

View File

@ -63,7 +63,7 @@ public class GrsfPublisherFisheryService {
// Logger
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(GrsfPublisherFisheryService.class);
private static final String RECORD_URL_FIELD_KEY = "Record URL";
private static final String ITEM_URL_FIELD = "Item URL";
@GET
@Path("hello")
@ -246,7 +246,7 @@ public class GrsfPublisherFisheryService {
// add the "Product URL" to the field
Map<String, List<String>> addField = new HashMap<String, List<String>>();
addField.put(RECORD_URL_FIELD_KEY, Arrays.asList(productUrl));
addField.put(ITEM_URL_FIELD, Arrays.asList(productUrl));
catalogue.patchProductCustomFields(id, apiKey, addField);
if(!groups.isEmpty()){
@ -440,8 +440,8 @@ public class GrsfPublisherFisheryService {
// retrieve the product url
Map<String, String> customFields = dataset.getExtrasAsHashMap();
if(customFields.containsKey(RECORD_URL_FIELD_KEY))
result.put("url", customFields.get(RECORD_URL_FIELD_KEY));
if(customFields.containsKey(ITEM_URL_FIELD))
result.put("url", customFields.get(ITEM_URL_FIELD));
else
result.put("url", catalogue.getUnencryptedUrlFromDatasetIdOrName(dataset.getId()));

View File

@ -63,7 +63,7 @@ public class GrsfPublisherStockService {
// Logger
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(GrsfPublisherStockService.class);
private static final String RECORD_URL_FIELD_KEY = "Record URL";
private static final String ITEM_URL_FIELD = "Item URL";
@GET
@Path("hello")
@ -236,7 +236,7 @@ public class GrsfPublisherStockService {
// add the "Product URL" to the field
Map<String, List<String>> addField = new HashMap<String, List<String>>();
addField.put(RECORD_URL_FIELD_KEY, Arrays.asList(productUrl));
addField.put(ITEM_URL_FIELD, Arrays.asList(productUrl));
catalogue.patchProductCustomFields(id, apiKey, addField);
if(!groups.isEmpty()){
@ -431,8 +431,8 @@ public class GrsfPublisherStockService {
// retrieve the product url
Map<String, String> customFields = dataset.getExtrasAsHashMap();
if(customFields.containsKey(RECORD_URL_FIELD_KEY))
result.put("url", customFields.get(RECORD_URL_FIELD_KEY));
if(customFields.containsKey(ITEM_URL_FIELD))
result.put("url", customFields.get(ITEM_URL_FIELD));
else
result.put("url", catalogue.getUnencryptedUrlFromDatasetIdOrName(dataset.getId()));