org.apache.jackrabbit.decorator
Class SessionDecorator

java.lang.Object
  extended byorg.apache.jackrabbit.decorator.SessionDecorator
All Implemented Interfaces:
Session

public class SessionDecorator
extends Object
implements Session

TODO


Constructor Summary
SessionDecorator(DecoratorFactory factory, Repository repository, Session session)
           
 
Method Summary
 void addLockToken(String lt)
          Forwards the method call to the underlying session.
 void checkPermission(String absPath, String actions)
          Forwards the method call to the underlying session.
 void exportDocumentView(String absPath, ContentHandler contentHandler, boolean binaryAsLink, boolean noRecurse)
          Forwards the method call to the underlying session.
 void exportDocumentView(String absPath, OutputStream out, boolean binaryAsLink, boolean noRecurse)
          Forwards the method call to the underlying session.
 void exportSystemView(String absPath, ContentHandler contentHandler, boolean binaryAsLink, boolean noRecurse)
          Forwards the method call to the underlying session.
 void exportSystemView(String absPath, OutputStream out, boolean binaryAsLink, boolean noRecurse)
          Forwards the method call to the underlying session.
 Object getAttribute(String name)
          Forwards the method call to the underlying session.
 String[] getAttributeNames()
          Forwards the method call to the underlying session.
 ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehaviour)
          Forwards the method call to the underlying session.
 Item getItem(String absPath)
          Forwards the method call to the underlying session.
 String[] getLockTokens()
          Forwards the method call to the underlying session.
 String getNamespacePrefix(String uri)
          Forwards the method call to the underlying session.
 String[] getNamespacePrefixes()
          Forwards the method call to the underlying session.
 String getNamespaceURI(String prefix)
          Forwards the method call to the underlying session.
 Node getNodeByUUID(String uuid)
          Forwards the method call to the underlying session.
 Repository getRepository()
          
 Node getRootNode()
          Forwards the method call to the underlying session.
 String getUserID()
          Forwards the method call to the underlying session.
 ValueFactory getValueFactory()
           
 Workspace getWorkspace()
          Forwards the method call to the underlying session.
 boolean hasPendingChanges()
          Forwards the method call to the underlying session.
 Session impersonate(Credentials credentials)
          Forwards the method call to the underlying session.
 void importXML(String parentAbsPath, InputStream in, int uuidBehaviour)
          Forwards the method call to the underlying session.
 boolean isLive()
           
 boolean itemExists(String path)
          Forwards the method call to the underlying session.
 void logout()
          Forwards the method call to the underlying session.
 void move(String srcAbsPath, String destAbsPath)
          Forwards the method call to the underlying session.
 void refresh(boolean keepChanges)
          Forwards the method call to the underlying session.
 void removeLockToken(String lt)
          Forwards the method call to the underlying session.
 void save()
          Forwards the method call to the underlying session.
 void setNamespacePrefix(String prefix, String uri)
          Forwards the method call to the underlying session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionDecorator

public SessionDecorator(DecoratorFactory factory,
                        Repository repository,
                        Session session)
Method Detail

getRepository

public Repository getRepository()

Specified by:
getRepository in interface Session

getUserID

public String getUserID()
Forwards the method call to the underlying session.

Specified by:
getUserID in interface Session

getAttribute

public Object getAttribute(String name)
Forwards the method call to the underlying session.

Specified by:
getAttribute in interface Session

getAttributeNames

public String[] getAttributeNames()
Forwards the method call to the underlying session.

Specified by:
getAttributeNames in interface Session

getWorkspace

public Workspace getWorkspace()
Forwards the method call to the underlying session. The returned workspace is wrapped into a workspace decorator using the decorator factory.

Specified by:
getWorkspace in interface Session
Returns:
decorated workspace

impersonate

public Session impersonate(Credentials credentials)
                    throws LoginException,
                           RepositoryException
Forwards the method call to the underlying session. The returned session is wrapped into a session decorator using the decorator factory.

Specified by:
impersonate in interface Session
Returns:
decorated session
Throws:
LoginException
RepositoryException

getRootNode

public Node getRootNode()
                 throws RepositoryException
Forwards the method call to the underlying session. The returned node is wrapped into a node decorator using the decorator factory.

Specified by:
getRootNode in interface Session
Returns:
decorated node
Throws:
RepositoryException

getNodeByUUID

public Node getNodeByUUID(String uuid)
                   throws ItemNotFoundException,
                          RepositoryException
Forwards the method call to the underlying session. The returned node is wrapped into a node decorator using the decorator factory.

Specified by:
getNodeByUUID in interface Session
Returns:
decorated node
Throws:
ItemNotFoundException
RepositoryException

getItem

public Item getItem(String absPath)
             throws PathNotFoundException,
                    RepositoryException
Forwards the method call to the underlying session. The returned item is wrapped into a node, property, or item decorator using the decorator factory. The decorator type depends on the type of the underlying item.

Specified by:
getItem in interface Session
Returns:
decorated item, property, or node
Throws:
PathNotFoundException
RepositoryException

itemExists

public boolean itemExists(String path)
                   throws RepositoryException
Forwards the method call to the underlying session.

Specified by:
itemExists in interface Session
Throws:
RepositoryException

move

public void move(String srcAbsPath,
                 String destAbsPath)
          throws ItemExistsException,
                 PathNotFoundException,
                 VersionException,
                 RepositoryException
Forwards the method call to the underlying session.

