From: Bruno Sinou Date: Tue, 21 Feb 2012 13:44:34 +0000 (+0000) Subject: add a protected create method to enable extension for specific rap client applications. X-Git-Tag: argeo-commons-2.1.30~1009 X-Git-Url: https://git.argeo.org/?a=commitdiff_plain;h=b52c8b344846458c2bc36c3e1354893f205f3fd7;p=lgpl%2Fargeo-commons.git 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 --- 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);