Fixed casting problem on AccountingEntryEnabledPublicAccess and AccountingEntryDisabledPublicAccess

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@132216 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2016-09-30 15:12:02 +00:00
parent 6bdaad24c9
commit a6b996e88e
2 changed files with 5 additions and 4 deletions

View File

@ -167,7 +167,7 @@
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>home-library-jcr</artifactId>
<version>[2.5.0-SNAPSHOT,3.5.0-SNAPSHOT)</version>
<version>[2.5.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
<scope>provided</scope>
<exclusions>
<exclusion>

View File

@ -32,6 +32,8 @@ import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntry;
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryAdd;
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryCreate;
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryCut;
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryDisabledPublicAccess;
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryEnabledPublicAccess;
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryPaste;
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryRead;
import org.gcube.common.homelibrary.home.workspace.accounting.AccountingEntryRemoval;
@ -1860,7 +1862,7 @@ public class GWTWorkspaceBuilder {
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALL) || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.DISABLED_PUBLIC_ACCESS)){
af.setOperation(GxtAccountingEntryType.DISABLED_PUBLIC_ACCESS);
AccountingEntryRestore acc = (AccountingEntryRestore) accountingEntry;
AccountingEntryDisabledPublicAccess acc = (AccountingEntryDisabledPublicAccess) accountingEntry;
String msg = acc.getItemName()==null || acc.getItemName().isEmpty()?"":acc.getItemName()+" ";
msg+=GxtAccountingEntryType.DISABLED_PUBLIC_ACCESS.getName()+" by "+user.getName();
af.setDescription(msg);
@ -1870,11 +1872,10 @@ public class GWTWorkspaceBuilder {
case ENABLED_PUBLIC_ACCESS:
if(gxtEntryType==null || gxtEntryType.equals(GxtAccountingEntryType.ALL) || gxtEntryType.equals(GxtAccountingEntryType.ALLWITHOUTREAD) || gxtEntryType.equals(GxtAccountingEntryType.ENABLED_PUBLIC_ACCESS)){
af.setOperation(GxtAccountingEntryType.ENABLED_PUBLIC_ACCESS);
AccountingEntryRestore acc = (AccountingEntryRestore) accountingEntry;
AccountingEntryEnabledPublicAccess acc = (AccountingEntryEnabledPublicAccess) accountingEntry;
String msg = acc.getItemName()==null || acc.getItemName().isEmpty()?"":acc.getItemName()+" ";
msg+=GxtAccountingEntryType.ENABLED_PUBLIC_ACCESS.getName()+" by "+user.getName();
af.setDescription(msg);