Massimiliano Assante 11 years ago
parent 70f7ad29f6
commit 0e512c18a9

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>WorkspaceTree</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
</natures>
</projectDescription>

@ -0,0 +1,5 @@
#Wed Jun 27 12:10:12 CEST 2012
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
warSrcDir=
warSrcDirIsOutput=true

@ -0,0 +1,5 @@
#Mon May 07 16:37:03 CEST 2012
eclipse.preferences.version=1
entryPointModules=
filesCopiedToWebInfLib=gwt-servlet.jar
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBW11dPjwvZXh0cmEtYXJncz48dm0tYXJncz48IVtDREFUQVstWG14NTEybV1dPjwvdm0tYXJncz48ZW50cnktcG9pbnQtbW9kdWxlPm9yZy5nY3ViZS5wb3J0bGV0cy51c2VyLndvcmtzcGFjZS5Xb3Jrc3BhY2VUcmVlPC9lbnRyeS1wb2ludC1tb2R1bGU+PC9nd3QtY29tcGlsZS1zZXR0aW5ncz4\=

@ -0,0 +1,4 @@
#Wed Feb 06 15:12:34 CET 2013
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding/<project>=UTF-8

@ -0,0 +1,6 @@
#Wed Feb 06 15:12:34 CET 2013
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6

@ -0,0 +1,5 @@
#Wed Feb 06 15:08:01 CET 2013
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

@ -0,0 +1,6 @@
gCube System - License
------------------------------------------------------------
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
The software and documentation is provided by its authors/distributors "as is" and no expressed or
implied warranty is given for its use, quality or fitness for a particular case.

@ -0,0 +1,2 @@
* Federico De Faveri (federico.defaveri@isti.cnr.it), CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"
* Francesco Mangiacrapa (francesco.mangiacrapa@isti.cnr.it), CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"

