projects
/
gpl
/
argeo-suite.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce user and session nodes.
[gpl/argeo-suite.git]
/
org.argeo.suite.ui
/
src
/
org
/
argeo
/
suite
/
ui
/
SuiteUi.java
diff --git
a/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java
b/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java
index 1231d9262efda834e893a75f6a4dd81b670f79af..cad5a9b994e093dce57c08c18dc147e630f54686 100644
(file)
--- a/
org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java
+++ b/
org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java
@@
-11,7
+11,6
@@
import javax.jcr.Session;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.argeo.api.NodeConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.argeo.api.NodeConstants;
-import org.argeo.api.NodeUtils;
import org.argeo.cms.ui.CmsView;
import org.argeo.cms.ui.util.CmsUiUtils;
import org.argeo.jcr.Jcr;
import org.argeo.cms.ui.CmsView;
import org.argeo.cms.ui.util.CmsUiUtils;
import org.argeo.jcr.Jcr;
@@
-29,8
+28,8
@@
class SuiteUi extends Composite {
private Composite dynamicArea;
private Session sysSession;
private Composite dynamicArea;
private Session sysSession;
-
private Session homeSession;
- private Node user
Home
;
+
//
private Session homeSession;
+ private Node user
Dir
;
private Map<String, SuiteLayer> layers = new HashMap<>();
private Map<String, Composite> workAreas = new HashMap<>();
private Map<String, SuiteLayer> layers = new HashMap<>();
private Map<String, Composite> workAreas = new HashMap<>();
@@
-105,7
+104,7
@@
class SuiteUi extends Composite {
}
if (context == null) {
if (!cmsView.isAnonymous())
}
if (context == null) {
if (!cmsView.isAnonymous())
- context = user
Home
;
+ context = user
Dir
;
}
Composite toShow = getLayer(layerId, context);
currentLayerId = layerId;
}
Composite toShow = getLayer(layerId, context);
currentLayerId = layerId;
@@
-152,9
+151,9
@@
class SuiteUi extends Composite {
}
synchronized void logout() {
}
synchronized void logout() {
- user
Home
= null;
+ user
Dir
= null;
Jcr.logout(sysSession);
Jcr.logout(sysSession);
-
Jcr.logout(homeSession);
+
//
Jcr.logout(homeSession);
currentLayerId = null;
workAreas.clear();
}
currentLayerId = null;
workAreas.clear();
}
@@
-179,18
+178,18
@@
class SuiteUi extends Composite {
// return sysSession;
// }
//
// return sysSession;
// }
//
- synchronized void initSessions(Repository repository) throws RepositoryException {
+ synchronized void initSessions(Repository repository
, String userDirPath
) throws RepositoryException {
this.sysSession = repository.login();
this.sysSession = repository.login();
-
this.homeSession = repository.login(NodeConstants.HOME_WORKSPACE);
- user
Home = NodeUtils.getUserHome(homeSession
);
+
//
this.homeSession = repository.login(NodeConstants.HOME_WORKSPACE);
+ user
Dir = sysSession.getNode(userDirPath
);
addDisposeListener((e) -> {
Jcr.logout(sysSession);
addDisposeListener((e) -> {
Jcr.logout(sysSession);
-
Jcr.logout(homeSession);
+
//
Jcr.logout(homeSession);
});
}
});
}
- Node getUser
Home
() {
- return user
Home
;
+ Node getUser
Dir
() {
+ return user
Dir
;
}
Session getSysSession() {
}
Session getSysSession() {
@@
-202,8
+201,8
@@
class SuiteUi extends Composite {
return sysSession;
if (NodeConstants.SYS_WORKSPACE.equals(workspaceName))
return sysSession;
return sysSession;
if (NodeConstants.SYS_WORKSPACE.equals(workspaceName))
return sysSession;
-
else if (NodeConstants.HOME_WORKSPACE.equals(workspaceName))
-
return homeSession;
+
//
else if (NodeConstants.HOME_WORKSPACE.equals(workspaceName))
+
//
return homeSession;
else
throw new IllegalArgumentException("Unknown workspace " + workspaceName);
}
else
throw new IllegalArgumentException("Unknown workspace " + workspaceName);
}