Ontimize Document Management 0.035EN

com.ontimize.dms.jcr
Class JcrPropertyBase

java.lang.Object
  extended by com.ontimize.dms.jcr.JcrWrapperAbstract
      extended by com.ontimize.dms.jcr.JcrWrapperPropertyAbstract
          extended by com.ontimize.dms.jcr.JcrPropertyBase
All Implemented Interfaces:
JcrLockable, JcrProperty, JcrWrapper, JcrWrapperProperty

public abstract class JcrPropertyBase
extends JcrWrapperPropertyAbstract
implements JcrProperty


Field Summary
protected static java.util.List ALLOWED_STATUS_TYPES
           
protected static java.lang.String DEFAULT_DENY_READ_PATH
           
protected static java.lang.String DEFAULT_DENY_WRITE_PATH
           
protected static java.util.List DENY_READ
          Internal properties.
protected static java.util.List DENY_WRITE
          Internal properties.
protected static java.lang.String JCR_PREFIX
          Internal JCR properties prefix.
 
Fields inherited from class com.ontimize.dms.jcr.JcrWrapperAbstract
MSG_CREATE_NM
 
Constructor Summary
JcrPropertyBase(JcrNode node, java.lang.Boolean hasInternal)
           
 
Method Summary
 void add(java.util.Map properties, java.util.Map alias)
           
static void addToDenyReadList(java.lang.String resource)
           
static void addToDenyWriteList(java.lang.String resource)
           
protected static void addToList(java.util.List list, java.lang.String resource)
           
static boolean canRead(java.lang.String name)
           
static boolean canWrite(java.lang.String name)
           
static java.util.List checkDisabled(Property[] property)
           
protected  void checkEditable()
           
protected  void checkLock()
           
static Value[] convert(Property property)
           
static java.util.Map convert(Property[] property)
           
 JcrResult copy(Node source, java.util.List properties)
           
protected  JcrLock createEmptyLock(Status status)
           
static EntityResult createEmptyResult(java.util.List keys, java.util.Map alias)
           
static java.util.Hashtable createMap(boolean absolute, java.lang.String base, Node node, java.util.List keys, java.util.Map alias)
           
static java.util.Hashtable createMap(boolean absolute, java.lang.String base, Node node, java.util.List keys, java.util.Map alias, boolean hasInternal)
           
static EntityResult createResult(boolean absolute, java.lang.String base, Node node, java.util.List keys, java.util.Map alias)
           
static EntityResult createResult(JcrNodeIterator iterator, java.util.List keys, java.util.Map alias)
           
 java.util.List doAdd(java.util.Map properties, java.util.Map alias, java.util.List excluded)
           
 java.util.List doCopy(Node source, java.util.List properties)
          Copy the given properties list from the source node to the target node.
 java.util.Map doGet(java.util.List properties, java.util.Map alias, java.util.List excluded)
           
 java.util.Map doGetWithout(java.util.List exclude, java.util.Map alias)
           
 JcrResult doRemove(java.util.List excluded)
           
 JcrResult doRemove(java.util.List properties, java.util.List excluded)
           
 JcrResult doRemove(java.util.Map properties, java.util.List excluded)
           
 java.util.List doSet(java.util.Map properties, java.util.Map alias, java.util.List excluded)
           
 java.util.Map get(java.util.List properties, java.util.Map alias)
           
protected abstract  Node getInternalNode(JcrNode node, java.lang.Boolean hasInternal)
          Return the internal node without the properties list.
protected abstract  Node getInternalNode(Node parent)
           
 java.lang.Object getValue(java.lang.String key)
           
 java.util.Map getWithout(java.util.List exclude, java.util.Map alias)
           
 boolean has(java.util.Map properties)
           
 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.
 JcrResult remove(java.util.List properties, java.util.List excluded)
           
 JcrResult remove(java.util.Map properties, java.util.List excluded)
           
 JcrResult set(Property[] properties, java.util.Map alias, java.util.List excluded)
           
 JcrLock unlock()
           
 JcrLock unlock(boolean emptyLength)
          
 JcrLock unlock(Status status)
           
 JcrLock unlock(Status[] status)
           
 
Methods inherited from class com.ontimize.dms.jcr.JcrWrapperPropertyAbstract
getProperty, hasProperty, setProperty
 
