minor fixes
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/ckan-util-library@141263 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ef000671ee
commit
57ce4f6caf
|
@ -925,7 +925,7 @@ public class DataCatalogueImpl implements DataCatalogue{
|
|||
if(dataset != null){
|
||||
|
||||
if(getUriResolverUrl() != null)
|
||||
url = getUrlForProduct(CONTEXT, EntityContext.DATASET, name, true);
|
||||
url = getUrlForProduct(CONTEXT, EntityContext.DATASET, name, false);
|
||||
|
||||
if(url == null || url.isEmpty())
|
||||
url = getPortletUrl() + "?" + URLEncoder.encode("path=/dataset/" + name, "UTF-8");
|
||||
|
@ -955,7 +955,7 @@ public class DataCatalogueImpl implements DataCatalogue{
|
|||
if(dataset != null){
|
||||
|
||||
if(getUriResolverUrl() != null)
|
||||
url = getUrlForProduct(CONTEXT, EntityContext.DATASET, name, false);
|
||||
url = getUrlForProduct(CONTEXT, EntityContext.DATASET, name, true);
|
||||
|
||||
if(url == null || url.isEmpty())
|
||||
url = getPortletUrl() + "?" + URLEncoder.encode("path=/dataset/" + name, "UTF-8");
|
||||
|
@ -975,7 +975,7 @@ public class DataCatalogueImpl implements DataCatalogue{
|
|||
* @return the url for the product
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private String getUrlForProduct(String context, EntityContext entityContext, String entityName, boolean encrypted){
|
||||
private String getUrlForProduct(String context, EntityContext entityContext, String entityName, boolean unencrypted){
|
||||
|
||||
String toReturn = null;
|
||||
|
||||
|
@ -987,7 +987,7 @@ public class DataCatalogueImpl implements DataCatalogue{
|
|||
requestEntity.put("gcube_scope", context);
|
||||
requestEntity.put("entity_context", entityContext.toString());
|
||||
requestEntity.put("entity_name", entityName);
|
||||
requestEntity.put("clear_url", encrypted);
|
||||
requestEntity.put("clear_url", unencrypted);
|
||||
|
||||
StringEntity params = new StringEntity(requestEntity.toJSONString(), ContentType.APPLICATION_JSON);
|
||||
httpPostRequest.setEntity(params);
|
||||
|
|
Loading…
Reference in New Issue