git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/branches/data-access/storagehub-webapp/1.0@174185 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
71d3dc113f
commit
05be68b220
|
@ -654,7 +654,9 @@ public class ItemsManager {
|
||||||
newFileIdentifier = newNode.getIdentifier();
|
newFileIdentifier = newNode.getIdentifier();
|
||||||
//TODO: copy on storage and modify content
|
//TODO: copy on storage and modify content
|
||||||
if (item instanceof AbstractFileItem) {
|
if (item instanceof AbstractFileItem) {
|
||||||
String newStorageID = Utils.getStorageClient(login).getClient().copyFile().from(((AbstractFileItem)item).getContent().getStorageId()).to(newPath);
|
String oldStorageId = ((AbstractFileItem)item).getContent().getStorageId();
|
||||||
|
String newStorageID = Utils.getStorageClient(login).getClient().copyFile().from(oldStorageId).to(newPath);
|
||||||
|
log.info("copying storage Id {} to newPath {} and the id returned by storage is {}", oldStorageId, newPath, newStorageID);
|
||||||
((AbstractFileItem) item).getContent().setStorageId(newStorageID);
|
((AbstractFileItem) item).getContent().setStorageId(newStorageID);
|
||||||
((AbstractFileItem) item).getContent().setRemotePath(newPath);
|
((AbstractFileItem) item).getContent().setRemotePath(newPath);
|
||||||
item2Node.replaceContent(ses, newNode, (AbstractFileItem) item, ItemAction.CLONED);
|
item2Node.replaceContent(ses, newNode, (AbstractFileItem) item, ItemAction.CLONED);
|
||||||
|
|
Loading…
Reference in New Issue