org.apache.jackrabbit.jca
Class JCASessionHandle

java.lang.Object
  extended by org.apache.jackrabbit.jca.JCASessionHandle
All Implemented Interfaces:
Session, XASession

public final class JCASessionHandle
extends Object
implements XASession

This class implements the JCA implementation of session.


Constructor Summary
JCASessionHandle(JCAManagedConnection mc)
          Construct a new session.
 
Method Summary
 void addLockToken(String arg0)
          Add lock token.
 void checkPermission(String arg0, String arg1)
          Check permission.
 void exportDocumentView(String arg0, ContentHandler arg1, boolean arg2, boolean arg3)
          Export document view.
 void exportDocumentView(String arg0, OutputStream arg1, boolean arg2, boolean arg3)
          Export document view.
 void exportSystemView(String arg0, ContentHandler arg1, boolean arg2, boolean arg3)
          Export system view.
 void exportSystemView(String arg0, OutputStream arg1, boolean arg2, boolean arg3)
          Export system view.
 Object getAttribute(String name)
          Return the attribute.
 String[] getAttributeNames()
          Return the attribute names.
 ContentHandler getImportContentHandler(String arg0, int arg1)
          Return the import content handler.
 Item getItem(String arg0)
          Return the item.
 String[] getLockTokens()
          Return the lock tokens.
 JCAManagedConnection getManagedConnection()
          Return the managed connection.
 String getNamespacePrefix(String arg0)
          Return namespace prefix.
 String[] getNamespacePrefixes()
          Return namespace prefixes.
 String getNamespaceURI(String arg0)
          Return namespace URI.
 Node getNodeByUUID(String uuid)
          Return node by UUID.
 Repository getRepository()
          Return the repository.
 Node getRootNode()
          Return the root node.
 String getUserID()
          Return the user id.
 ValueFactory getValueFactory()
          Return the value factory.
 Workspace getWorkspace()
          Return the workspace.
 XAResource getXAResource()
          Returns the XAResource associated with this session.
 boolean hasPendingChanges()
          Return true if it has pending changes.
 Session impersonate(Credentials cred)
          Impersonate another user.
 void importXML(String arg0, InputStream arg1, int arg2)
          Import XML content.
 boolean isLive()
          Return true if session is live.
 boolean itemExists(String arg0)
          Return true if item exists.
 void logout()
          Logout the session.
 void move(String arg0, String arg1)
          Move the item.
 void refresh(boolean arg0)
          Refresh the session.
 void removeLockToken(String arg0)
          Remove lock token.
 void save()
          Save the session.
 void setManagedConnection(JCAManagedConnection mc)
          Set the managed connection.
 void setNamespacePrefix(String arg0, String arg1)
          Set namespace prefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCASessionHandle

public JCASessionHandle(JCAManagedConnection mc)
Construct a new session.

Method Detail

getManagedConnection

public JCAManagedConnection getManagedConnection()
Return the managed connection.


setManagedConnection

public void setManagedConnection(JCAManagedConnection mc)
Set the managed connection.


getRepository

public Repository getRepository()
Return the repository.

Specified by:
getRepository in interface Session

getUserID

public String getUserID()
Return the user id.

Specified by:
getUserID in interface Session

getAttribute

public Object getAttribute(String name)
Return the attribute.

Specified by:
getAttribute in interface Session

getAttributeNames

public String[] getAttributeNames()
Return the attribute names.

Specified by:
getAttributeNames in interface Session

getWorkspace

public Workspace getWorkspace()
Return the workspace.

Specified by:
getWorkspace in interface Session

impersonate

public Session impersonate(Credentials cred)
                    throws LoginException,
                           RepositoryException
Impersonate another user.

Specified by:
impersonate in interface Session
Throws:
LoginException
RepositoryException

getRootNode

public Node getRootNode()
                 throws RepositoryException
Return the root node.

Specified by:
getRootNode in interface Session
Throws:
RepositoryException

getNodeByUUID

public Node getNodeByUUID(String uuid)
                   throws ItemNotFoundException,
                          RepositoryException
Return node by UUID.

Specified by:
getNodeByUUID in interface Session
Throws:
ItemNotFoundException
RepositoryException

getItem

public Item getItem(String arg0)
             throws PathNotFoundException,
                    RepositoryException
Return the item.

Specified by:
getItem in interface Session
Throws:
PathNotFoundException
RepositoryException

itemExists

public boolean itemExists(String arg0)
                   throws RepositoryException
Return true if item exists.

Specified by:
itemExists in interface Session
Throws:
RepositoryException

