Improve CMS UI framework.
[lgpl/argeo-commons.git] / org.argeo.jcr / src / org / argeo / jcr / Jcr.java
index c3db4b604c71b1e8a955b45b2b5019de7a13dd14..0f6059c7f36d09dee42d6c0f85feeb55d622512e 100644 (file)
@@ -366,8 +366,18 @@ public class Jcr {
                }
        }
 
-       /** Retrieves the {@link Session} related to this node. */
+       /**
+        * Retrieves the {@link Session} related to this node.
+        * 
+        * @deprecated Use {@link #getSession(Node)} instead.
+        */
+       @Deprecated
        public static Session session(Node node) {
+               return getSession(node);
+       }
+
+       /** Retrieves the {@link Session} related to this node. */
+       public static Session getSession(Node node) {
                try {
                        return node.getSession();
                } catch (RepositoryException e) {
@@ -414,6 +424,11 @@ public class Jcr {
                }
        }
 
+       /** Safely and silently logs out the underlying session. */
+       public static void logout(Node node) {
+               Jcr.logout(session(node));
+       }
+
        /*
         * SECURITY
         */