Added Session Checker

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@100264 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2014-09-29 16:12:44 +00:00
parent d0d48d0646
commit e8072c0db1
5 changed files with 25 additions and 8 deletions

View File

@ -5,10 +5,7 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="workspace-tree-widget-6.6.7-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/WorkspaceTree/WorkspaceTree">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="workspace-sharing-widget-1.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-sharing-widget/workspace-sharing-widget">
<dependent-module archiveName="workspace-tree-widget-6.6.8-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/WorkspaceTree/WorkspaceTree">
<dependency-type>uses</dependency-type>
</dependent-module>

View File

@ -103,6 +103,11 @@
</dependency>
<!-- END FWS -->
<dependency>
<groupId>org.gcube.portlets.widgets</groupId>
<artifactId>session-checker</artifactId>
<version>[0.0.1-SNAPSHOT, 1.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>

View File

@ -104,6 +104,7 @@ import org.gcube.portlets.user.workspace.shared.SessionExpiredException;
import org.gcube.portlets.user.workspace.shared.TrashContent;
import org.gcube.portlets.user.workspace.shared.TrashOperationContent;
import org.gcube.portlets.user.workspace.shared.WorkspaceTrashOperation;
import org.gcube.portlets.widgets.sessionchecker.client.CheckSession;
import org.gcube.portlets.widgets.wsmail.client.forms.MailForm;
import com.extjs.gxt.ui.client.event.Listener;
@ -1192,6 +1193,8 @@ public class AppController implements SubscriberInterface {
else
initPortlet(rootPanel, instanceWithGrouping, searchingForItemId, searchParameter, itemIdParameter, operationParameter);
//CheckSession if you do not need to something when the session expire
CheckSession.getInstance().startPolling();
}
private void initPortlet(final HasWidgets rootPanel, final boolean instanceWithGrouping, boolean isSearchForItemId, final String searchParameter, final String itemIdParameter, final String operationParameter){
@ -1612,11 +1615,13 @@ public class AppController implements SubscriberInterface {
@Override
public void viewSessionExpiredPanel() {
if(this.rootPanel!=null){
/*if(this.rootPanel!=null){
rootPanel.clear();
rootPanel.add(showProblems());
getMainPanel().setHeight(350);
}
}*/
CheckSession.showLogoutDialog();
}

View File

@ -23,7 +23,7 @@
<inherits name='org.gcube.portlets.widgets.wsmail.WsMail_Widget' />
<inherits name='org.gcube.portlets.widgets.fileupload.FileUpload' />
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
<!-- Specify the app entry point class. -->
<entry-point
class='org.gcube.portlets.user.workspace.client.WorkspacePortlet' />

View File

@ -104,6 +104,16 @@
<servlet-class>org.gcube.portlets.widgets.wsmail.server.WsMailServiceImpl</servlet-class>
</servlet>
<servlet>
<servlet-name>checkServlet</servlet-name>
<servlet-class>org.gcube.portlets.widgets.sessionchecker.server.SessionCheckerServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>checkServlet</servlet-name>
<url-pattern>/workspace/checksession</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mailWisdgetServlet</servlet-name>
<url-pattern>/workspace/mailWisdgetServlet</url-pattern>