Ontimize Document Management 0.035EN

com.ontimize.dms.jcr
Interface JcrLockable

All Known Subinterfaces:
JcrNode, JcrProperty
All Known Implementing Classes:
JcrNodeBase, JcrPropertyBase

public interface JcrLockable

Implements this interface to allow a lock management over a JCR element.

Since:
19/06/2009, 22/06/2009, 08/01/2010 Added unlock: reset the current node state., 05/02/2010 Changed: lock file without length in some actions.

Method Summary
 JcrLock isLocked()
          Check if the current node is locked (directory or file).
 JcrLock lock(Status status)
          Tags the current element as locked with the Status.
 JcrLock unlock()
           
 JcrLock unlock(boolean emptyLength)
          
 JcrLock unlock(Status status)
           
 JcrLock unlock(Status[] status)
           
 

Method Detail

isLocked

JcrLock isLocked()
                 throws RepositoryException

Check if the current node is locked (directory or file).

Directory is locked if any of this children is locked.

File is locked if STREAM_STATUS exists.

Returns:
Lock handler if the node is locked, otherwise null.
Throws:
RepositoryException - if JCR exception ocurrs.

lock

JcrLock lock(Status status)
             throws RepositoryException

Tags the current element as locked with the Status.

Parameters:
status - New status.
Returns:
The created lock.
Throws:
RepositoryException - if JCR exception ocurrs.

unlock

JcrLock unlock()
               throws RepositoryException
Throws:
RepositoryException

unlock

JcrLock unlock(boolean emptyLength)
               throws RepositoryException

Parameters:
emptyLength - Allows to set a zero length to reset status.
Returns:
Throws:
RepositoryException

unlock

JcrLock unlock(Status status)
               throws RepositoryException
Throws:
RepositoryException

unlock

JcrLock unlock(Status[] status)
               throws RepositoryException
Throws:
RepositoryException

Ontimize Document Management