1 package org
.argeo
.security
.ui
.rcp
;
3 import org
.eclipse
.ui
.application
.IWorkbenchWindowConfigurer
;
4 import org
.eclipse
.ui
.application
.WorkbenchAdvisor
;
5 import org
.eclipse
.ui
.application
.WorkbenchWindowAdvisor
;
7 public class SecureWorkbenchAdvisor
extends WorkbenchAdvisor
{
8 static final String DEFAULT_PERSPECTIVE_ID
= "org.argeo.security.ui.adminSecurityPerspective"; //$NON-NLS-1$
9 public final static String INITIAL_PERSPECTIVE_PROPERTY
= "org.argeo.security.ui.initialPerspective";
11 private final String username
;
12 private String initialPerspective
= System
.getProperty(
13 INITIAL_PERSPECTIVE_PROPERTY
, DEFAULT_PERSPECTIVE_ID
);
15 public SecureWorkbenchAdvisor(String username
) {
17 this.username
= username
;
20 public WorkbenchWindowAdvisor
createWorkbenchWindowAdvisor(
21 IWorkbenchWindowConfigurer configurer
) {
22 return new SecureWorkbenchWindowAdvisor(configurer
, username
);
25 public String
getInitialWindowPerspectiveId() {
26 return initialPerspective
;