Updated messages to history including version of file if it is present

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@146746 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2017-04-11 10:28:24 +00:00
parent 2e66bcb601
commit 0fdfd5da49
2 changed files with 54 additions and 13 deletions

View File

@ -1,7 +1,8 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-16-1"
date="2017-04-10">
date="2017-04-11">
<Change>Quick fix to set folder as public</Change>
<Change>Updated messages to history including version of file if it is present</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-16-0"
date="2017-03-03">

View File

@ -1675,8 +1675,13 @@ public class GWTWorkspaceBuilder {
String msg = "";
if(create.getItemName()==null || create.getItemName().isEmpty())
msg = GxtAccountingEntryType.CREATE.getId() + " by "+user.getName();
else
msg = create.getItemName() + " " + GxtAccountingEntryType.CREATE.getName() + " by "+user.getName();
else{
if(create.getVersion()==null)
msg = create.getItemName() + " " + GxtAccountingEntryType.CREATE.getName() + " by "+user.getName();
else
msg = create.getItemName() + " v. "+create.getVersion()+" "+ GxtAccountingEntryType.CREATE.getName() + " by "+user.getName();
}
af.setDescription(msg);
}
@ -1694,8 +1699,13 @@ public class GWTWorkspaceBuilder {
String msg = "";
if(read.getItemName()==null || read.getItemName().isEmpty())
msg = GxtAccountingEntryType.READ.getId() + " by "+user.getName();
else
msg = read.getItemName() + " " + GxtAccountingEntryType.READ.getName() + " by "+user.getName();
else{
if(read.getVersion()==null)
msg = read.getItemName() + " " + GxtAccountingEntryType.READ.getName() + " by "+user.getName();
else
msg = read.getItemName() + " v."+read.getVersion() +" "+ GxtAccountingEntryType.READ.getName() + " by "+user.getName();
}
af.setDescription(msg);
}
@ -1712,8 +1722,12 @@ public class GWTWorkspaceBuilder {
String msg = "";
if(cut.getItemName()==null || cut.getItemName().isEmpty())
msg = GxtAccountingEntryType.CUT.getName() +" by "+user.getName();
else
msg = cut.getItemName()+" "+GxtAccountingEntryType.CUT.getName() +" by "+user.getName();
else{
if(cut.getVersion()==null)
msg = cut.getItemName()+" "+GxtAccountingEntryType.CUT.getName() +" by "+user.getName();
else
msg = cut.getItemName()+" v."+cut.getVersion()+" "+GxtAccountingEntryType.CUT.getName() +" by "+user.getName();
}
af.setDescription(msg);
}
@ -1726,7 +1740,11 @@ public class GWTWorkspaceBuilder {
af.setOperation(GxtAccountingEntryType.PASTE);
AccountingEntryPaste paste = (AccountingEntryPaste) accountingEntry;
af.setDescription(GxtAccountingEntryType.PASTE.getName() + " from "+paste.getFromPath()+" by "+user.getName());
if(paste.getVersion()==null)
af.setDescription(GxtAccountingEntryType.PASTE.getName() + " from "+paste.getFromPath()+" by "+user.getName());
else
af.setDescription(GxtAccountingEntryType.PASTE.getName() + " v. "+paste.getVersion()+" from "+paste.getFromPath()+" by "+user.getName());
}
break;
@ -1738,7 +1756,12 @@ public class GWTWorkspaceBuilder {
af.setOperation(GxtAccountingEntryType.REMOVE);
AccountingEntryRemoval rem = (AccountingEntryRemoval) accountingEntry;
String msg = rem.getItemName()==null || rem.getItemName().isEmpty()?"":rem.getItemName()+" ";
msg+= GxtAccountingEntryType.REMOVE.getName() +" by "+user.getName();
if(rem.getVersion()==null)
msg+= GxtAccountingEntryType.REMOVE.getName() +" by "+user.getName();
else
msg+= GxtAccountingEntryType.REMOVE.getName() +" v."+rem.getVersion()+" by "+user.getName();
af.setDescription(msg);
}
break;
@ -1750,7 +1773,11 @@ public class GWTWorkspaceBuilder {
af.setOperation(GxtAccountingEntryType.RENAME);
AccountingEntryRenaming ren = (AccountingEntryRenaming) accountingEntry;
String msg = ren.getOldItemName()==null || ren.getOldItemName().isEmpty()?"":ren.getOldItemName()+" ";
msg+= GxtAccountingEntryType.RENAME.getName() +" to "+ ren.getNewItemName()+ " by "+user.getName();
if(ren.getVersion()==null)
msg+= GxtAccountingEntryType.RENAME.getName() +" to "+ ren.getNewItemName()+ " by "+user.getName();
else
msg+= " v."+ren.getVersion() +" "+GxtAccountingEntryType.RENAME.getName() +" to "+ ren.getNewItemName()+ " by "+user.getName();
af.setDescription(msg);
}
break;
@ -1762,7 +1789,11 @@ public class GWTWorkspaceBuilder {
af.setOperation(GxtAccountingEntryType.ADD);
AccountingEntryAdd acc = (AccountingEntryAdd) accountingEntry;
String msg = acc.getItemName()==null || acc.getItemName().isEmpty()?"":acc.getItemName()+" ";
msg+=GxtAccountingEntryType.ADD.getName()+ " by "+user.getName();
if(acc.getVersion()==null)
msg+=GxtAccountingEntryType.ADD.getName()+ " by "+user.getName();
else
msg+=" v."+acc.getVersion()+ " "+GxtAccountingEntryType.ADD.getName()+ " by "+user.getName();
af.setDescription(msg);
}
break;
@ -1774,7 +1805,11 @@ public class GWTWorkspaceBuilder {
af.setOperation(GxtAccountingEntryType.UPDATE);
AccountingEntryUpdate upd = (AccountingEntryUpdate) accountingEntry;
String msg = upd.getItemName()==null || upd.getItemName().isEmpty()?"":upd.getItemName()+" ";
msg+=GxtAccountingEntryType.UPDATE.getName()+" by "+user.getName();
if(upd.getVersion()==null)
msg+=GxtAccountingEntryType.UPDATE.getName()+" by "+user.getName();
else
msg+=" v."+upd.getVersion()+" "+GxtAccountingEntryType.UPDATE.getName()+" by "+user.getName();
af.setDescription(msg);
}
break;
@ -1819,7 +1854,12 @@ public class GWTWorkspaceBuilder {
af.setOperation(GxtAccountingEntryType.RESTORE);
AccountingEntryRestore acc = (AccountingEntryRestore) accountingEntry;
String msg = acc.getItemName()==null || acc.getItemName().isEmpty()?"":acc.getItemName()+" ";
msg+=GxtAccountingEntryType.RESTORE.getName()+" by "+user.getName();
if(acc.getVersion()==null)
msg+=GxtAccountingEntryType.RESTORE.getName()+" by "+user.getName();
else
msg+=" v."+acc.getVersion()+" "+GxtAccountingEntryType.RESTORE.getName() +" by "+user.getName();
af.setDescription(msg);
}
break;