Ontimize Document Management 0.035EN

com.ontimize.dms.jcr
Interface JcrSession

All Known Implementing Classes:
JcrSessionImpl

public interface JcrSession

JCR repository session wrapper.

Wrappers session information.

Since:
18/03/2009, 21/04/2009, 08/10/2010 Refactoring. Change XPath query calls.

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.
 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.
 JcrServer getServer()
           
 Session getSession()
          Returns the internal JCR related session.
 int getSessionId()
           
 boolean isLive()
          Check if the current session is active.
 

Method Detail

getSessionId

int getSessionId()

getSession

Session getSession()

Returns the internal JCR related session.

Returns:
The internal JCR related session.

getServer

JcrServer getServer()

getNode

JcrNode getNode(java.util.Map fields)
                throws RepositoryException
Throws:
RepositoryException

getNode

JcrNode getNode(java.lang.String keys,
                Document document)
                throws RepositoryException

Returns a node of the JCR repository.

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

JcrNode getNode(java.lang.String keys,
                Document document,
                java.util.Map fields,
                long index)
                throws RepositoryException

Returns a node of the JCR repository.

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.

isLive

boolean isLive()
               throws RepositoryException

Check if the current session is active.

Returns:
True if the session is enabled.
Throws:
RepositoryException - if JCR exception ocurrs.

add

JcrResult[] add(java.lang.String keys,
                Document[] documents,
                java.util.Map info,
                java.util.Map properties)
                throws RepositoryException

Inserts a documents list in the repository.

Parameters:
keys - Internal base keys.
documents - Document to insert.
Throws:
AccessDeniedException - if can't write in the parent node.
RepositoryException - if JCR exception ocurrs.

close

void close()

Closes the current session.


Ontimize Document Management