Methods inherited from class com.ontimize.dms.jcr.JcrWrapperAbstract
createNodeManager, createNodeManager, getConverter, getInnerSession, getInternal, getSession, getWrapper, isSaveInSessionEnabled, save, save, setConverter, setInnerSession, setInternal, setSaveInSession, setSession, setWrapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ontimize.dms.jcr.JcrWrapperProperty
getProperty, hasProperty, setProperty
 
Methods inherited from interface com.ontimize.dms.jcr.JcrWrapper
getInnerSession, getInternal, getSession, getWrapper, save
 

Field Detail

JCR_PREFIX

protected static final java.lang.String JCR_PREFIX
Internal JCR properties prefix.

See Also:
Constant Field Values

DEFAULT_DENY_READ_PATH

protected static final java.lang.String DEFAULT_DENY_READ_PATH
See Also:
Constant Field Values

DENY_READ

protected static java.util.List DENY_READ
Internal properties. These properties can't be read from this class.


DEFAULT_DENY_WRITE_PATH

protected static final java.lang.String DEFAULT_DENY_WRITE_PATH
See Also:
Constant Field Values

DENY_WRITE

protected static java.util.List DENY_WRITE
Internal properties. These properties can't be modified from this class.


ALLOWED_STATUS_TYPES

protected static java.util.List ALLOWED_STATUS_TYPES
Constructor Detail

JcrPropertyBase

public JcrPropertyBase(JcrNode node,
                       java.lang.Boolean hasInternal)
                throws RepositoryException
Throws:
RepositoryException
Method Detail

addToList

protected static void addToList(java.util.List list,
                                java.lang.String resource)

canRead

public static boolean canRead(java.lang.String name)

addToDenyReadList

public static void addToDenyReadList(java.lang.String resource)

canWrite

public static boolean canWrite(java.lang.String name)

addToDenyWriteList

public static void addToDenyWriteList(java.lang.String resource)

getInternalNode

protected abstract Node getInternalNode(JcrNode node,
                                        java.lang.Boolean hasInternal)
                                 throws RepositoryException

Return the internal node without the properties list.

Is created if the node doesn't exists.

Throws:
RepositoryException

getValue

public java.lang.Object getValue(java.lang.String key)
                          throws RepositoryException
Specified by:
getValue in interface JcrProperty
Throws:
RepositoryException

get

public java.util.Map get(java.util.List properties,
                         java.util.Map alias)
                  throws RepositoryException
Specified by:
get in interface JcrProperty
Throws:
RepositoryException

doGet

public java.util.Map doGet(java.util.List properties,
                           java.util.Map alias,
                           java.util.List excluded)
                    throws RepositoryException
Specified by:
doGet in interface JcrProperty
Throws:
RepositoryException

getWithout

public java.util.Map getWithout(java.util.List exclude,
                                java.util.Map alias)
                         throws RepositoryException
Specified by:
getWithout in interface JcrProperty
Throws:
RepositoryException

doGetWithout

public java.util.Map doGetWithout(java.util.List exclude,
                                  java.util.Map alias)
                           throws RepositoryException
Throws:
RepositoryException

has

public boolean has(java.util.Map properties)
            throws RepositoryException
Specified by:
has in interface JcrProperty
Throws:
RepositoryException

add

public void add(java.util.Map properties,
                java.util.Map alias)
         throws RepositoryException
Specified by:
add in interface JcrProperty
Throws:
RepositoryException

doAdd

public java.util.List doAdd(java.util.Map properties,
                            java.util.Map alias,
                            java.util.List excluded)
                     throws RepositoryException
Specified by:
doAdd in interface JcrProperty
Throws:
RepositoryException

set

public JcrResult set(Property[] properties,
                     java.util.Map alias,
                     java.util.List excluded)
              throws RepositoryException
Specified by:
set in interface JcrProperty
Throws:
RepositoryException

doSet

public java.util.List doSet(java.util.Map properties,
                            java.util.Map alias,
                            java.util.List excluded)
                     throws RepositoryException
Throws:
RepositoryException

copy

public JcrResult copy(Node source,
                      java.util.List properties)
               throws RepositoryException
Specified by:
copy in interface JcrProperty
Throws:
RepositoryException

getInternalNode

protected abstract Node getInternalNode(Node parent)
                                 throws RepositoryException
Throws:
RepositoryException

