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="/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/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <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"> <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>
<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">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>

View File

@ -103,6 +103,11 @@
</dependency> </dependency>
<!-- END FWS --> <!-- 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> <dependency>
<groupId>org.gcube.portlets.user</groupId> <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.TrashContent;
import org.gcube.portlets.user.workspace.shared.TrashOperationContent; import org.gcube.portlets.user.workspace.shared.TrashOperationContent;
import org.gcube.portlets.user.workspace.shared.WorkspaceTrashOperation; 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 org.gcube.portlets.widgets.wsmail.client.forms.MailForm;
import com.extjs.gxt.ui.client.event.Listener; import com.extjs.gxt.ui.client.event.Listener;
@ -1192,6 +1193,8 @@ public class AppController implements SubscriberInterface {
else else
initPortlet(rootPanel, instanceWithGrouping, searchingForItemId, searchParameter, itemIdParameter, operationParameter); 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){ 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 @Override
public void viewSessionExpiredPanel() { public void viewSessionExpiredPanel() {
if(this.rootPanel!=null){ /*if(this.rootPanel!=null){
rootPanel.clear(); rootPanel.clear();
rootPanel.add(showProblems()); rootPanel.add(showProblems());
getMainPanel().setHeight(350); getMainPanel().setHeight(350);
} }*/
CheckSession.showLogoutDialog();
} }

View File

@ -6,7 +6,7 @@
<!-- inherits GCUBE Quick tour --> <!-- inherits GCUBE Quick tour -->
<!-- To Comment out --> <!-- To Comment out -->
<!-- <set-property name="user.agent" value="gecko1_8" /> --> <!-- <set-property name="user.agent" value="gecko1_8" /> -->
<inherits name='org.gcube.portlets.widgets.guidedtour.GuidedTour' /> <inherits name='org.gcube.portlets.widgets.guidedtour.GuidedTour' />
<inherits name="com.github.gwtbootstrap.Bootstrap" /> <inherits name="com.github.gwtbootstrap.Bootstrap" />
@ -23,7 +23,7 @@
<inherits name='org.gcube.portlets.widgets.wsmail.WsMail_Widget' /> <inherits name='org.gcube.portlets.widgets.wsmail.WsMail_Widget' />
<inherits name='org.gcube.portlets.widgets.fileupload.FileUpload' /> <inherits name='org.gcube.portlets.widgets.fileupload.FileUpload' />
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
<!-- Specify the app entry point class. --> <!-- Specify the app entry point class. -->
<entry-point <entry-point
class='org.gcube.portlets.user.workspace.client.WorkspacePortlet' /> class='org.gcube.portlets.user.workspace.client.WorkspacePortlet' />

View File

@ -103,6 +103,16 @@
<servlet-name>mailWisdgetServlet</servlet-name> <servlet-name>mailWisdgetServlet</servlet-name>
<servlet-class>org.gcube.portlets.widgets.wsmail.server.WsMailServiceImpl</servlet-class> <servlet-class>org.gcube.portlets.widgets.wsmail.server.WsMailServiceImpl</servlet-class>
</servlet> </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-mapping>
<servlet-name>mailWisdgetServlet</servlet-name> <servlet-name>mailWisdgetServlet</servlet-name>