From 309af54ca5f4ba85f7e1bf9f7ec3305737d46233 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Tue, 23 Jul 2013 18:05:08 +0000 Subject: [PATCH] updated description in history git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@79580 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../accounting/AccoutingInfoContainer.java | 4 ++-- .../workspace/server/GWTWorkspaceBuilder.java | 21 ++++++++++--------- .../accounting/GxtAccountingEntryType.java | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/accounting/AccoutingInfoContainer.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/accounting/AccoutingInfoContainer.java index 12e5117..925ba43 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/accounting/AccoutingInfoContainer.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/accounting/AccoutingInfoContainer.java @@ -116,9 +116,9 @@ public class AccoutingInfoContainer extends LayoutContainer { return Resources.getIconCancel().createImage(); else if(model.get(OPERATION).equals(GxtAccountingEntryType.RENAME)) return Resources.getIconRenameItem().createImage(); - else if(model.get(OPERATION).equals(GxtAccountingEntryType.UPDATED)) + else if(model.get(OPERATION).equals(GxtAccountingEntryType.UPDATE)) return Resources.getIconRefresh().createImage(); - else if(model.get(OPERATION).equals(GxtAccountingEntryType.ADDED)) + else if(model.get(OPERATION).equals(GxtAccountingEntryType.ADD)) return Resources.getIconFileUpload().createImage(); } return null; diff --git a/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceBuilder.java b/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceBuilder.java index fb305c6..1382862 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceBuilder.java +++ b/src/main/java/org/gcube/portlets/user/workspace/server/GWTWorkspaceBuilder.java @@ -27,6 +27,7 @@ import org.gcube.portlets.user.homelibrary.home.workspace.accounting.AccountingE import org.gcube.portlets.user.homelibrary.home.workspace.accounting.AccountingEntryRead; import org.gcube.portlets.user.homelibrary.home.workspace.accounting.AccountingEntryRemoval; import org.gcube.portlets.user.homelibrary.home.workspace.accounting.AccountingEntryRenaming; +import org.gcube.portlets.user.homelibrary.home.workspace.accounting.AccountingEntryUpdate; import org.gcube.portlets.user.homelibrary.home.workspace.folder.FolderBulkCreator; import org.gcube.portlets.user.homelibrary.home.workspace.folder.FolderItem; import org.gcube.portlets.user.homelibrary.home.workspace.folder.items.AquaMapsItem; @@ -1751,7 +1752,7 @@ public class GWTWorkspaceBuilder { af.setOperation(GxtAccountingEntryType.CUT); AccountingEntryCut cut = (AccountingEntryCut) accountingEntry; - + af.setDescription(GxtAccountingEntryType.CUT.getName()+ " "+cut.getItemName()+" by "+user.getName()); } @@ -1765,7 +1766,7 @@ public class GWTWorkspaceBuilder { AccountingEntryPaste paste = (AccountingEntryPaste) accountingEntry; - af.setDescription(GxtAccountingEntryType.PASTE.getName() +" by "+user.getName() +" from path: "+paste.getFromPath()); + af.setDescription(GxtAccountingEntryType.PASTE.getName() + " from "+paste.getFromPath()+" by "+user.getName()); } break; @@ -1790,31 +1791,31 @@ public class GWTWorkspaceBuilder { AccountingEntryRenaming ren = (AccountingEntryRenaming) accountingEntry; - af.setDescription(GxtAccountingEntryType.RENAME.getName()+ " by "+user.getName() +", last name: "+ren.getOldItemName()); + af.setDescription(GxtAccountingEntryType.RENAME.getName()+" from "+ren.getOldItemName() + " by "+user.getName()); } break; case ADD: - if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.ADDED)){ + if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.ADD)){ - af.setOperation(GxtAccountingEntryType.ADDED); + af.setOperation(GxtAccountingEntryType.ADD); AccountingEntryAdd acc = (AccountingEntryAdd) accountingEntry; - af.setDescription(GxtAccountingEntryType.ADDED.getName()+ " by "+user.getName()); + af.setDescription(GxtAccountingEntryType.ADD.getName()+ " " +acc.getItemName() + " by "+user.getName()); } break; case UPDATE: - if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.UPDATED)){ + if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.UPDATE)){ - af.setOperation(GxtAccountingEntryType.UPDATED); + af.setOperation(GxtAccountingEntryType.UPDATE); -// AccountingEntryUpdate acc = (AccountingEntryUpdate) accountingEntry; + AccountingEntryUpdate acc = (AccountingEntryUpdate) accountingEntry; - af.setDescription(GxtAccountingEntryType.UPDATED.getName()+ " by "+user.getName()); + af.setDescription(GxtAccountingEntryType.UPDATE.getName()+ " "+acc.getItemName() +" by "+user.getName()); } break; } diff --git a/src/main/java/org/gcube/portlets/user/workspace/shared/accounting/GxtAccountingEntryType.java b/src/main/java/org/gcube/portlets/user/workspace/shared/accounting/GxtAccountingEntryType.java index 08feea4..50e52de 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/shared/accounting/GxtAccountingEntryType.java +++ b/src/main/java/org/gcube/portlets/user/workspace/shared/accounting/GxtAccountingEntryType.java @@ -22,9 +22,9 @@ public enum GxtAccountingEntryType { READ("read", "Read"), - ADDED("added", "Added"), + ADD("added", "Added"), - UPDATED("updated", "Updated"), + UPDATE("updated", "Updated"), ALLWITHOUTREAD("all", "all");