org.apache.jackrabbit.webdav.jcr
Class JcrDavSession

java.lang.Object
  extended by org.apache.jackrabbit.webdav.jcr.JcrDavSession
All Implemented Interfaces:
DavSession
Direct Known Subclasses:
DavSessionImpl

public abstract class JcrDavSession
extends Object
implements DavSession

JcrDavSession specific base implementation of the DavSession interface, which simply wraps a Session object. This implementation adds a utility method that allows to unwrap the underlying repository session.
Note, that in this basic implementation the following methods are simply forwarded to the corresponding call on Session:

Subclasses may overwrite or extend this behaviour.


Constructor Summary
protected JcrDavSession(Session session)
           
 
Method Summary
 void addLockToken(String token)
          Adds a lock token to this DavSession.
static void checkImplementation(DavSession davSession)
           
 String[] getLockTokens()
          Returns the lock tokens of this DavSession.
 Session getRepositorySession()
          Unwrap the repository session object.
static Session getRepositorySession(DavSession davSession)
           
 void removeLockToken(String token)
          Removes a lock token from this DavSession.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jackrabbit.webdav.DavSession
addReference, removeReference
 

Constructor Detail

JcrDavSession

protected JcrDavSession(Session session)
Parameters:
session -
Method Detail

checkImplementation

public static void checkImplementation(DavSession davSession)
                                throws DavException
Parameters:
davSession -
Throws:
DavException

getRepositorySession

public static Session getRepositorySession(DavSession davSession)
                                    throws DavException
Parameters:
davSession -
Returns:
Throws:
DavException

getRepositorySession

public Session getRepositorySession()
Unwrap the repository session object.

Returns:
the session object wrapped by this DavSession

addLockToken

public void addLockToken(String token)
Description copied from interface: DavSession
Adds a lock token to this DavSession.

Specified by:
addLockToken in interface DavSession
Parameters:
token -
See Also:
DavSession.addLockToken(String)

getLockTokens

public String[] getLockTokens()
Description copied from interface: DavSession
Returns the lock tokens of this DavSession.

Specified by:
getLockTokens in interface DavSession
Returns:
See Also:
DavSession.getLockTokens()

removeLockToken

public void removeLockToken(String token)
Description copied from interface: DavSession
Removes a lock token from this DavSession.

Specified by:
removeLockToken in interface DavSession
Parameters:
token -
See Also:
DavSession.removeLockToken(String)


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.