From b52c8b344846458c2bc36c3e1354893f205f3fd7 Mon Sep 17 00:00:00 2001 From: Bruno Sinou Date: Tue, 21 Feb 2012 13:44:34 +0000 Subject: [PATCH] add a protected create method to enable extension for specific rap client applications. git-svn-id: https://svn.argeo.org/commons/trunk@5105 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../org/argeo/security/ui/rap/SecureEntryPoint.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/security/plugins/org.argeo.security.ui.rap/src/main/java/org/argeo/security/ui/rap/SecureEntryPoint.java b/security/plugins/org.argeo.security.ui.rap/src/main/java/org/argeo/security/ui/rap/SecureEntryPoint.java index dced69294..0e5ad6ec0 100644 --- a/security/plugins/org.argeo.security.ui.rap/src/main/java/org/argeo/security/ui/rap/SecureEntryPoint.java +++ b/security/plugins/org.argeo.security.ui.rap/src/main/java/org/argeo/security/ui/rap/SecureEntryPoint.java @@ -44,8 +44,13 @@ public class SecureEntryPoint implements IEntryPoint { /** Default session timeout is 8 hours (European working day length) */ private Integer sessionTimeout = 8 * 60 * 60; + /** Override to provide an application specific workbench advisor */ + protected RapWorkbenchAdvisor createRapWorkbenchAdvisor(String username) { + return new RapWorkbenchAdvisor(username); + } + @Override - public int createUI() { + public final int createUI() { // Short login timeout so that the modal dialog login doesn't hang // around too long RWT.getRequest().getSession().setMaxInactiveInterval(loginTimeout); @@ -114,8 +119,7 @@ public class SecureEntryPoint implements IEntryPoint { try { returnCode = Subject.doAs(subject, new PrivilegedAction() { public Integer run() { - RapWorkbenchAdvisor workbenchAdvisor = new RapWorkbenchAdvisor( - username); + RapWorkbenchAdvisor workbenchAdvisor = createRapWorkbenchAdvisor(username); int result = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor); return new Integer(result); -- 2.30.2