1822: Workspace: replace files does not refresh the last updated time
Task-Url: https://support.d4science.org/issues/1822 Added case overwrite to fix #1822 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@121824 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b63917c05a
commit
bcf65f9301
|
@ -61,6 +61,10 @@ public class WorkspaceUploaderListenerController {
|
|||
GWT.log("NotifyUploadEvent FAILED");
|
||||
notifyUploadError(notifyUploadEvent.getParentId(), notifyUploadEvent.getItemId(), notifyUploadEvent.getException());
|
||||
break;
|
||||
case OVERWRITE_COMPLETED:
|
||||
GWT.log("NotifyUploadEvent OVERWRITE_COMPLETED");
|
||||
notifyOverwriteCompleted(notifyUploadEvent.getParentId(), notifyUploadEvent.getItemId());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
|
@ -114,12 +118,25 @@ public class WorkspaceUploaderListenerController {
|
|||
* @param itemId the item id
|
||||
*/
|
||||
private void notifyUploadCompleted(String parentId, String itemId){
|
||||
listenersSize();
|
||||
// listenersSize();
|
||||
for (WorskpaceUploadNotificationListener listener : listenersUpload) {
|
||||
listener.onUploadCompleted(parentId, itemId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify overwrite completed.
|
||||
*
|
||||
* @param parentId the parent id
|
||||
* @param itemId the item id
|
||||
*/
|
||||
private void notifyOverwriteCompleted(String parentId, String itemId) {
|
||||
// listenersSize();
|
||||
for (WorskpaceUploadNotificationListener listener : listenersUpload) {
|
||||
listener.onOverwriteCompleted(parentId, itemId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify upload aborted.
|
||||
*
|
||||
|
@ -145,6 +162,11 @@ public class WorkspaceUploaderListenerController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Listeners size.
|
||||
*
|
||||
* @return the int
|
||||
*/
|
||||
private int listenersSize(){
|
||||
GWT.log("listenersUpload.size() "+listenersUpload.size());
|
||||
return listenersUpload.size();
|
||||
|
|
Loading…
Reference in New Issue