Specified by:
move in interface Session
Throws:
ItemExistsException
PathNotFoundException
VersionException
RepositoryException

save

public void save()
          throws AccessDeniedException,
                 ConstraintViolationException,
                 InvalidItemStateException,
                 VersionException,
                 LockException,
                 RepositoryException
Forwards the method call to the underlying session.

Specified by:
save in interface Session
Throws:
AccessDeniedException
ConstraintViolationException
InvalidItemStateException
VersionException
LockException
RepositoryException

refresh

public void refresh(boolean keepChanges)
             throws RepositoryException
Forwards the method call to the underlying session.

Specified by:
refresh in interface Session
Throws:
RepositoryException

hasPendingChanges

public boolean hasPendingChanges()
                          throws RepositoryException
Forwards the method call to the underlying session.

Specified by:
hasPendingChanges in interface Session
Throws:
RepositoryException

checkPermission

public void checkPermission(String absPath,
                            String actions)
                     throws AccessControlException,
                            RepositoryException
Forwards the method call to the underlying session.

Specified by:
checkPermission in interface Session
Throws:
AccessControlException
RepositoryException

getImportContentHandler

public ContentHandler getImportContentHandler(String parentAbsPath,
                                              int uuidBehaviour)
                                       throws PathNotFoundException,
                                              ConstraintViolationException,
                                              VersionException,
                                              LockException,
                                              RepositoryException
Forwards the method call to the underlying session.

Specified by:
getImportContentHandler in interface Session
Throws:
PathNotFoundException
ConstraintViolationException
VersionException
LockException
RepositoryException

importXML

public void importXML(String parentAbsPath,
                      InputStream in,
                      int uuidBehaviour)
               throws IOException,
                      PathNotFoundException,
                      ItemExistsException,
                      ConstraintViolationException,
                      VersionException,
                      InvalidSerializedDataException,
                      LockException,
                      RepositoryException
Forwards the method call to the underlying session.

Specified by:
importXML in interface Session
Throws:
IOException
PathNotFoundException
ItemExistsException
ConstraintViolationException
VersionException
InvalidSerializedDataException
LockException
RepositoryException

exportSystemView

public void exportSystemView(String absPath,
                             ContentHandler contentHandler,
                             boolean binaryAsLink,
                             boolean noRecurse)
                      throws PathNotFoundException,
                             SAXException,
                             RepositoryException
Forwards the method call to the underlying session.

Specified by:
exportSystemView in interface Session
Throws:
PathNotFoundException
SAXException
RepositoryException

exportSystemView

public void exportSystemView(String absPath,
                             OutputStream out,
                             boolean binaryAsLink,
                             boolean noRecurse)
                      throws IOException,
                             PathNotFoundException,
                             RepositoryException
Forwards the method call to the underlying session.

Specified by:
exportSystemView in interface Session
Throws:
IOException
PathNotFoundException
RepositoryException

exportDocumentView

public void exportDocumentView(String absPath,
                               ContentHandler contentHandler,
                               boolean binaryAsLink,
                               boolean noRecurse)
                        throws PathNotFoundException,
                               SAXException,
                               RepositoryException
Forwards the method call to the underlying session.

Specified by:
exportDocumentView in interface Session
Throws:
PathNotFoundException
SAXException
RepositoryException

exportDocumentView

public void exportDocumentView(String absPath,
                               OutputStream out,
                               boolean binaryAsLink,
                               boolean noRecurse)
                        throws IOException,
                               PathNotFoundException,
                               RepositoryException
Forwards the method call to the underlying session.

Specified by:
exportDocumentView in interface Session
Throws:
IOException
PathNotFoundException
RepositoryException

setNamespacePrefix

public void setNamespacePrefix(String prefix,
                               String uri)
                        throws NamespaceException,
                               RepositoryException
Forwards the method call to the underlying session.

Specified by:
setNamespacePrefix in interface Session
Throws:
NamespaceException
RepositoryException

getNamespacePrefixes

public String[] getNamespacePrefixes()
                              throws RepositoryException
Forwards the method call to the underlying session.

Specified by:
getNamespacePrefixes in interface Session
Throws:
RepositoryException

getNamespaceURI

public String getNamespaceURI(String prefix)
                       throws NamespaceException,
                              RepositoryException
Forwards the method call to the underlying session.

Specified by:
getNamespaceURI in interface Session
Throws:
NamespaceException
RepositoryException

getNamespacePrefix

public String getNamespacePrefix(String uri)
                          throws NamespaceException,
                                 RepositoryException
Forwards the method call to the underlying session.

Specified by:
getNamespacePrefix in interface Session
Throws:
NamespaceException
RepositoryException

logout

public void logout()
Forwards the method call to the underlying session.

Specified by:
logout in interface Session

addLockToken

public void addLockToken(String lt)
Forwards the method call to the underlying session.

Specified by:
addLockToken in interface Session

getLockTokens

public String[] getLockTokens()
Forwards the method call to the underlying session.

Specified by:
getLockTokens in interface Session

removeLockToken

public void removeLockToken(String lt)
Forwards the method call to the underlying session.

Specified by:
removeLockToken in interface Session

getValueFactory

public ValueFactory getValueFactory()
                             throws UnsupportedRepositoryOperationException,
                                    RepositoryException
Specified by:
getValueFactory in interface Session
Throws:
UnsupportedRepositoryOperationException
RepositoryException

isLive

public boolean isLive()
Specified by:
isLive in interface Session


Copyright © 2004-2005 . All Rights Reserved.