move

public void move(String arg0,
                 String arg1)
          throws ItemExistsException,
                 PathNotFoundException,
                 VersionException,
                 ConstraintViolationException,
                 LockException,
                 RepositoryException
Move the item.

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

save

public void save()
          throws AccessDeniedException,
                 ItemExistsException,
                 ConstraintViolationException,
                 InvalidItemStateException,
                 VersionException,
                 LockException,
                 NoSuchNodeTypeException,
                 RepositoryException
Save the session.

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

refresh

public void refresh(boolean arg0)
             throws RepositoryException
Refresh the session.

Specified by:
refresh in interface Session
Throws:
RepositoryException

hasPendingChanges

public boolean hasPendingChanges()
                          throws RepositoryException
Return true if it has pending changes.

Specified by:
hasPendingChanges in interface Session
Throws:
RepositoryException

getValueFactory

public ValueFactory getValueFactory()
                             throws UnsupportedRepositoryOperationException,
                                    RepositoryException
Return the value factory.

Specified by:
getValueFactory in interface Session
Throws:
UnsupportedRepositoryOperationException
RepositoryException

checkPermission

public void checkPermission(String arg0,
                            String arg1)
                     throws AccessControlException,
                            RepositoryException
Check permission.

Specified by:
checkPermission in interface Session
Throws:
AccessControlException
RepositoryException

getImportContentHandler

public ContentHandler getImportContentHandler(String arg0,
                                              int arg1)
                                       throws PathNotFoundException,
                                              ConstraintViolationException,
                                              VersionException,
                                              LockException,
                                              RepositoryException
Return the import content handler.

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

importXML

public void importXML(String arg0,
                      InputStream arg1,
                      int arg2)
               throws IOException,
                      PathNotFoundException,
                      ItemExistsException,
                      ConstraintViolationException,
                      VersionException,
                      InvalidSerializedDataException,
                      LockException,
                      RepositoryException
Import XML content.

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

exportSystemView

public void exportSystemView(String arg0,
                             ContentHandler arg1,
                             boolean arg2,
                             boolean arg3)
                      throws PathNotFoundException,
                             SAXException,
                             RepositoryException
Export system view.

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

exportSystemView

public void exportSystemView(String arg0,
                             OutputStream arg1,
                             boolean arg2,
                             boolean arg3)
                      throws IOException,
                             PathNotFoundException,
                             RepositoryException
Export system view.

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

exportDocumentView

public void exportDocumentView(String arg0,
                               ContentHandler arg1,
                               boolean arg2,
                               boolean arg3)
                        throws PathNotFoundException,
                               SAXException,
                               RepositoryException
Export document view.

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

exportDocumentView

public void exportDocumentView(String arg0,
                               OutputStream arg1,
                               boolean arg2,
                               boolean arg3)
                        throws IOException,
                               PathNotFoundException,
                               RepositoryException
Export document view.

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

setNamespacePrefix

public void setNamespacePrefix(String arg0,
                               String arg1)
                        throws NamespaceException,
                               RepositoryException
Set namespace prefix.

Specified by:
setNamespacePrefix in interface Session
Throws:
NamespaceException
RepositoryException

getNamespacePrefixes

public String[] getNamespacePrefixes()
                              throws RepositoryException
Return namespace prefixes.

Specified by:
getNamespacePrefixes in interface Session
Throws:
RepositoryException

getNamespaceURI

public String getNamespaceURI(String arg0)
                       throws NamespaceException,
                              RepositoryException
Return namespace URI.

Specified by:
getNamespaceURI in interface Session
Throws:
NamespaceException
RepositoryException

getNamespacePrefix

public String getNamespacePrefix(String arg0)
                          throws NamespaceException,
                                 RepositoryException
Return namespace prefix.

Specified by:
getNamespacePrefix in interface Session
Throws:
NamespaceException
RepositoryException

logout

public void logout()
Logout the session.

Specified by:
logout in interface Session

isLive

public boolean isLive()
Return true if session is live.

Specified by:
isLive in interface Session

addLockToken

public void addLockToken(String arg0)
Add lock token.

Specified by:
addLockToken in interface Session

getLockTokens

public String[] getLockTokens()
Return the lock tokens.

Specified by:
getLockTokens in interface Session

removeLockToken

public void removeLockToken(String arg0)
Remove lock token.

Specified by:
removeLockToken in interface Session

getXAResource

public XAResource getXAResource()
Returns the XAResource associated with this session.

Specified by:
getXAResource in interface XASession
Returns:
XA resource


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