Ontimize Document Management 0.035EN

com.ontimize.dms.jcr
Class JcrSessionImpl

java.lang.Object
  extended by com.ontimize.dms.jcr.JcrSessionImpl
All Implemented Interfaces:
JcrSession

public class JcrSessionImpl
extends java.lang.Object
implements JcrSession


Field Summary
protected  JcrServer server
           
protected  Session session
           
protected  int sessionId
           
 
Constructor Summary
JcrSessionImpl(int sessionId, Session session, JcrServer server)
           
 
Method Summary
 JcrResult[] add(java.lang.String keys, Document[] documents, java.util.Map info, java.util.Map properties)
          Inserts a documents list in the repository.
 void close()
          Closes the current session.
protected  JcrNode createRootNode()
           
protected  long getIndex(Node node)
           
protected  JcrNode getInnerNode(java.lang.String keys, Document document, java.util.Map fields, long index)
           
 JcrNode getNode(java.util.Map fields)
           
 JcrNode getNode(java.lang.String keys, Document document)
          Returns a node of the JCR repository.
 JcrNode getNode(java.lang.String keys, Document document, java.util.Map fields, long index)
          Returns a node of the JCR repository.
protected  Node getRootNode()
           
 JcrServer getServer()
           
 Session getSession()
          Returns the internal JCR related session.
 int getSessionId()
           
 boolean isLive()
          Check if the current session is active.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionId

protected int sessionId

session

protected Session session

server

protected JcrServer server
Constructor Detail

JcrSessionImpl

public JcrSessionImpl(int sessionId,
                      Session session,
                      JcrServer server)
               throws RepositoryException
Throws:
RepositoryException
Method Detail

getRootNode

protected Node getRootNode()
                    throws RepositoryException
Throws:
RepositoryException

getSessionId

public int getSessionId()
Specified by:
getSessionId in interface JcrSession

getSession

public Session getSession()
Description copied from interface: JcrSession

Returns the internal JCR related session.

Specified by:
getSession in interface JcrSession
Returns:
The internal JCR related session.

getServer

public JcrServer getServer()
Specified by:
getServer in interface JcrSession

createRootNode

protected JcrNode createRootNode()
                          throws RepositoryException
Throws:
RepositoryException

getNode

public JcrNode getNode(java.util.Map fields)
                throws RepositoryException
Specified by:
getNode in interface JcrSession
Throws:
RepositoryException

getNode

public JcrNode getNode(java.lang.String keys,
                       Document document)
                throws RepositoryException
Description copied from interface: JcrSession

Returns a node of the JCR repository.

Specified by:
getNode in interface JcrSession
Parameters:
keys - Internal base keys.
document - Document to return.
Returns:
JcrNode if the node exists.
JcrNode keys node if the document is null.
JcrNode null if the document is null and keys are null.
JcrNode null if the query returns more than one result.
Throws:
RepositoryException - if JCR exception ocurrs.

getNode

public JcrNode getNode(java.lang.String keys,
                       Document document,
                       java.util.Map fields,
                       long index)
                throws RepositoryException
Description copied from interface: JcrSession

Returns a node of the JCR repository.

Specified by:
getNode in interface JcrSession
Parameters:
keys - Internal base keys.
document - Document to return.
fields - Properties list.
index - First index is equals to 1, last index is equals to list size.
Returns:
JcrNode if the node exists.
JcrNode keys node if the document is null.
JcrNode null if the document is null and keys are null.
JcrNode null if the query returns more than one result.
Throws:
RepositoryException - if JCR exception ocurrs.

getInnerNode

protected JcrNode getInnerNode(java.lang.String keys,
                               Document document,
                               java.util.Map fields,
                               long index)
                        throws RepositoryException
Throws:
RepositoryException

getIndex

protected long getIndex(Node node)
                 throws RepositoryException
Throws:
RepositoryException

isLive

public boolean isLive()
               throws RepositoryException
Description copied from interface: JcrSession

Check if the current session is active.

Specified by:
isLive in interface JcrSession
Returns:
True if the session is enabled.
Throws:
RepositoryException - if JCR exception ocurrs.

add

public JcrResult[] add(java.lang.String keys,
                       Document[] documents,
                       java.util.Map info,
                       java.util.Map properties)
                throws RepositoryException
Description copied from interface: JcrSession

Inserts a documents list in the repository.

Specified by:
add in interface JcrSession
Parameters:
keys - Internal base keys.
documents - Document to insert.
Throws:
RepositoryException - if JCR exception ocurrs.

close

public void close()
Description copied from interface: JcrSession

Closes the current session.

Specified by:
close in interface JcrSession

Ontimize Document Management