aligned with 'deleteResourceFromDataset(String resourceId, String
username)'
This commit is contained in:
parent
bfd9e01841
commit
07e66d5ded
|
@ -553,7 +553,8 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
|||
// get the scope in which we should discover the ckan instance given the organization name in which the dataset was created
|
||||
String scope = getScopeFromOrgName(resource.getOrganizationNameDatasetParent());
|
||||
DataCatalogue catalogue = getCatalogue(scope);
|
||||
deleted = catalogue.deleteResourceFromDataset(resource.getOriginalIdInWorkspace());
|
||||
String username = GenericUtils.getCurrentUser(getThreadLocalRequest()).getUsername();
|
||||
deleted = catalogue.deleteResourceFromDataset(resource.getOriginalIdInWorkspace(),username);
|
||||
if(deleted){
|
||||
logger.info("Resource described by " + resource + " deleted");
|
||||
}else
|
||||
|
@ -619,7 +620,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
|||
*/
|
||||
private String getScopeFromOrgName(String orgName){
|
||||
|
||||
logger.debug("Request for scope related to orgName " + orgName + "[ map that will be used is " + mapOrganizationScope.toString() + " ]");
|
||||
logger.info("Request for scope related to orgName " + orgName + " [map that will be used is " + mapOrganizationScope.toString() + "]");
|
||||
if(orgName == null || orgName.isEmpty())
|
||||
throw new IllegalArgumentException("orgName cannot be empty or null!");
|
||||
|
||||
|
@ -647,7 +648,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
|||
toReturn = GenericUtils.getCurrentContext(this.getThreadLocalRequest(), false);
|
||||
mapOrganizationScope.put(orgName, toReturn);
|
||||
}
|
||||
logger.debug("Returning scope " + toReturn);
|
||||
logger.info("Returning scope " + toReturn);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue