import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
-/** The view for the default ergonomics of Argeo Suite. */
+/** The view for the default UX of Argeo Suite. */
class SuiteUi extends CmsSwtUi {
private static final long serialVersionUID = 6207018859086689108L;
private final static CmsLog log = CmsLog.getLog(SuiteUi.class);
private Composite sidePane;
private Composite dynamicArea;
-// private Session sysSession;
-// private Session homeSession;
private Content userDir;
private Map<String, SuiteLayer> layers = new HashMap<>();
private String currentLayerId = null;
private boolean loginScreen = false;
-// private String postLoginState;
public SuiteUi(Composite parent, int style) {
super(parent, style);
}
if (context == null) {
if (!getCmsView().isAnonymous())
- context = getUserDirNode();
+ context = getUserDir();
}
Composite toShow = getLayer(layerId, context);
if (toShow != null) {
currentLayerId = layerId;
if (!isDisposed()) {
-// getDisplay().syncExec(() -> {
if (!toShow.isDisposed()) {
toShow.moveAbove(null);
} else {
toShow.moveAbove(null);
}
dynamicArea.layout(true, true);
-// });
}
return toShow;
} else {
synchronized void logout() {
userDir = null;
-// Jcr.logout(sysSession);
-// Jcr.logout(homeSession);
currentLayerId = null;
workAreas.clear();
}
return belowHeader;
}
-// Session getSysSession() {
-// return sysSession;
-// }
-//
-// synchronized void initSessions(Repository repository, String userDirPath) throws RepositoryException {
-// this.sysSession = repository.login();
-// this.homeSession = repository.login(CmsConstants.HOME_WORKSPACE);
-// userDir = sysSession.getNode(userDirPath);
-// addDisposeListener((e) -> {
-// Jcr.logout(sysSession);
-// Jcr.logout(homeSession);
-// });
-// }
-
- @Deprecated
- Content getUserDirNode() {
- if (userDir == null)
- return null;
- return userDir;
- }
-
Content getUserDir() {
return userDir;
}
this.userDir = userDir;
}
-// Session getSysSession() {
-// return sysSession;
-// }
-
-// Session getSession(String workspaceName) {
-// if (workspaceName == null)
-// return sysSession;
-// if (CmsConstants.SYS_WORKSPACE.equals(workspaceName))
-// return sysSession;
-// else if (CmsConstants.HOME_WORKSPACE.equals(workspaceName))
-// return homeSession;
-// else
-// throw new IllegalArgumentException("Unknown workspace " + workspaceName);
-// }
-
public Localized getTitle() {
return title;
}
public void setLoginScreen(boolean loginScreen) {
this.loginScreen = loginScreen;
}
-
-// public String getPostLoginState() {
-// return postLoginState;
-// }
-//
-// public void setPostLoginState(String postLoginState) {
-// this.postLoginState = postLoginState;
-// }
-
}