projects
/
lgpl
/
argeo-commons.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5644c1
)
Add Jcr utilities.
author
Mathieu Baudier <mbaudier@argeo.org>
Mon, 26 Oct 2020 09:41:51 +0000
(10:41 +0100)
committer
Mathieu Baudier <mbaudier@argeo.org>
Mon, 26 Oct 2020 09:41:51 +0000
(10:41 +0100)
org.argeo.jcr/src/org/argeo/jcr/Jcr.java
patch
|
blob
|
history
diff --git
a/org.argeo.jcr/src/org/argeo/jcr/Jcr.java
b/org.argeo.jcr/src/org/argeo/jcr/Jcr.java
index 0f6059c7f36d09dee42d6c0f85feeb55d622512e..3ee235f62fd6c2afa02115d2545d7b86711b0a3e 100644
(file)
--- a/
org.argeo.jcr/src/org/argeo/jcr/Jcr.java
+++ b/
org.argeo.jcr/src/org/argeo/jcr/Jcr.java
@@
-385,6
+385,15
@@
public class Jcr {
}
}
+ /** Retrieves the root node related to this session. */
+ public static Node getRootNode(Session session) {
+ try {
+ return session.getRootNode();
+ } catch (RepositoryException e) {
+ throw new IllegalStateException("Cannot get root node for " + session, e);
+ }
+ }
+
/**
* Saves the {@link Session} related to this node. Note that all other unrelated
* modifications in this session will also be saved.