History is updated with read operations

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@80900 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2013-08-28 12:36:38 +00:00
parent c1ad652fd4
commit 0e92c54fc9
4 changed files with 15 additions and 12 deletions

View File

@ -1728,7 +1728,7 @@ public class GWTWorkspaceBuilder {
case CREATE:
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.CREATE)){
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALL) || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.CREATE)){
AccountingEntryCreate create = (AccountingEntryCreate) accountingEntry;
af.setOperation(GxtAccountingEntryType.CREATE);
@ -1746,7 +1746,7 @@ public class GWTWorkspaceBuilder {
case READ:
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.READ)){
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALL) || gxtEntryType.equals(GxtAccountingEntryType.READ)){
AccountingEntryRead read = (AccountingEntryRead) accountingEntry;
@ -1768,7 +1768,7 @@ public class GWTWorkspaceBuilder {
case CUT:
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.CUT)){
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALL) || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.CUT)){
af.setOperation(GxtAccountingEntryType.CUT);
@ -1791,7 +1791,7 @@ public class GWTWorkspaceBuilder {
case PASTE:
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.PASTE)){
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALL) || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.PASTE)){
af.setOperation(GxtAccountingEntryType.PASTE);
@ -1804,7 +1804,7 @@ public class GWTWorkspaceBuilder {
case REMOVAL:
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.REMOVE)){
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALL) || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.REMOVE)){
af.setOperation(GxtAccountingEntryType.REMOVE);
@ -1825,7 +1825,7 @@ public class GWTWorkspaceBuilder {
case RENAMING:
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.RENAME)){
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALL) || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.RENAME)){
af.setOperation(GxtAccountingEntryType.RENAME);
@ -1846,7 +1846,7 @@ public class GWTWorkspaceBuilder {
case ADD:
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.ADD)){
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALL) || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.ADD)){
af.setOperation(GxtAccountingEntryType.ADD);
@ -1866,7 +1866,7 @@ public class GWTWorkspaceBuilder {
case UPDATE:
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.UPDATE)){
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALL) || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.UPDATE)){
af.setOperation(GxtAccountingEntryType.UPDATE);

View File

@ -2162,7 +2162,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
WorkspaceItem wsItem = workspace.getItem(identifier);
List<AccountingEntry> accoutings = wsItem.getAccounting();
// List<AccountingEntry> accoutings = wsItem.getAccounting();
GWTWorkspaceBuilder builder = getGWTWorkspaceBuilder();
@ -2192,7 +2192,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
GWTWorkspaceBuilder builder = getGWTWorkspaceBuilder();
List<GxtAccountingField> listReaders = builder.buildGXTAccountingItem(accoutings, GxtAccountingEntryType.ALLWITHOUTREAD);
List<GxtAccountingField> listReaders = builder.buildGXTAccountingItem(accoutings, GxtAccountingEntryType.ALL);
workspaceLogger.trace("get accounting readers - returning size "+listReaders.size());
return listReaders;

View File

@ -4,6 +4,7 @@
package org.gcube.portlets.user.workspace.server.shortener;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
@ -60,7 +61,7 @@ public class UrlEncoderUtil {
for (String key : parameters.keySet()) {
try {
query+=String.format(key+"=%s", URLEncoder.encode(parameters.get(key), charset))+"&";
} catch (UnsupportedEncodingException e) {
logger.error(e);

View File

@ -26,7 +26,9 @@ public enum GxtAccountingEntryType {
UPDATE("Updated", "updated"),
ALLWITHOUTREAD("all", "all");
ALL("all", "all"),
ALLWITHOUTREAD("allwithoutread", "allwithoutread");
private String id;
private String name;