@ -0,0 +1,53 @@
The gCube System - WorkspaceTree
------------------------------------------------------------
This work is partially funded by the European Commission in the
context of the iMarine project (http://www.i-marine.eu).
Authors
-------
* Federico De Faveri (federico.defaveri@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".
* Francesco Mangiacrapa (francesco.mangiacrapa@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".
Version and Release Date
------------------------
v. 5.0.0
Description
-----------
The WorkspaceTree is a part of a portlet for users workspace management.
Download information
--------------------
Source code is available from SVN:
http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/WorkspaceTree
Binaries can be downloaded from:
n/a
Documentation
-------------
Documentation is available on-line from the Projects Documentation Wiki:
https://gcube.wiki.gcube-system.org/gcube/index.php/Workspace
Licensing
---------
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

@ -0,0 +1,71 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.5-1-0" date="2012-09-21">
<Change>Old Send Message removed, added support for new mail sender</Change>
<Change>Bug fixed: upload file/archive</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.5-0-0" date="2012-05-04">
<Change>#216 New version of Workspace Tree is developed using the GXT framework</Change>
<Change>#216 New tree is asynchronous</Change>
<Change>#216 Reviews tree GUI and adding new features</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.4-3-0" date="2011-09-01">
<Change>#1740: ICIS / Download csv / added extension .xlw</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.4-2-0" date="2011-07-01">
<Change>#1555: WorkflowTemplate and WorkflowReport required in Workspace Portlet</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.4-1-0" date="2011-05-06">
<Change>Synch with others changes in HomeLibrary</Change>
<Change>GWT 2.2.0</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.4-0-0" date="2011-02-07">
<Change>Removed Workspace and Basket type, replaced with folder option</Change>
<Change>Synch with others changes in HomeLibrary</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.3-2-1" date="2010-11-09">
<Change>Added more checks on GWT model construction</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.3-2-0" date="2010-10-22">
<Change>Enabled details panel for Report, ReportTemplate and AquaMapsItem workspace items</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.3-1-0" date="2010-09-03">
<Change>#36: ICIS / Workspace / Upload an archive</Change>
<Change>Merged ThumbnailServlet and ImageServlet</Change>
<Change>#774: Workspace portlet tree - Open Report / Template redirect link not working</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.3-0-0" date="2010-07-16">
<Change>Ported to GWT 2.0</Change>
<Change>Updated project structure to WebPortlet</Change>
<Change>Update to LifeRay portal</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.2-6-0" date="2010-05-14">
<Change>#424: Workspace code refactoring an enanchement</Change>
<Change>refactored code</Change>
<Change>uniformed icons, no more specialized action icons</Change>
<Change>added more informations on items like AquaMapsItem, Report and Report Template</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.2-5-0" date="2010-01-29">
<Change>gcube release 1.7.0</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.2-4-0" date="2009-11-30">
<Change>gcube release 1.6.0</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.2-3-0" date="2009-11-16">
<Change>gcube release 1.5.0</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.2-2-0" date="2009-10-16">
<Change>gcube release</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.2-1-1" date="2009-07-29">
<Change>gcube release 1.2.2</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.2-1-0" date="2009-07-14">
<Change>gcube release 1.2.0</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.2-0-0" date="2009-05-19">
<Change>gcube release 1.2.0 rc1</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.1-1-2" date="2009-01-12">
<Change>first release</Change>
</Changeset>
</ReleaseNotes>

@ -0,0 +1,48 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>servicearchive</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>/</baseDirectory>
<fileSets>
<fileSet>
<directory>${distroDirectory}</directory>
<outputDirectory>/</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>README</include>
<include>LICENSE</include>
<include>INSTALL</include>
<include>MAINTAINERS</include>
<include>changelog.xml</include>
</includes>
<fileMode>755</fileMode>
<filtered>true</filtered>
</fileSet>
<fileSet>
<directory>target/apidocs</directory>
<outputDirectory>/${artifactId}/doc/api</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<fileMode>755</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>${distroDirectory}/profile.xml</source>
<outputDirectory>./</outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>target/${build.finalName}.jar</source>
<outputDirectory>/${artifactId}</outputDirectory>
</file>
<file>
<source>${distroDirectory}/svnpath.txt</source>
<outputDirectory>/${artifactId}</outputDirectory>
<filtered>true</filtered>
</file>
</files>
</assembly>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID></ID>
<Type>Library</Type>
<Profile>
<Description>${description}</Description>
<Class>PortletsUser</Class>
<Name>${artifactId}</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Name>${artifactId}</Name>
<Version>${version}</Version>
<MavenCoordinates>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
</MavenCoordinates>
<Files>
<File>${build.finalName}.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

@ -0,0 +1 @@
${scm.url}

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="service.xsd">
<ID/>
<Type>Service</Type>
<Profile>
<Description>Workspace Portlet Tree</Description>
<Class>Portal</Class>
<Name>WorkspacePortletTree</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Description>WorkspaceTree</Description>
<Name>WorkspaceTree</Name>
<Version>5.1.0</Version>
<Dependencies>
<Dependency>
<Service>
<Class>ApplicationSupportLayer</Class>
<Name>ASLCore</Name>
<Version>1.0.0</Version>
</Service>
<Package>ASLCore</Package>
<Version>[2.0.0,3.0.0)</Version>
<Scope level="GHN"/>
<Optional>false</Optional>
</Dependency>
<Dependency>
<Service>
<Class>PortletsUser</Class>
<Name>HomeLibrary</Name>
<Version>1.0.0</Version>
</Service>
<Package>HomeLibrary</Package>
<Version>[5.0.0,6.0.0)</Version>
<Scope level="GHN"/>
<Optional>false</Optional>
</Dependency>
<Dependency>
<Service>
<Class>ExternalSoftware</Class>
<Name>commons-fileupload</Name>
<Version>1.02.01</Version>
</Service>
<Package>commons-fileupload</Package>
<Version>1.02.01</Version>
<Scope level="GHN"/>
<Optional>false</Optional>
</Dependency>
</Dependencies>
<Files>
<File>lib/WorkspaceTree.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

@ -0,0 +1,245 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId>
<version>1.0.0</version>
<relativePath />
</parent>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>workspace-tree-widget</artifactId>
<version>6.0.0-SNAPSHOT</version>
<name>gCube Workspace Tree Widget</name>
<description>
gCube Workspace Tree Widget.
</description>
<scm>
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</connection>
<developerConnection>scm:https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</developerConnection>
<url>http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</url>
</scm>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.4.0</gwtVersion>
<distroDirectory>distro</distroDirectory>
<!-- GWT needs at least java 1.6 -->
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<!-- This dependency is needed to use GWT UI BInder without old Xerces
version of gCore complaining -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
<scope>provided</scope>
</dependency>
<!-- Google Web Toolkit (GWT) -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<!-- "provided" so that we don't deploy -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sencha.gxt</groupId>
<artifactId>gxt</artifactId>
<version>2.2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>custom-portal-handler</artifactId>
<version>[1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-widgets</artifactId>
<version>[1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslcore</artifactId>
<version>[3.2.0-SNAPSHOT, 4.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>home-library</artifactId>
<version>[4.3.0-SNAPSHOT, 5.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>home-library-jcr</artifactId>
<version>[1.3.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<version>6.0.6</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-profile</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target</outputDirectory>
<resources>
<resource>
<directory>${distroDirectory}</directory>
<filtering>true</filtering>
<includes>
<include>profile.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<configuration>
<descriptors>
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
</descriptors>
<archive>
<manifest>
<mainClass>fully.qualified.MainClass</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>servicearchive</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<!-- TODO: Update version to 2.5.0 once gwt-maven-plugin 2.5.0 final
is released (post-GWT 2.5.0) -->
<version>2.4.0</version>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
</dependency>
</dependencies>
<!-- JS is only needed in the package phase, this speeds up testing -->
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin
documentation at codehaus.org -->
<configuration>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='workspacetree'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.resources.Resources' />
<!-- For development, a default of `DEBUG` is recommended
<inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" />-->
<!-- Other module inherits -->
<!-- Moduel GXT -->
<inherits name='com.extjs.gxt.ui.GXT'/>
<servlet path="/WorkspaceService" class="org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl" />
<!--
<servlet path="/ImageService" class="org.gcube.portlets.user.workspace.server.ImageServlet" />
<servlet path="/MetadataService" class="org.gcube.portlets.user.workspace.server.MetadataServlet" />
-->
<servlet path="/UploadService" class="org.gcube.portlets.user.workspace.server.UploadServlet" />
<servlet path="/DownloadService" class="org.gcube.portlets.user.workspace.server.DownloadServlet" />
<servlet path="/ImageService" class="org.gcube.portlets.user.workspace.server.ImageServlet" />
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
</module>

@ -0,0 +1,202 @@
package org.gcube.portlets.user.workspace.client;
import com.google.gwt.core.client.GWT;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class ConstantsExplorer {
// public static final String FILE_SERVICE = GWT.getModuleBaseURL() + "fileservice";
public static final String RPC_WORKSPACE_SERVICE = GWT.getModuleBaseURL() + "rpcWorkspace";
public static final String UPLOAD_WORKSPACE_SERVICE = GWT.getModuleBaseURL() + "UploadService";
public static final String DOWNLOAD_WORKSPACE_SERVICE = GWT.getModuleBaseURL() + "DownloadService";
public static final String SERVER_ERROR = "Sorry, an error has occurred on the server when";
public static final String TRY_AGAIN = "Try again";
//MESSAGE DIALOG BOX constants
public static final String MESSAGE_CONFIRM_DELETE_ITEM = "Are you sure you want to delete item";
public static final String MESSAGE_CONFIRM_DELETE_SMART_FOLDER = "Are you sure you want to delete smart folder";
public static final String MESSAGE_ADD_SMART_FOLDER = "Add Smart Folder";
public static final String MESSAGE_ADD_FOLDER = "Add Folder";
public static final String MESSAGE_ADD_SHARED_FOLDER = "Add Shared Folder";
public static final String MESSAGE_ADD = "Add";
public static final String MESSAGE_ADD_FOLDER_IN = "Add Folder in: ";
public static final String MESSAGE_ITEM_NAME = "Item Name";
public static final String MESSAGE_RENAME = "Rename";
public static final String MESSAGE_DELETE_ITEM = "Delete Item";
public static final String MESSAGE_DELETE = "Delete";
public static final String MESSAGE_UPLOAD_FILE = "Upload File";
public static final String MESSAGE_UPLOAD_ARCHIVE = "Upload Archive";
public static final String MESSAGE_FOLDER_NAME = "Folder Name";
public static final String MESSAGE_SMART_FOLDER_NAME = "Smart Folder Name";
public static final String LOADING = "Loading";
public static final String LOADINGSTYLE = "x-mask-loading";
public static final String VALIDATINGOPERATION = "Validating operation";
public static final String MESSAGE_DOWNLOAD_ITEM = "Download Item";
public static final String MESSAGE_PREVIEW = "Preview";
public static final String MESSAGE_SHOW = "Show";
public static final String MESSAGE_OPEN_URL = "Open Url";
public static final String MESSAGE_ADD_URL = "Add Url";
public static final String MESSAGE_ADD_URL_IN = "Add Url in:";
public static final String MESSAGE_OPEN_REPORT_TEMPLATE = "Open R. Template";
public static final String MESSAGE_OPEN_REPORT = "Open Report";
public static final String MESSAGE_SEND_TO = "Send to";
public static final String MESSAGE_SENT_IN_DATE = "Sent in date";
public static final String MESSAGE_ADD_CONTACT = "Add Contact";
public static final String MESSAGE_ADD_SUBJECT = "Add Subject";
public static final String MESSAGE_ERROR_OCCURED = "Sorry an error has occurred while processing your request";
public static final String INFO = "Info";
public static final String MESSAGE_SEND_TO_OK = "Your message has been successfully delivered";
public static final String COPYITEM = "Copy";
public static final String PASTEITEM = "Paste";
public static final String MESSAGE_REFRESH_FOLDER = "Refresh Folder";
public static final String LISTATTACHMENTSNAMES = "Attachments Names";
public static final String LISTCONTACTSTOSTRING = "ListContactToString";
public static final String STATUS = "Status";
public static final String LOADER = "Loader";
public static final String DOWNLOADSTATE = "DownloadState";
public static final String NUMFAILS = "numfails";
public static final String NUMREQUESTS = "numrequests";
public static final String MESSAGE_WEBDAV_URL = "View Url WebDAV ";
public static final String URL_WEBDAV = "WebDAV URL";
public static final String MESSAGE_NAME_FORCE_APHANUMERIC = "Field name must be alphanumeric and not contain special chars!";
public static final String MESSAGE_SEARCH_FORCE_APHANUMERIC = "Field search must be alphanumeric and not contain special chars!";
public static final String MESSAGE_CREATE_NEW_MESSAGE = "Create New Message";
public static final String FORWARDTO = "Forward to";
public static final String MESSAGETYPE = "Message Type";
public static final String WEBDAVURLLINKREADMORE = "https://gcube.wiki.gcube-system.org/gcube/index.php/Acces_workspace_from_Desktop_(via_WebDAV)";
public static final String TITLEACCESSWEBDAV = "Access from Desktop";
public static final String ACCESSWEBDAVMSG = "Files and folders can be managed directly from the file explorer of your desktop operating system.";
public static final String FILEUPLOADHEADER = "File upload in: ";
public static final String FILE = "File";
public static final String ERROR = "Error";
public static final String NOFILESPECIFIED = "No file specified";
public static final String PROGRESS = "Progress";
public static final String SAVINGYOURFILE = "Saving your file";
public static final String PREVIEWOF = "Preview of: ";
public static final String ARCHIVEUPLOADHEADER = "Archive upload in: ";
public static final String ARCHIVE = "Archive";
public static final String DIALOG_DESCRIPTION = "Description";
public static final String DIALOG_NAME = "Name";
public static final String DIALOG_URL = "Url";
public static final String ERRORURLNOTREACHABLE = "Error: url is not reachable!";
//FILE MODEL e Smart Folder constants
public static final String ROOT = "root";
public static final String NAME = "Name";
public static final String TYPE = "Type";
public static final String ICON = "Icon";
public static final String SHORTCUTCATEGORY = "Category";
// public static final String GRIDCOLUMNTYPE = "Type";
public static final String IDENTIFIER = "identifier";
public static final String FOLDERITEMTYPE = "folderItemType";
public static final String PARENT = "parent";
public static final String ISDIRECTORY = "isDirectory";
public static final String SHAREUSERS = "shareUsers";
public static final String ISSHARED = "isShared";
public static final String LASTMODIFIED = "lastModified";
public static final String DESCRIPTION = "description";
public static final String OWNER = "owner";
public static final String QUERY = "query";
public static final String FOLDERNOTLOAD = "notload";
public static final String FOLDERLOADED = "loaded";
public static final String MARKASREAD = "MARKASREAD";
public static final String ISROOT = "ISROOT";
//GRID COLUMNS constants
public static final String GRIDCOLUMNCREATIONDATE = "Creation Date";
public static final String SIZE = "Size";
public static final String EMPTY = "EMPTY";
//ID CONTEXT MENU
public static final String INS = "INS"; //Insert Folder
public static final String ADD = "ADD";
public static final String REM = "REM";
public static final String UPL = "UPL"; //Upload File
public static final String DWL = "DWL";
public static final String PRW = "PRW";
public static final String RNM = "RNM";
public static final String ISHF = "ASHF"; //Insert shared Folder
public static final String SHR = "SHR"; //SHARE
public static final String USHR = "USHR"; //UNSHARE
public static final String UPA = "UPA"; //Upload Archive
public static final String LNK = "LNK";
public static final String SHW = "SHW";
public static final String CLK = "CLK"; //Add Url
public static final String ORT = "ORT"; //Open report template
public static final String ORP = "ORP"; //Open report
public static final String SDT = "SDT"; //Send to
public static final String DWM = "DWN"; //Get all new messages
public static final String MKR = "MKR"; //Mark as read
public static final String MKNR = "MKNR"; //Mark as not read
public static final String DLM = "DLM"; //Delete message
public static final String FWM = "FWM"; //Forward message
public static final String CPI = "CPI"; //copy item
public static final String PSI = "PSI"; //paste
public static final String RFH = "RFH"; //Refresh
public static final String WDV = "WDV"; //WebDav
public static final String CNM = "CNM"; //Create new message
//ID CONTEXT MENU IN GRID
public static final String OPM = "OPM"; //Open message
public static final String SVA = "SVA"; //Save attachs
public static final String MESSAGE_SAVE_ATTACHS = "Save Attachments";
//Toolbar Item Name
public static final String TREE = "Tree";
public static final String SMARTFOLDER = "Smart Folder";
public static final String MESSAGES = "Messages";
public static final String SHORTCUTVIEW = "Shortcut View";
public static final String TREEVIEW = "Tree View";
//Used in set value in session
public static final String IDTEMPLATE = "idtemplate";
public static final String TEMPLATECREATION = "template-creation";
public static final String IDREPORT = "idreport";
public static final String REPORTGENERATION = "report-generation";
//Info contact constant
public static final String LOGIN = "login";
//GRID COLUMN ADD CONTACT
public static final String GRIDCOLUMNLOGIN = "Login";
public static final String SUBJECT = "Subject";
public static final String FROM = "From";
public static final String DATE = "Date";
public static final String NUMATTACHS = "Num Attachs";
public static final String FROMLOGIN = "From Contact";
public static final String LISTCONTACTSTO = "ListContactsTo";
public static final String LISTATTACHS = "ListAttachs";
public static final String TEXTMESS = "TextMess";
public static final String ISREAD = "IsRead";
//Message grid and context menu
public static final String MESSAGE_GET_ALL_NEW_MESSAGES = "Get all new messages";
public static final String MESSAGE_MARK_AS_READ = "Mark as Read";
public static final String MESSAGE_MARK_AS_NOTREAD = "Mark as Not Read";
public static final String MESSAGE_DELETE_MESSAGE = "Delete Message";
public static final String MESSAGE_FORWARD_MESSAGE = "Forward Message";
public static final String MESSAGE_REPLY = "Reply";
public static final String MESSAGE_REPLY_ALL = "Reply All";
//USED in message model
public static final String ID = "id";
public static final String ATTACHS = "Attachs";
public static final Object NONE = "None";
public static final String ABSTRACTICON = "Abstract Icon";
public enum ViewSwitchType {Tree, SmartFolder, Messages};
}

@ -0,0 +1,33 @@
package org.gcube.portlets.user.workspace.client;
import org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService;
import org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceServiceAsync;
import com.extjs.gxt.ui.client.Registry;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class TreeAsync implements EntryPoint {
/**
* Create a remote service proxy to talk to the server-side
*/
private final GWTWorkspaceServiceAsync rpcWorkspaceService = (GWTWorkspaceServiceAsync) GWT.create(GWTWorkspaceService.class);
/**
* This is the entry point method.
*/
public void onModuleLoad() {
Registry.register(ConstantsExplorer.RPC_WORKSPACE_SERVICE, rpcWorkspaceService);
//UNCOMMENT FOLLOWING TO USE ONLY TREE
// AppControllerExplorer appController = new AppControllerExplorer();
// appController.go(RootPanel.get("treePanelWs"), true);
}
}

@ -0,0 +1,59 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import org.gcube.portlets.user.workspace.client.model.FolderModel;
import com.google.gwt.event.shared.GwtEvent;
public class AddFolderEvent extends GwtEvent<AddFolderEventHandler> implements GuiEventInterface{
public static Type<AddFolderEventHandler> TYPE = new Type<AddFolderEventHandler>();
private FileModel fileSourceModel = null; //File or Folder source click
private FileModel parentFileModel = null;
private FolderModel newFolder;
// public AddFolderEvent(FolderModel newFolder, FolderModel parentFileModel) {
// this.newFolder = newFolder;
// this.parentFileModel = parentFileModel;
// }
public AddFolderEvent(FileModel fileSourceModel, FileModel parentFileModel) {
this.fileSourceModel = fileSourceModel;
this.parentFileModel = parentFileModel;
}
@Override
public Type<AddFolderEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(AddFolderEventHandler handler) {
handler.onAddItem(this);
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.ADDED_FOLDER_EVENT;
}
public FileModel getFileSourceModel() {
return fileSourceModel;
}
public FileModel getParentFileModel() {
return parentFileModel;
}
public void setNewFolder(FolderModel folder){
this.newFolder = folder;
}
public FolderModel getNewFolder() {
return newFolder;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface AddFolderEventHandler extends EventHandler {
void onAddItem(AddFolderEvent event);
}

@ -0,0 +1,63 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.GwtEvent;
public class AddSmartFolderEvent extends GwtEvent<AddSmartFolderEventHandler>{
public static Type<AddSmartFolderEventHandler> TYPE = new Type<AddSmartFolderEventHandler>();
private String smartFolderName;
private String searchText;
private String workpaceFolderId;
private String description;
// public AddSmartFolderEvent(String smartFolderName, String searchText, String workpaceFolderId) {
//
// this.smartFolderName = smartFolderName;
// this.searchText = searchText;
// this.workpaceFolderId = workpaceFolderId;
// }
public AddSmartFolderEvent(String searchText) {
this.searchText = searchText;
}
@Override
public Type<AddSmartFolderEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(AddSmartFolderEventHandler handler) {
handler.onSaveSmartFolder(this);
}
public String getSmartFolderName() {
return smartFolderName;
}
public String getSearchText() {
return searchText;
}
public String getWorkpaceFolderId() {
return workpaceFolderId;
}
public void setSmartFolderName(String smartFolderName) {
this.smartFolderName = smartFolderName;
}
public void setWorkpaceFolderId(String workpaceFolderId) {
this.workpaceFolderId = workpaceFolderId;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface AddSmartFolderEventHandler extends EventHandler {
void onSaveSmartFolder(AddSmartFolderEvent saveSmartFolderEvent);
}

@ -0,0 +1,31 @@
package org.gcube.portlets.user.workspace.client.event;
import java.util.List;
import org.gcube.portlets.user.workspace.client.model.BulkCreatorModel;
import com.google.gwt.event.shared.GwtEvent;
public class BulkCreatorEvent extends GwtEvent<BulkCreatorEventHandler> {
public static Type<BulkCreatorEventHandler> TYPE = new Type<BulkCreatorEventHandler>();
private List<BulkCreatorModel> listBulks;
public BulkCreatorEvent(List<BulkCreatorModel> listBulks) {
this.listBulks = listBulks;
}
@Override
public Type<BulkCreatorEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(BulkCreatorEventHandler handler) {
handler.onBulkCreator(this);
}
public List<BulkCreatorModel> getListBulks() {
return listBulks;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface BulkCreatorEventHandler extends EventHandler {
void onBulkCreator(BulkCreatorEvent bulkCreatorEvent);
}

@ -0,0 +1,48 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class CompletedFileUploadEvent extends GwtEvent<CompletedFileUploadEventHandler> implements GuiEventInterface{
public static Type<CompletedFileUploadEventHandler> TYPE = new Type<CompletedFileUploadEventHandler>();
private FileModel parentFileModel;
private String itemIdentifier;
public CompletedFileUploadEvent(FileModel parent, String itemIdentifier) {
this.parentFileModel = parent;
this.itemIdentifier = itemIdentifier;
}
@Override
public Type<CompletedFileUploadEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(CompletedFileUploadEventHandler handler) {
handler.onCompletedFileUploadEvent(this);
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.COMPLETED_FILE_UPLOAD_EVENT;
}
public FileModel getParentFileModel() {
return parentFileModel;
}
public String getItemIdentifier() {
return itemIdentifier;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface CompletedFileUploadEventHandler extends EventHandler {
void onCompletedFileUploadEvent(CompletedFileUploadEvent completedFileUploadEvent);
}

@ -0,0 +1,56 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
public class CreateSharedFolderEvent extends GwtEvent<CreateSharedFolderEventHandler>{
public static Type<CreateSharedFolderEventHandler> TYPE = new Type<CreateSharedFolderEventHandler>();
private FileModel fileSourceModel = null; //File or Folder source click
private FileModel parentFileModel = null;
private boolean isNewFolder;
public boolean isNewFolder() {
return isNewFolder;
}
@Override
public Type<CreateSharedFolderEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(CreateSharedFolderEventHandler handler) {
handler.onCreateSharedFolder(this);
}
/**
*
* @param fileSourceModel
* @param parentFileModel
* @param isNewFolder
*/
public CreateSharedFolderEvent(FileModel fileSourceModel, FileModel parentFileModel, boolean isNewFolder) {
this.fileSourceModel = fileSourceModel;
this.parentFileModel = parentFileModel;
this.isNewFolder = isNewFolder;
}
public FileModel getFileSourceModel() {
return fileSourceModel;
}
public FileModel getParentFileModel() {
return parentFileModel;
}
// public void setNewFolder(FolderModel folder){
// this.newFolder = folder;
// }
//
// public FolderModel getNewFolder() {
// return newFolder;
// }
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface CreateSharedFolderEventHandler extends EventHandler {
void onCreateSharedFolder(CreateSharedFolderEvent createSharedFolderEvent);
}

@ -0,0 +1,52 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class CreateUrlEvent extends GwtEvent<CreateUrlEventHandler> implements GuiEventInterface{
public static Type<CreateUrlEventHandler> TYPE = new Type<CreateUrlEventHandler>();
private FileModel parentFileModel;
private String itemIdentifier;
public CreateUrlEvent(String itemIdentifier, FileModel parent) {
this.parentFileModel = parent;
this.itemIdentifier = itemIdentifier;
}
@Override
public Type<CreateUrlEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(CreateUrlEventHandler handler) {
handler.onClickCreateUrl(this);
}
public FileModel getParentFileModel() {
return parentFileModel;
}
public void setParentFileModel(FileModel parentFileModel) {
this.parentFileModel = parentFileModel;
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.ADDED_FILE_EVENT;
}
public String getItemIdentifier() {
return itemIdentifier;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface CreateUrlEventHandler extends EventHandler {
void onClickCreateUrl(CreateUrlEvent createUrlEvent);
}

@ -0,0 +1,34 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class DeleteBulkEvent extends GwtEvent<DeleteBulkEventHandler> {
public static Type<DeleteBulkEventHandler> TYPE = new Type<DeleteBulkEventHandler>();
private String bulkId = null;
public DeleteBulkEvent(String bulkId) {
this.bulkId = bulkId;
}
@Override
public Type<DeleteBulkEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(DeleteBulkEventHandler handler) {
handler.onDeleteBulk(this);
}
public String getBulkId() {
return bulkId;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface DeleteBulkEventHandler extends EventHandler {
void onDeleteBulk(DeleteBulkEvent deleteBulkEvent);
}

@ -0,0 +1,39 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
public class DeleteItemEvent extends GwtEvent<DeleteItemEventHandler> implements GuiEventInterface{
public static Type<DeleteItemEventHandler> TYPE = new Type<DeleteItemEventHandler>();
private FileModel fileTarget = null;
public DeleteItemEvent(FileModel fileModel) {
this.fileTarget = fileModel;
}
@Override
public Type<DeleteItemEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(DeleteItemEventHandler handler) {
handler.onDeleteItem(this);
}
@Override
public EventsTypeEnum getKey() {
// TODO Auto-generated method stub
return EventsTypeEnum.DELETE_ITEM_EVENT;
}
public FileModel getFileTarget() {
return fileTarget;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface DeleteItemEventHandler extends EventHandler {
void onDeleteItem(DeleteItemEvent deleteItemEvent);
}

@ -0,0 +1,37 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.MessageModel;
import com.google.gwt.event.shared.GwtEvent;
public class DeleteMessageEvent extends GwtEvent<DeleteMessageEventHandler> implements GuiEventInterface{
public static Type<DeleteMessageEventHandler> TYPE = new Type<DeleteMessageEventHandler>();
private MessageModel messageTarget = null;
public DeleteMessageEvent(MessageModel messageModel) {
this.messageTarget = messageModel;
}
@Override
public Type<DeleteMessageEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(DeleteMessageEventHandler handler) {
handler.onDeleteMessage(this);
}
public MessageModel getMessageTarget() {
return messageTarget;
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.DELETED_MESSAGE;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface DeleteMessageEventHandler extends EventHandler {
void onDeleteMessage(DeleteMessageEvent deleteMessageEvent);
}

@ -0,0 +1,57 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class DeleteSmartFolderEvent extends GwtEvent<DeleteSmartFolderEventHandler> implements GuiEventInterface{
public static Type<DeleteSmartFolderEventHandler> TYPE = new Type<DeleteSmartFolderEventHandler>();
private String smartIdentifier;
private String smartName;
// public DeleteSmartFolderEvent(FileModel fileModel) {
// this.fileTarget = fileModel;
// }
public DeleteSmartFolderEvent(String identifier, String name) {
this.smartIdentifier = identifier;
this.smartName = name;
}
@Override
public Type<DeleteSmartFolderEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(DeleteSmartFolderEventHandler handler) {
handler.onDeleteItem(this);
}
@Override
public EventsTypeEnum getKey() {
// TODO Auto-generated method stub
return EventsTypeEnum.DELETE_SMARTFOLDER_ITEM_EVENT;
}
public String getSmartIdentifier() {
return smartIdentifier;
}
public String getSmartName() {
return smartName;
}
// public FileModel getFileTarget() {
// return fileTarget;
// }
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface DeleteSmartFolderEventHandler extends EventHandler {
void onDeleteItem(DeleteSmartFolderEvent deleteSmartFolderEvent);
}

@ -0,0 +1,43 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FolderModel;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class ExpandFolderEvent extends GwtEvent<ExpandFolderEventHandler> implements GuiEventInterface{
public static Type<ExpandFolderEventHandler> TYPE = new Type<ExpandFolderEventHandler>();
private FolderModel folderTarget = null;
public ExpandFolderEvent(FolderModel folder) {
this.folderTarget = folder;
}
@Override
public Type<ExpandFolderEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(ExpandFolderEventHandler handler) {
handler.onExpandFolder(this);
}
@Override
public EventsTypeEnum getKey() {
// TODO Auto-generated method stub
return EventsTypeEnum.EXPANDED_FOLDER_EVENT;
}
public FolderModel getFolderTarget() {
return folderTarget;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface ExpandFolderEventHandler extends EventHandler {
void onExpandFolder(ExpandFolderEvent expandFolderEvent);
}

@ -0,0 +1,58 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.GwtEvent;
public class FileDownloadEvent extends GwtEvent<FileDownloadEventHandler> {
public static Type<FileDownloadEventHandler> TYPE = new Type<FileDownloadEventHandler>();
public enum DownloadType {SHOW, DOWNLOAD};
private String itemIdentifier = null;
private DownloadType downloadType;
private String itemName;
// private FileType fileType;
// public enum FileType {TREE, ATTACH};
public FileDownloadEvent(String itemIdentifier, String name, DownloadType downloadType) {
this.itemIdentifier = itemIdentifier;
this.downloadType = downloadType;
this.itemName = name;
// this.fileType = fileType;
}
@Override
public Type<FileDownloadEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(FileDownloadEventHandler handler) {
handler.onFileDownloadEvent(this);
}
public String getDownloadTypeToString() {
return downloadType.toString();
}
public DownloadType getDownloadType() {
return downloadType;
}
public String getItemIdentifier() {
return itemIdentifier;
}
public String getItemName() {
return itemName;
}
// public FileType getFileType() {
// return fileType;
// }
//
// public String getFileTypeToString() {
// return fileType.toString();
// }
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface FileDownloadEventHandler extends EventHandler {
void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent);
}

@ -0,0 +1,47 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
public class FileUploadEvent extends GwtEvent<FileUploadEventHandler> implements GuiEventInterface{
public static Type<FileUploadEventHandler> TYPE = new Type<FileUploadEventHandler>();
public enum UploadType {ARCHIVE, FILE};
private FileModel parentFileModel = null;
private UploadType uploadType;
public FileUploadEvent(FileModel parentFileModel, UploadType uploadType) {
this.parentFileModel = parentFileModel;
this.uploadType = uploadType;
}
@Override
public Type<FileUploadEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(FileUploadEventHandler handler) {
handler.onFileUploadEvent(this);
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.FILE_UPLOAD_EVENT;
}
public FileModel getParentFileModel() {
return parentFileModel;
}
public UploadType getUploadType() {
return uploadType;
}
public String getUploadTypeToString() {
return uploadType.toString();
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface FileUploadEventHandler extends EventHandler {
void onFileUploadEvent(FileUploadEvent fileUploadEvent);
}

@ -0,0 +1,29 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.GwtEvent;
public class FilterScopeEvent extends GwtEvent<FilterScopeEventHandler> {
public static Type<FilterScopeEventHandler> TYPE = new Type<FilterScopeEventHandler>();
private String scopeId;
public FilterScopeEvent(String scopeId) {
this.scopeId = scopeId;
}
@Override
public Type<FilterScopeEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(FilterScopeEventHandler handler) {
handler.onClickScopeFilter(this);
}
public String getScopeId() {
return scopeId;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface FilterScopeEventHandler extends EventHandler {
void onClickScopeFilter(FilterScopeEvent filterScopeEvent);
}

@ -0,0 +1,44 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
public class ImagePreviewEvent extends GwtEvent<ImagePreviewEventHandler> {
public static Type<ImagePreviewEventHandler> TYPE = new Type<ImagePreviewEventHandler>();
private FileModel sourceFileModel = null; //Image File source click
private int clientX;
private int clientY;
public ImagePreviewEvent(FileModel fileSourceModel, int x, int y) {
this.sourceFileModel = fileSourceModel;
this.clientX = x;
this.clientY = y;
}
@Override
public Type<ImagePreviewEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(ImagePreviewEventHandler handler) {
handler.onClickPreview(this);
}
public FileModel getSourceFileModel() {
return sourceFileModel;
}
public int getClientX() {
return clientX;
}
public int getClientY() {
return clientY;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface ImagePreviewEventHandler extends EventHandler {
void onClickPreview(ImagePreviewEvent imagePreviewEvent);
}

@ -0,0 +1,56 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import org.gcube.portlets.user.workspace.client.model.FolderModel;
import com.google.gwt.event.shared.GwtEvent;
public class MoveItemEvent extends GwtEvent<MoveItemEventHandler> implements GuiEventInterface{
public static Type<MoveItemEventHandler> TYPE = new Type<MoveItemEventHandler>();
private FileModel source = null;
private FolderModel target = null;
// private FileModel target = null;
public MoveItemEvent(FileModel fileSourceModel, FolderModel parentFileModel) {
this.source = fileSourceModel;
this.target = parentFileModel;
}
// public MoveItemEvent(FileModel fileSourceModel, FileModel parentFileModel) {
// this.source = fileSourceModel;
// this.target = parentFileModel;
// }
@Override
public Type<MoveItemEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(MoveItemEventHandler handler) {
handler.onMoveItem(this);
}
@Override
public EventsTypeEnum getKey() {
// TODO Auto-generated method stub
return EventsTypeEnum.MOVED_ITEM_EVENT;
}
public FileModel getFileSourceModel() {
return source;
}
public FolderModel getTargetParentFileModel() {
return target;
}
// public FileModel getTargetParentFileModel() {
// return target;
// }
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface MoveItemEventHandler extends EventHandler {
void onMoveItem(MoveItemEvent event);
}

@ -0,0 +1,44 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
public class OpenContextMenuTreeEvent extends GwtEvent<OpenContextMenuTreeEventHandler> {
public static Type<OpenContextMenuTreeEventHandler> TYPE = new Type<OpenContextMenuTreeEventHandler>();
private FileModel targetFileModel = null;
private int clientX;
private int clientY;
public OpenContextMenuTreeEvent(FileModel targetFileModel, int clientX, int clientY) {
this.targetFileModel = targetFileModel;
this.clientX = clientX;
this.clientY = clientY;
}
@Override
public Type<OpenContextMenuTreeEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(OpenContextMenuTreeEventHandler handler) {
handler.onOpenContextMenuTree(this);
}
public int getClientX() {
return clientX;
}
public int getClientY() {
return clientY;
}
public FileModel getTargetFileModel() {
return targetFileModel;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface OpenContextMenuTreeEventHandler extends EventHandler {
void onOpenContextMenuTree(OpenContextMenuTreeEvent openContextMenuTreeEvent);
}

@ -0,0 +1,69 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.MessageModel;
import com.google.gwt.event.shared.GwtEvent;
public class OpenMessageEvent extends GwtEvent<OpenMessageEventHandler> implements GuiEventInterface {
public static Type<OpenMessageEventHandler> TYPE = new Type<OpenMessageEventHandler>();
private String messageIdentifier = null; //Report template
private OpenType openType;
private String messageType;
private MessageModel message;//Added for Massi
// public enum OpenType {OPEN, FORWARD}
public enum OpenType {REPLY, REPLYALL, FORWARD}//Refactor for Massi
public OpenMessageEvent(String messageIdentifier, OpenType openType, String messageType) {
this.messageIdentifier = messageIdentifier;
this.openType = openType;
this.messageType = messageType;
}
@Override
public Type<OpenMessageEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(OpenMessageEventHandler handler) {
handler.onOpenMessage(this);
}
public String getMessageIdentifier() {
return messageIdentifier;
}
public OpenType getOpenType() {
return openType;
}
public String getOpenTypeToString() {
return openType.toString();
}
public String getMessageType() {
return messageType;
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.REPLY_FORWARD_MESSAGE;
}
public MessageModel getMessage() {
return message;
}
public void setMessage(MessageModel message) {
this.message = message;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface OpenMessageEventHandler extends EventHandler {
void onOpenMessage(OpenMessageEvent openMessageEvent);
}

@ -0,0 +1,35 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class OpenReportsEvent extends GwtEvent<OpenReportsEventHandler> {
public static Type<OpenReportsEventHandler> TYPE = new Type<OpenReportsEventHandler>();
private FileModel sourceFileModel = null; //Report template
public OpenReportsEvent(FileModel fileSourceModel) {
this.sourceFileModel = fileSourceModel;
}
@Override
public Type<OpenReportsEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(OpenReportsEventHandler handler) {
handler.onClickOpenReports(this);
}
public FileModel getSourceFileModel() {
return sourceFileModel;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface OpenReportsEventHandler extends EventHandler {
void onClickOpenReports(OpenReportsEvent openReportTemplateEvent);
}

@ -0,0 +1,35 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class OpenUrlEvent extends GwtEvent<OpenUrlEventHandler> {
public static Type<OpenUrlEventHandler> TYPE = new Type<OpenUrlEventHandler>();
private FileModel sourceFileModel = null; //Url page
public OpenUrlEvent(FileModel fileSourceModel) {
this.sourceFileModel = fileSourceModel;
}
@Override
public Type<OpenUrlEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(OpenUrlEventHandler handler) {
handler.onClickUrl(this);
}
public FileModel getSourceFileModel() {
return sourceFileModel;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface OpenUrlEventHandler extends EventHandler {
void onClickUrl(OpenUrlEvent openUrlEvent);
}

@ -0,0 +1,35 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.GwtEvent;
public class PasteItemEvent extends GwtEvent<PasteItemEventHandler> {
public static Type<PasteItemEventHandler> TYPE = new Type<PasteItemEventHandler>();
private String itemId = null;
private String folderDestinationId;
public PasteItemEvent(String itemId, String folderDestinationId) {
this.itemId = itemId;
this.folderDestinationId = folderDestinationId;
}
@Override
public Type<PasteItemEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(PasteItemEventHandler handler) {
handler.onCopyAndPaste(this);
}
public String getItemId() {
return itemId;
}
public String getFolderDestinationId() {
return folderDestinationId;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface PasteItemEventHandler extends EventHandler {
void onCopyAndPaste(PasteItemEvent pasteItemEvent);
}

@ -0,0 +1,54 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.MessageModel;
import com.google.gwt.event.shared.GwtEvent;
public class PreviewMessageEvent extends GwtEvent<PreviewMessageEventHandler> implements GuiEventInterface{
public static Type<PreviewMessageEventHandler> TYPE = new Type<PreviewMessageEventHandler>();
private String messageIdentifier = null; //Report template
private MessageModel message;
private String messageType;
public PreviewMessageEvent(String messageIdentifier, String messageType) {
this.messageIdentifier = messageIdentifier;
this.messageType = messageType;
}
@Override
public Type<PreviewMessageEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(PreviewMessageEventHandler handler) {
handler.onPreviewMessage(this);
}
public String getMessageIdentifier() {
return messageIdentifier;
}
public void setMessage(MessageModel message) {
this.message = message;
}
public MessageModel getMessage() {
return message;
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.SELECTED_MESSAGE;
}
public String getMessageType() {
return messageType;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface PreviewMessageEventHandler extends EventHandler {
void onPreviewMessage(PreviewMessageEvent previewMessageEvent);
}

@ -0,0 +1,39 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
public class RefreshFolderEvent extends GwtEvent<RefreshItemEventHandler> implements GuiEventInterface {
public static Type<RefreshItemEventHandler> TYPE = new Type<RefreshItemEventHandler>();
private FileModel folderTarget= null;
public RefreshFolderEvent(FileModel folderTarget) {
this.folderTarget = folderTarget;
}
@Override
public Type<RefreshItemEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(RefreshItemEventHandler handler) {
handler.onRefreshItem(this);
}
public FileModel getFolderTarget() {
return folderTarget;
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.REFRESH_FOLDER;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface RefreshItemEventHandler extends EventHandler {
void onRefreshItem(RefreshFolderEvent refreshtemEvent);
}

@ -0,0 +1,59 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class RenameItemEvent extends GwtEvent<RenameItemEventHandler> implements GuiEventInterface {
public static Type<RenameItemEventHandler> TYPE = new Type<RenameItemEventHandler>();
private FileModel fileTarget = null;
private String newName;
private String extension;
public RenameItemEvent(FileModel target) {
this.fileTarget = target;
}
@Override
public Type<RenameItemEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(RenameItemEventHandler handler) {
handler.onRenameItem(this);
}
public EventsTypeEnum getKey() {
return EventsTypeEnum.RENAME_ITEM_EVENT;
}
public FileModel getFileTarget() {
return fileTarget;
}
public void setNewName(String newName) {
this.newName = newName;
}
public void setExtension(String extension) {
this.extension = extension;
}
public String getNewName() {
return newName;
}
public String getExtension() {
return extension;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface RenameItemEventHandler extends EventHandler {
void onRenameItem(RenameItemEvent event);
}

@ -0,0 +1,29 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.GwtEvent;
public class RenderForm extends GwtEvent<RenderFormEventHandler> {
public static Type<RenderFormEventHandler> TYPE = new Type<RenderFormEventHandler>();
private boolean result;
public boolean isSuccess() {
return result;
}
public RenderForm(boolean result) {
this.result = result;
}
@Override
public Type<RenderFormEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(RenderFormEventHandler handler) {
handler.onRenderForm(this);
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface RenderFormEventHandler extends EventHandler {
void onRenderForm(RenderForm event);
}

@ -0,0 +1,36 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.GwtEvent;
public class SaveAttachmentsEvent extends GwtEvent<SaveAttachmentsEventHandler> {
public static Type<SaveAttachmentsEventHandler> TYPE = new Type<SaveAttachmentsEventHandler>();
private String messageIdentifier = null;
private String messageType;
public SaveAttachmentsEvent(String messageIdentifier, String messageType) {
this.messageIdentifier = messageIdentifier;
this.messageType = messageType;
}
@Override
public Type<SaveAttachmentsEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(SaveAttachmentsEventHandler handler) {
handler.onSaveAttachments(this);
}
public String getMessageIdentifier() {
return messageIdentifier;
}
public String getMessageType() {
return messageType;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface SaveAttachmentsEventHandler extends EventHandler {
void onSaveAttachments(SaveAttachmentsEvent saveAttachmentsEvent);
}

@ -0,0 +1,39 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
public class SelectedItemEvent extends GwtEvent<SelectedItemEventHandler> implements GuiEventInterface{
public static Type<SelectedItemEventHandler> TYPE = new Type<SelectedItemEventHandler>();
private FileModel fileTarget = null;
public SelectedItemEvent(FileModel fileModel) {
this.fileTarget = fileModel;
}
@Override
public Type<SelectedItemEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(SelectedItemEventHandler handler) {
handler.onSelectedItem(this);
}
@Override
public EventsTypeEnum getKey() {
// TODO Auto-generated method stub
return EventsTypeEnum.SELECTED_ITEM_EVENT;
}
public FileModel getFileTarget() {
return fileTarget;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface SelectedItemEventHandler extends EventHandler {
void onSelectedItem(SelectedItemEvent selectedItemEvent);
}

@ -0,0 +1,50 @@
package org.gcube.portlets.user.workspace.client.event;
import java.util.List;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class SendMessageEvent extends GwtEvent<SendMessageEventHandler> implements GuiEventInterface{
public static Type<SendMessageEventHandler> TYPE = new Type<SendMessageEventHandler>();
private List<FileModel> listFileModelSelected;
// public AddFolderEvent(FolderModel newFolder, FolderModel parentFileModel) {
// this.newFolder = newFolder;
// this.parentFileModel = parentFileModel;
// }
public SendMessageEvent(List<FileModel> selected) {
this.listFileModelSelected = selected;
}
@Override
public Type<SendMessageEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(SendMessageEventHandler handler) {
handler.onSendMessage(this);
}
public List<FileModel> getListFileModelSelected() {
return listFileModelSelected;
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.CREATE_NEW_MESSAGE;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface SendMessageEventHandler extends EventHandler {
void onSendMessage(SendMessageEvent sendMessageEvent);
}

@ -0,0 +1,55 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class SmartFolderSelectedEvent extends GwtEvent<SmartFolderSelectedEventHandler> implements GuiEventInterface{
public static Type<SmartFolderSelectedEventHandler> TYPE = new Type<SmartFolderSelectedEventHandler>();
private String idSmartFolder;
private String smartFolderName;
private String category;
public SmartFolderSelectedEvent(String idSmartFolder, String smartFolderName, String category) {
this.idSmartFolder = idSmartFolder;
this.smartFolderName = smartFolderName;
this.category = category;
}
@Override
public Type<SmartFolderSelectedEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(SmartFolderSelectedEventHandler handler) {
handler.onSmartFolderSelected(this);
}
@Override
public EventsTypeEnum getKey() {
// TODO Auto-generated method stub
return EventsTypeEnum.SMART_FOLDER_EVENT;
}
public String getIdSmartFolder() {
return idSmartFolder;
}
public String getSmartFolderName() {
return smartFolderName;
}
public String getCategory() {
return category;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface SmartFolderSelectedEventHandler extends EventHandler {
void onSmartFolderSelected(SmartFolderSelectedEvent smartFolderSelectedEvent);
}

@ -0,0 +1,50 @@
package org.gcube.portlets.user.workspace.client.event;
import java.util.ArrayList;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class SubTreeLoadedEvent extends GwtEvent<SubTreeLoadedEventHandler> implements GuiEventInterface{
public static Type<SubTreeLoadedEventHandler> TYPE = new Type<SubTreeLoadedEventHandler>();
private ArrayList<FileModel> pathParentsList = null;
public SubTreeLoadedEvent(ArrayList<FileModel> pathParentsList) {
this.pathParentsList = pathParentsList;
}
@Override
public Type<SubTreeLoadedEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(SubTreeLoadedEventHandler handler) {
handler.onSubTreeLoaded(this);
}
@Override
public EventsTypeEnum getKey() {
// TODO Auto-generated method stub
return EventsTypeEnum.SUBTREE_LOAD_EVENT;
}
public ArrayList<FileModel> getPathParentsList() {
return pathParentsList;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface SubTreeLoadedEventHandler extends EventHandler {
void onSubTreeLoaded(SubTreeLoadedEvent event);
}

@ -0,0 +1,38 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.ConstantsExplorer.ViewSwitchType;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import com.google.gwt.event.shared.GwtEvent;
public class SwitchViewEvent extends GwtEvent<SwitchViewEventHandler> implements GuiEventInterface{
public static Type<SwitchViewEventHandler> TYPE = new Type<SwitchViewEventHandler>();
private ViewSwitchType type;
public SwitchViewEvent(ViewSwitchType type) {
this.type = type;
}
@Override
public Type<SwitchViewEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(SwitchViewEventHandler handler) {
handler.onSwitchView(this);
}
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.SWITCH_VIEW_EVENT;
}
public ViewSwitchType getType() {
return type;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface SwitchViewEventHandler extends EventHandler {
void onSwitchView(SwitchViewEvent switchViewEvent);
}

@ -0,0 +1,33 @@
package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent;
public class UnShareFolderEvent extends GwtEvent<UnShareFolderEventHandler>{
public static Type<UnShareFolderEventHandler> TYPE = new Type<UnShareFolderEventHandler>();
private FileModel targetFileModel = null; //File or Folder source click
@Override
public Type<UnShareFolderEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(UnShareFolderEventHandler handler) {
handler.onUnShareFolder(this);
}
/**
* @param fileSourceModel
*/
public UnShareFolderEvent(FileModel fileSourceModel) {
this.targetFileModel = fileSourceModel;
}
public FileModel getTargetFileModel() {
return targetFileModel;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface UnShareFolderEventHandler extends EventHandler {
void onUnShareFolder(UnShareFolderEvent unShareFolderEvent);
}

@ -0,0 +1,33 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class UpdadeTreePanelLevelEvent extends GwtEvent<UpdadeTreePanelLevelEventHandler>{
public static Type<UpdadeTreePanelLevelEventHandler> TYPE = new Type<UpdadeTreePanelLevelEventHandler>();
private String parentIdentifier = null;
public UpdadeTreePanelLevelEvent(String parentIdentifier) {
this.parentIdentifier = parentIdentifier;
}
@Override
public Type<UpdadeTreePanelLevelEventHandler> getAssociatedType() {
// TODO Auto-generated method stub
return TYPE;
}
@Override
protected void dispatch(UpdadeTreePanelLevelEventHandler handler) {
handler.onUpdateTreePanel(this);
}
public String getFolderIdentifier() {
return parentIdentifier;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface UpdadeTreePanelLevelEventHandler extends EventHandler {
void onUpdateTreePanel(UpdadeTreePanelLevelEvent event);
}

@ -0,0 +1,29 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.GwtEvent;
public class WebDavUrlEvent extends GwtEvent<WebDavUrlEventHandler> {
public static Type<WebDavUrlEventHandler> TYPE = new Type<WebDavUrlEventHandler>();
private String itemIdentifier;
public WebDavUrlEvent(String itemIdentifier) {
this.itemIdentifier = itemIdentifier;
}
@Override
public Type<WebDavUrlEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(WebDavUrlEventHandler handler) {
handler.onClickWebDavUrl(this);
}
public String getItemIdentifier() {
return itemIdentifier;
}
}

@ -0,0 +1,7 @@
package org.gcube.portlets.user.workspace.client.event;
import com.google.gwt.event.shared.EventHandler;
public interface WebDavUrlEventHandler extends EventHandler {
void onClickWebDavUrl(WebDavUrlEvent webDavUrlEvent);
}

@ -0,0 +1,29 @@
package org.gcube.portlets.user.workspace.client.interfaces;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public enum EventsTypeEnum
{
RENAME_ITEM_EVENT,
DELETE_ITEM_EVENT,
DELETE_SMARTFOLDER_ITEM_EVENT,
ADDED_FOLDER_EVENT,
ADDED_FILE_EVENT,
SUBTREE_LOAD_EVENT,
SELECTED_ITEM_EVENT,
EXPANDED_FOLDER_EVENT,
MOVED_ITEM_EVENT,
SMART_FOLDER_EVENT, //NOT IMPLEMENTED
FILE_UPLOAD_EVENT, //NOT IMPLEMENTED
COMPLETED_FILE_UPLOAD_EVENT,
LOAD_MESSAGES_EVENT,
SWITCH_VIEW_EVENT,
DELETED_MESSAGE,
MARK_MESSAGE_AS_READ,
REFRESH_FOLDER,
SELECTED_MESSAGE,
CREATE_NEW_MESSAGE,
REPLY_FORWARD_MESSAGE
}

@ -0,0 +1,34 @@
package org.gcube.portlets.user.workspace.client.interfaces;
import java.io.Serializable;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class GXTCategoryItemInterface implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
//Smart Folder SMF
public static final String SMF_BIODIVERSITY = "Biodiversity";
public static final String SMF_DOCUMENTS = "Documents";
public static final String SMF_IMAGES = "Images";
public static final String SMF_REPORTS = "Reports";
public static final String SMF_TIMESERIES = "Time Series";
public static final String SMF_LINKS = "Links";
// public static final String NONE = "None";
public static final String SMF_UNKNOWN = "Unknown";
GXTCategoryItemInterface(){}
//Messages MS
public static final String MS_MESSAGES = "Messages";
public static final String MS_SENT = "Sent";
public static final String MS_RECEIVED = "Received";
}

@ -0,0 +1,62 @@
package org.gcube.portlets.user.workspace.client.interfaces;
import java.io.Serializable;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public enum GXTFolderItemTypeEnum implements Serializable {
// AQUAMAPS_ITEM("AquaMaps Item"),
EXTERNAL_FILE("External File"),
EXTERNAL_IMAGE("External Image"),
EXTERNAL_PDF_FILE("External PDF File"),
EXTERNAL_URL("External Url"),
EXTERNAL_RESOURCE_LINK("Exteranl Resource Link"),
QUERY("Query"),
REPORT("Report"),
REPORT_TEMPLATE("Report Template"),
TIME_SERIES("Time Series"),
DOCUMENT("Document"),
IMAGE_DOCUMENT("Image Document"),
PDF_DOCUMENT("PDF Document"),
URL_DOCUMENT("Url Document"),
METADATA("Metadata"),
WORKFLOW_REPORT("Workflow Report"),
WORKFLOW_TEMPLATE("Workflow Template"),
UNKNOWN_TYPE("Unknow Type"),
ANNOTATION("Annotation"),
FOLDER("Folder"),
SHARED_FOLDER("Shared Folder");
// EXTERNAL_IMAGE,
// EXTERNAL_FILE,
// EXTERNAL_PDF_FILE,
// EXTERNAL_URL,
// QUERY,
// REPORT_TEMPLATE,
// REPORT,
// DOCUMENT,
// METADATA,
// PDF_DOCUMENT,
// IMAGE_DOCUMENT,
// URL_DOCUMENT,
// TIME_SERIES,
// AQUAMAPS_ITEM,
// WORKFLOW_REPORT,
// WORKFLOW_TEMPLATE,
// UNKNOWN_TYPE;
protected String label;
GXTFolderItemTypeEnum(){}
GXTFolderItemTypeEnum(String label)
{
this.label = label;
}
public String getLabel()
{
return label;
}
}

@ -0,0 +1,13 @@
package org.gcube.portlets.user.workspace.client.interfaces;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
//Use this interface to subscriber event type (on tree)
public interface GuiEventInterface {
public EventsTypeEnum getKey();
}

@ -0,0 +1,40 @@
package org.gcube.portlets.user.workspace.client.interfaces;
import java.util.ArrayList;
import java.util.HashMap;
import org.gcube.portlets.user.workspace.client.ConstantsExplorer.ViewSwitchType;
import org.gcube.portlets.user.workspace.client.model.FileModel;
import org.gcube.portlets.user.workspace.client.model.FolderModel;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
//Implements this interface to receive events by tree async
public interface SubscriberInterface {
// public void rescue(GuiEvent event);
// public void renameItem(FileModel item, String newName, String extension);
// public void deleteItem(FileModel item);
// void addFolder(FolderModel itemFolder);
void addedFile(String itemIdentifier, FileModel parent);
void selectedItem(FileModel item, ArrayList<FileModel> parents);
void expandFolderItem(FolderModel itemFolder);
void setParentItemSelected(ArrayList <FileModel> listParents);
boolean renameItem(String itemIdentifier, String newName, String extension);
boolean deleteItem(String itemIdentifier);
void addedFolder(String itemIdentifier, FileModel parent);
void rootLoaded(FileModel root);
void smartFolderSelected(String folderId, String category);
void movedItems(String sourceParentIdentifier, FileModel targetParent);
void switchView(ViewSwitchType type);
void refreshFolder(FileModel fileModel);
// void updatePrevieMessage(String fromLogin, String subject, String date, String body, List<FileModel> attachs);
void createNewMessage(HashMap<String, String> hashAttachs);
}

@ -0,0 +1,33 @@
package org.gcube.portlets.user.workspace.client.interfaces;
import java.util.ArrayList;
import org.gcube.portlets.user.workspace.client.model.FileModel;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
//Implements this interface to upgrade the state of the store that was loaded in Async Tree
public interface TreeAppControllerInterface {
enum VisualizationType {TREE, SHORTCUT};
//Methods returns true if state operation is OK, false otherwise
boolean renameItem(String itemIdentifier, String newName, String extension);
boolean deleteItem(String itemIdentifier);
boolean addFolder(String itemIdentifier, String name, String parentIdentifier);
boolean addFile(String itemIdentifier, String name, String parentIdentifier);
// FileDetailsModel getDetailsOnFileModel(String identifier);
boolean reloadFolderChildren(String itemIdentifier);
ArrayList<FileModel> getListParentsByIdentifier(String itemIdentifier);
// List<ScopeModel> getAllScope();
void setVisualizationType(VisualizationType type);
void findItemAndSelectItemInTree(String itemIdentifier);
void expandFolder(String itemIdentifier);
void searching(boolean isSearch);
void selectRootItem();
FileModel getSelectedFolderInTree();
}

@ -0,0 +1,102 @@
package org.gcube.portlets.user.workspace.client.model;
import java.io.Serializable;
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
import com.extjs.gxt.ui.client.data.BaseModelData;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class BulkCreatorModel extends BaseModelData implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
// public enum DownloadState implements Serializable {
// ONGOING, FAILED, COMPLETED
// }
public static int ONGOING = 0;
public static int FAILED = 2;
public static int COMPLETED = 1;
public BulkCreatorModel(){
}
public BulkCreatorModel(String identifier, String name, float percentage) {
setIdentifier(identifier);
setName(name);
setPercentage(percentage);
}
/**
* state values: ONGOING = 0; FAILED = -1; COMPLETED = 1;
*
* @param identifier
* @param name
* @param percentage
* @param state
*/
public BulkCreatorModel(String identifier, String name, float percentage, int state, int requestsNumber, int failuresNumber) {
this(identifier,name,percentage);
setState(state);
setRequestsNumber(requestsNumber);
setFailuersNumber(failuresNumber);
}
private void setState(int state) {
set(ConstantsExplorer.DOWNLOADSTATE, state);
}
private void setRequestsNumber(int reqs) {
set(ConstantsExplorer.NUMREQUESTS, reqs);
}
private void setFailuersNumber(int fails) {
set(ConstantsExplorer.NUMFAILS, fails);
}
public void setIdentifier(String identifier) {
set(ConstantsExplorer.IDENTIFIER, identifier);
}
public String getIdentifier(){
return get(ConstantsExplorer.IDENTIFIER);
}
private void setName(String name) {
set(ConstantsExplorer.NAME, name);
}
public String getName() {
return get(ConstantsExplorer.NAME);
}
public void setPercentage(float percentage){
set(ConstantsExplorer.STATUS, percentage);
}
public float getPercentage(){
return (Float)get(ConstantsExplorer.STATUS);
}
public int getState(){
return (Integer)get(ConstantsExplorer.DOWNLOADSTATE);
}
public int getNumRequests(){
return (Integer)get(ConstantsExplorer.NUMREQUESTS);
}
public int getNumFails(){
return (Integer)get(ConstantsExplorer.NUMFAILS);
}
}

@ -0,0 +1,54 @@
package org.gcube.portlets.user.workspace.client.model;
import java.util.Date;
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class FileDetailsModel extends FileGridModel {
/**
*
*/
private static final long serialVersionUID = 1L;
protected FileDetailsModel() {
}
// public FileDetailsModel(String identifier, String name, String path, String creationDate, String parent, String size, boolean isDirectory, String lastModified, String description) {
// super(identifier, name, path, creationDate, parent, size, isDirectory);
//
// this.setDescription(description);
// this.setLastModified(lastModified);
// }
public FileDetailsModel(String identifier, String name, String path, Date creationDate, FileModel parent, long size, boolean isDirectory, String description, Date lastModified, String owner, boolean isShared) {
super(identifier,name,path,creationDate,parent,size,isDirectory, isShared);
setLastModified(lastModified);
setDescription(description);
setDescription(owner);
}
public void setLastModified(Date lastModified) {
set(ConstantsExplorer.LASTMODIFIED, lastModified);
}
private void setDescription(String description){
set(ConstantsExplorer.DESCRIPTION, description);
}
private Date getLastModified() {
return (Date) get(ConstantsExplorer.LASTMODIFIED);
}
public String getDescription(){
return get(ConstantsExplorer.DESCRIPTION);
}
}

@ -0,0 +1,61 @@
package org.gcube.portlets.user.workspace.client.model;
import java.util.Date;
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class FileGridModel extends FileModel {
/**
*
*/
private static final long serialVersionUID = 1L;
protected FileGridModel(){
}
public FileGridModel(String identifier, String name, String path, Date creationDate, FileModel parent, long size, boolean isDirectory, boolean isShared) {
super(identifier, name, parent, isDirectory, isShared);
setCreationDate(creationDate);
setSize(size);
}
public FileGridModel(String identifier, String name, Date creationDate, FileModel parent, long size, boolean isDirectory, boolean isShared) {
super(identifier, name, parent, isDirectory, isShared);
setCreationDate(creationDate);
setSize(size);
}
private void setSize(long size) {
set(ConstantsExplorer.SIZE, size);
}
public long getSize() {
return (Long) get(ConstantsExplorer.SIZE);
}
private void setCreationDate(Date creationDate) {
set(ConstantsExplorer.GRIDCOLUMNCREATIONDATE, creationDate);
}
public Date getCreationDate(){
return (Date) get(ConstantsExplorer.GRIDCOLUMNCREATIONDATE);
}
@Override
public boolean equals(Object obj) {
if (obj != null && obj instanceof FileGridModel) {
FileGridModel mobj = (FileGridModel) obj;
return getIdentifier().equals(mobj.getIdentifier());
}
return super.equals(obj);
}
}

@ -0,0 +1,272 @@
package org.gcube.portlets.user.workspace.client.model;
import java.io.Serializable;
import java.util.List;
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum;
import org.gcube.portlets.user.workspace.client.resources.Resources;
import com.extjs.gxt.ui.client.data.BaseModelData;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.Image;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
*
*/
public class FileModel extends BaseModelData implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
protected GXTFolderItemTypeEnum test; //TODO remove?
protected InfoContactModel infoContacts;
protected boolean isRoot = false;
protected FileModel(){
}
public FileModel(String identifier, String name, FileModel parent, boolean isDirectory, boolean isShared) {
setIdentifier(identifier);
setName(name);
setParentFileModel(parent);
setIsDirectory(isDirectory);
setShared(isShared);
}
/**
* USED FOR ATTACHMENTS AND FolderBulkCreator
* @param identifier
* @param name
* @param isDirectory
*/
public FileModel(String identifier, String name, boolean isDirectory) {
setIdentifier(identifier);
setName(name);
setIsDirectory(isDirectory);
}
public FileModel(String identifier, String name, String type, GXTFolderItemTypeEnum folderItemTypeEnum, boolean isDirectory, boolean isShared) {
setIdentifier(identifier);
setName(name);
setType(type);
setFolderItemType(folderItemTypeEnum);
setIsDirectory(isDirectory);
setShared(isShared);
}
public void setParentFileModel(FileModel parent) {
set(ConstantsExplorer.PARENT,parent);
}
/**
* Status values
* ConstantsExplorer.FOLDERNOTLOAD = "notload";
* ConstantsExplorer.FOLDERLOADED = "loaded";
* @param status
*/
public void setStatus(String status) {
set("status", status);
}
public void setIcon() {
AbstractImagePrototype absImgPr = null;
if (!this.isDirectory()) {
if(this.getType()!=null)
absImgPr = Resources.getIconByType(this.getType());
// absImgPr = Resources.getImageCancel();
else
absImgPr = Resources.getIconByFolderItemType(this.getGXTFolderItemType());
}
//SHARED FOLDER
else if(this.isShared()){
absImgPr = Resources.getIconSharedFolder();
//SIMPLE FOLDER
}else{
absImgPr = Resources.getIconFolder();
}
set(ConstantsExplorer.ICON, absImgPr.createImage());
set(ConstantsExplorer.ABSTRACTICON, absImgPr);
}
public void setOwner(InfoContactModel owner){
set(ConstantsExplorer.OWNER, owner);
}
public void setMarkAsRead(boolean mark){
set(ConstantsExplorer.MARKASREAD, mark);
}
public boolean isMarkAsRead(){
return (Boolean) get(ConstantsExplorer.MARKASREAD);
}
//TODO Accounting
public InfoContactModel getOwner(){
return (InfoContactModel) get(ConstantsExplorer.OWNER);
}
public void setSharingValue(boolean isShared, List<InfoContactModel> listShareUsers){
set(ConstantsExplorer.ISSHARED, isShared);
set(ConstantsExplorer.SHAREUSERS, listShareUsers);
}
@SuppressWarnings("unchecked")
public List<InfoContactModel> getListUserSharing(){
return (List<InfoContactModel>) get(ConstantsExplorer.SHAREUSERS);
}
public void setListShareUser(List<InfoContactModel> listShareUsers){
set(ConstantsExplorer.SHAREUSERS, listShareUsers);
}
public boolean isShared(){
return (Boolean) get(ConstantsExplorer.ISSHARED);
}
public boolean isRoot(){
return isRoot;
}
public void setIsRoot(boolean isRoot){
this.isRoot = isRoot;
}
public Image getIcon() {
return (Image) get(ConstantsExplorer.ICON);
}
public AbstractImagePrototype getAbstractPrototypeIcon() {
return (AbstractImagePrototype) get(ConstantsExplorer.ABSTRACTICON);
}
public String getStatus() {
return get("status");
}
private void setIsDirectory(boolean flag){
set(ConstantsExplorer.ISDIRECTORY, flag);
}
public void setIdentifier(String identifier) {
set(ConstantsExplorer.IDENTIFIER, identifier);
}
public String getIdentifier(){
return get(ConstantsExplorer.IDENTIFIER);
}
public void setShortcutCategory(String category) {
set(ConstantsExplorer.SHORTCUTCATEGORY, category);
}
public String getShortcutCategory(){
return get(ConstantsExplorer.SHORTCUTCATEGORY).toString();
}
private void setName(String name) {
set(ConstantsExplorer.NAME, name);
}
public String getName() {
return get(ConstantsExplorer.NAME);
}
public FileModel getParentFileModel(){
return get(ConstantsExplorer.PARENT);
}
public boolean isDirectory(){
return (Boolean) get(ConstantsExplorer.ISDIRECTORY);
}
@Override
public boolean equals(Object obj) {
if (obj != null && obj instanceof FileModel) {
FileModel mobj = (FileModel) obj;
return getIdentifier().equals(mobj.getIdentifier());
}
return super.equals(obj);
}
/**
* @param isShared the isShared to set
*/
public void setShared(boolean isShared) {
set(ConstantsExplorer.ISSHARED, isShared);
}
/**
* It's: folder, mime type or unknown
* @param type
*/
public void setType(String type){
set(ConstantsExplorer.TYPE, type);
}
public String getType(){
return get(ConstantsExplorer.TYPE);
}
public void setFolderItemType(GXTFolderItemTypeEnum folderItemTypeEnum){
set(ConstantsExplorer.FOLDERITEMTYPE, folderItemTypeEnum);
}
public GXTFolderItemTypeEnum getGXTFolderItemType(){
return (GXTFolderItemTypeEnum) get(ConstantsExplorer.FOLDERITEMTYPE);
}
public String getGXTFolderItemTypeToString(){
return get(ConstantsExplorer.FOLDERITEMTYPE).toString();
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("FileModel [isMarkAsRead()=");
builder.append(isMarkAsRead());
builder.append(", getOwner()=");
builder.append(getOwner());
builder.append(", getListUserSharing()=");
builder.append(getListUserSharing());
builder.append(", isShared()=");
builder.append(isShared());
builder.append(", getIcon()=");
builder.append(getIcon());
builder.append(", getAbstractPrototypeIcon()=");
builder.append(getAbstractPrototypeIcon());
builder.append(", getStatus()=");
builder.append(getStatus());
builder.append(", getIdentifier()=");
builder.append(getIdentifier());
builder.append(", getShortcutCategory()=");
builder.append(getShortcutCategory());
builder.append(", getName()=");
builder.append(getName());
builder.append(", getParentFileModel()=");
builder.append(getParentFileModel());
builder.append(", isDirectory()=");
builder.append(isDirectory());
builder.append(", getType()=");
builder.append(getType());
builder.append(", getGXTFolderItemType()=");
builder.append(getGXTFolderItemType());
builder.append(", getGXTFolderItemTypeToString()=");
builder.append(getGXTFolderItemTypeToString());
builder.append("]");
return builder.toString();
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save