git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/Common/storagehub-client@171971 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1a9eaa1ecd
commit
4263b026cc
|
@ -27,8 +27,11 @@ public abstract class ItemContainer<I extends Item> {
|
||||||
this.itemId = item.getId();
|
this.itemId = item.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String getId() {
|
||||||
|
return this.itemId;
|
||||||
|
}
|
||||||
|
|
||||||
public abstract ContainerType getType();
|
public abstract ContainerType getType();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
@ -37,6 +40,11 @@ public abstract class ItemContainer<I extends Item> {
|
||||||
else return item;
|
else return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private I get(boolean reset) {
|
||||||
|
this.item = (I)itemclient.get(itemId);
|
||||||
|
return this.item;
|
||||||
|
}
|
||||||
|
|
||||||
public StreamDescriptor download(String ... nodeIdsToExclude) {
|
public StreamDescriptor download(String ... nodeIdsToExclude) {
|
||||||
return itemclient.download(this.itemId, nodeIdsToExclude);
|
return itemclient.download(this.itemId, nodeIdsToExclude);
|
||||||
}
|
}
|
||||||
|
@ -49,12 +57,14 @@ public abstract class ItemContainer<I extends Item> {
|
||||||
itemclient.delete(this.itemId);
|
itemclient.delete(this.itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rename(String newName) {
|
public OpenResolver rename(String newName) {
|
||||||
itemclient.rename(this.itemId, newName);
|
return new OpenResolver(this.get(true), itemclient);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void move(FolderContainer folder) {
|
public OpenResolver move(FolderContainer folder) {
|
||||||
itemclient.move(this.itemId, folder.get().getId());
|
return new OpenResolver(this.get(true), itemclient);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FolderContainer getRootSharedFolder() {
|
public FolderContainer getRootSharedFolder() {
|
||||||
|
|
Loading…
Reference in New Issue