doCopy

public java.util.List doCopy(Node source,
                             java.util.List properties)
                      throws RepositoryException

Copy the given properties list from the source node to the target node.

If the property already exists in the current node, doesn't nothing.

Specified by:
doCopy in interface JcrProperty
Parameters:
source - Node source with the properties to copy.
properties - List with the properties to copy.
Returns:
List with the copied properties.
Throws:
RepositoryException

remove

public JcrResult remove(java.util.List properties,
                        java.util.List excluded)
                 throws RepositoryException
Specified by:
remove in interface JcrProperty
Throws:
RepositoryException

doRemove

public JcrResult doRemove(java.util.List properties,
                          java.util.List excluded)
                   throws RepositoryException
Specified by:
doRemove in interface JcrProperty
Throws:
RepositoryException

remove

public JcrResult remove(java.util.Map properties,
                        java.util.List excluded)
                 throws RepositoryException
Specified by:
remove in interface JcrProperty
Throws:
RepositoryException

doRemove

public JcrResult doRemove(java.util.Map properties,
                          java.util.List excluded)
                   throws RepositoryException
Throws:
RepositoryException

doRemove

public JcrResult doRemove(java.util.List excluded)
                   throws RepositoryException
Throws:
RepositoryException

isLocked

public JcrLock isLocked()
                 throws RepositoryException
Description copied from interface: JcrLockable

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.

Specified by:
isLocked in interface JcrLockable
Returns:
Lock handler if the node is locked, otherwise null.
Throws:
RepositoryException - if JCR exception ocurrs.

checkEditable

protected void checkEditable()
                      throws RepositoryException
Throws:
RepositoryException

checkLock

protected void checkLock()
                  throws LockException,
                         RepositoryException
Throws:
LockException
RepositoryException

lock

public JcrLock lock(Status status)
             throws RepositoryException
Description copied from interface: JcrLockable

Tags the current element as locked with the Status.

Specified by:
lock in interface JcrLockable
Parameters:
status - New status.
Returns:
The created lock.
Throws:
RepositoryException - if JCR exception ocurrs.

createEmptyLock

protected JcrLock createEmptyLock(Status status)
                           throws RepositoryException
Throws:
RepositoryException

unlock

public JcrLock unlock()
               throws RepositoryException
Specified by:
unlock in interface JcrLockable
Throws:
RepositoryException

unlock

public JcrLock unlock(boolean emptyLength)
               throws RepositoryException
Description copied from interface: JcrLockable

Specified by:
unlock in interface JcrLockable
Parameters:
emptyLength - Allows to set a zero length to reset status.
Returns:
Throws:
RepositoryException

unlock

public JcrLock unlock(Status status)
               throws RepositoryException
Specified by:
unlock in interface JcrLockable
Throws:
RepositoryException

unlock

public JcrLock unlock(Status[] status)
               throws RepositoryException
Specified by:
unlock in interface JcrLockable
Throws:
RepositoryException

checkDisabled

public static java.util.List checkDisabled(Property[] property)

convert

public static java.util.Map convert(Property[] property)
                             throws RepositoryException
Throws:
RepositoryException

convert

public static Value[] convert(Property property)
                       throws RepositoryException
Throws:
RepositoryException

createMap

public static java.util.Hashtable createMap(boolean absolute,
                                            java.lang.String base,
                                            Node node,
                                            java.util.List keys,
                                            java.util.Map alias)
                                     throws RepositoryException
Throws:
RepositoryException

createMap

public static java.util.Hashtable createMap(boolean absolute,
                                            java.lang.String base,
                                            Node node,
                                            java.util.List keys,
                                            java.util.Map alias,
                                            boolean hasInternal)
                                     throws RepositoryException
Throws:
RepositoryException

createResult

public static EntityResult createResult(boolean absolute,
                                        java.lang.String base,
                                        Node node,
                                        java.util.List keys,
                                        java.util.Map alias)
                                 throws RepositoryException
Throws:
RepositoryException

createResult

public static EntityResult createResult(JcrNodeIterator iterator,
                                        java.util.List keys,
                                        java.util.Map alias)
                                 throws RepositoryException
Throws:
RepositoryException

createEmptyResult

public static EntityResult createEmptyResult(java.util.List keys,
                                             java.util.Map alias)

Ontimize Document Management