info.magnolia.jcr.util
Class SessionUtil

java.lang.Object
  extended by info.magnolia.jcr.util.SessionUtil

public class SessionUtil
extends Object

Session-related utility methods.

Version:
$Id$

Constructor Summary
SessionUtil()
           
 
Method Summary
static javax.jcr.Node getNode(javax.jcr.Session session, String path)
          Return the Node for the Given Path from the given repository.
static javax.jcr.Node getNode(String workspace, String path)
          Return the Node for the Given Path from the given repository.
static javax.jcr.Node getNodeByIdentifier(String workspace, String id)
          Return the Node by the given identifier from the given repository.
static boolean hasSameUnderlyingSession(javax.jcr.Session first, javax.jcr.Session second)
           
static javax.jcr.Session unwrap(javax.jcr.Session session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionUtil

public SessionUtil()
Method Detail

hasSameUnderlyingSession

public static boolean hasSameUnderlyingSession(javax.jcr.Session first,
                                               javax.jcr.Session second)

unwrap

public static javax.jcr.Session unwrap(javax.jcr.Session session)

getNode

public static javax.jcr.Node getNode(String workspace,
                                     String path)
Return the Node for the Given Path from the given repository. In case of Exception, return null. Given path can be absolute path or relative path to root node of workspace.


getNode

public static javax.jcr.Node getNode(javax.jcr.Session session,
                                     String path)
Return the Node for the Given Path from the given repository. In case of Exception, return null. Given path can be absolute path or relative path to root node of workspace.


getNodeByIdentifier

public static javax.jcr.Node getNodeByIdentifier(String workspace,
                                                 String id)
Return the Node by the given identifier from the given repository. In case of Exception, return null.



Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.