|
Ontimize Document Management 0.035EN | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ontimize.dms.jcr.JcrWrapperAbstract
com.ontimize.dms.jcr.JcrNodeBase
public abstract class JcrNodeBase
| Field Summary | |
|---|---|
protected static java.util.List |
ALLOWED_STATUS_TYPES
|
protected Node |
base
|
static java.util.List |
DEFAULT_PATH_TYPES
|
static java.util.List |
DEFAULT_PROPERTIES
|
static java.util.List |
DEFAULT_TYPES
|
protected static java.util.List |
INTERNAL_NODE_TYPES
|
protected static java.util.List |
NODE_STATUS_PROPERTIES
|
static java.util.List |
QUERY_DEFAULT_PROPERTIES
|
protected static java.util.List |
QUERY_DENY_PROPERTIES
|
protected static java.util.List |
STREAM_STATUS_PROPERTIES
|
| Fields inherited from class com.ontimize.dms.jcr.JcrWrapperAbstract |
|---|
MSG_CREATE_NM |
| Fields inherited from interface com.ontimize.dms.jcr.JcrNode |
|---|
AUTO_NAMES, BASE, CHILDREN, DATA, DATE_INSERT, DATE_UPDATE, DEEP, DESCRIPTION, DOCUMENT, FIELDS, FILE, JCR_CONTENT, KEYS, LAST_MODIFIED, LINK, LINK_TARGET, MIME_TYPE, NAME, NODE_FIELDS, NODE_FILE, NODE_FOLDER, NODE_LINK, NODE_STATUS, NODE_STATUS_DATE, NODE_STATUS_USER, NT_UNSTRUCTURED, PARENT_FIELDS, PATH, PROPERTY_STATUS, PROPERTY_STATUS_DATE, PROPERTY_STATUS_USER, STREAM, STREAM_DATE, STREAM_LENGTH, STREAM_OPENED, STREAM_STATUS, STREAM_STATUS_DATE, STREAM_STATUS_USER, STREAM_VERSION, THUMBNAIL, TITLE, TYPE, TYPE_BASE, TYPE_DIR, TYPE_FILE, TYPE_KEYS, TYPE_LINK, USER_INSERT, USER_UPDATE |
| Constructor Summary | |
|---|---|
JcrNodeBase(JcrSession session,
Node base,
Node node)
|
|
| Method Summary | |
|---|---|
void |
checkEditable()
|
protected void |
checkInsert(Type nodeType)
|
JcrNode |
clone(Node node)
|
int |
compareTo(java.lang.Object o)
|
protected abstract java.lang.String |
createDecoded(java.lang.String path)
|
protected abstract java.lang.String |
createEncoded(java.lang.String path)
|
protected Node |
createFileNode(Node parent,
java.lang.String name)
|
protected Node |
createFolderNode(Node parent,
java.lang.String name)
|
protected Lock |
createInternalLock(Node node)
|
protected void |
createInternalUnlock(Node node)
|
protected Node |
createLinkNode(Node parent,
java.lang.String name,
Node content)
|
protected JcrLock |
createLock(Lock nodeLock,
Status status)
|
protected JcrProperty |
createProperty(Node node)
|
protected static java.util.Map |
createQueryFields(java.util.Map fields)
|
static java.util.List |
createQueryKeys(java.util.List keys)
|
protected JcrStream |
createStream(Node node,
boolean data)
|
protected JcrVersion |
createVersion(JcrNode node)
|
protected void |
doRemove(java.lang.String property,
Status status,
java.util.List properties)
|
boolean |
equals(java.lang.Object o)
|
Node |
getBase()
Returns the node base for the node and the current session request. |
JcrNodeIterator |
getChildren(java.util.Map fields,
boolean recursive)
Return a iterator with the children filtered with the given Map. |
long |
getChildrenSize()
Returns the children node list size. |
java.lang.String |
getFile()
Returns the attached file name. |
java.lang.String |
getName()
Returns the node name. |
Node |
getNode()
Returns the internal JCR node interface. |
Type |
getNodeType()
|
java.lang.String |
getPath()
Returns the path of the current node. |
java.util.Map |
getPathTypes()
Returns the path types of the current node path. |
java.util.Map |
getPathTypes(java.util.List types,
java.util.Map alias)
Returns the path types of the current node path. |
JcrProperty |
getProperty()
Returns a property handler for the current node. |
JcrStream |
getStream()
Returns the saved stream in the node. |
JcrStream |
getStream(boolean data)
Returns the saved stream in the node and / or its properties. |
protected java.lang.String |
getSubpath(java.lang.String type)
|
JcrVersion |
getVersion()
Returns a version handle for the current node. |
boolean |
hasNodeType()
|
protected boolean |
hasValue(JcrNode node,
java.lang.String property,
java.lang.String[] values)
|
JcrNode |
insert(java.util.Map info,
java.util.Map properties)
Insert a new child node to current node. |
boolean |
isBase()
Check if the current node is in the base path of the repository. |
boolean |
isEditable()
Check if the current node can be changed. |
boolean |
isKeys()
Check if the current node is a key node. |
boolean |
isLeaf()
Checks if there is a ending node. |
boolean |
isLink()
Check if the current node is a link to another. |
JcrLock |
isLocked()
Check if the current node is locked (directory or file). |
protected JcrLock |
isLocked(boolean checkEmpty)
Searchs in the current node the selected lock flags. |
boolean |
isRoot()
|
static boolean |
isSaveInSessionEnabled()
|
JcrLock |
lock(Status status)
Tags the current element as locked with the Status. |
JcrNode |
paste(java.util.Map info,
java.util.Map properties,
boolean copy)
Moves the current node to the desired target. |
JcrNode |
remove()
Removes the current node. |
protected void |
removeReferences(Node node)
|
JcrNode |
rename(java.lang.String name)
Changes the name of the current node. |
static void |
setSaveInSessionChanges(boolean saveInSessionChanges)
|
java.lang.String |
toString()
|
JcrLock |
unlock()
|
JcrLock |
unlock(boolean emptyLength)
|
JcrLock |
unlock(Status status)
|
JcrLock |
unlock(Status[] status)
|
JcrNode |
update(java.util.Map info,
boolean version)
Set new information to the base version of the current node. |
| Methods inherited from class com.ontimize.dms.jcr.JcrWrapperAbstract |
|---|
createNodeManager, createNodeManager, getConverter, getInnerSession, getInternal, getSession, getWrapper, save, save, setConverter, setInnerSession, setInternal, setSaveInSession, setSession, setWrapper |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ontimize.dms.jcr.JcrWrapper |
|---|
getInnerSession, getInternal, getSession, getWrapper, save |
| Field Detail |
|---|
protected static java.util.List INTERNAL_NODE_TYPES
public static java.util.List DEFAULT_TYPES
public static java.util.List DEFAULT_PATH_TYPES
protected static java.util.List QUERY_DENY_PROPERTIES
public static java.util.List QUERY_DEFAULT_PROPERTIES
public static java.util.List DEFAULT_PROPERTIES
protected static java.util.List NODE_STATUS_PROPERTIES
protected static java.util.List STREAM_STATUS_PROPERTIES
protected static java.util.List ALLOWED_STATUS_TYPES
protected Node base
| Constructor Detail |
|---|
public JcrNodeBase(JcrSession session,
Node base,
Node node)
throws RepositoryException
RepositoryException| Method Detail |
|---|
public static boolean isSaveInSessionEnabled()
public static void setSaveInSessionChanges(boolean saveInSessionChanges)
public Node getBase()
JcrNodeReturns the node base for the node and the current session request.
getBase in interface JcrNodepublic Node getNode()
JcrNodeReturns the internal JCR node interface.
getNode in interface JcrNode
public java.lang.String getName()
throws RepositoryException
JcrNodeReturns the node name.
getName in interface JcrNodeRepositoryException - if JCR exception is thrown.
public java.lang.String getFile()
throws RepositoryException
JcrNodeReturns the attached file name.
Note: File name can be different of current node name.
getFile in interface JcrNodeRepositoryException - if JCR exception is thrown.
public java.lang.String getPath()
throws RepositoryException
JcrNodeReturns the path of the current node.
getPath in interface JcrNodeRepositoryException - if JCR exception is thrown.
public java.util.Map getPathTypes()
throws RepositoryException
JcrNodeReturns the path types of the current node path.
Parse: base, keys, path, name and file of the current node.
getPathTypes in interface JcrNodeRepositoryException - if JCR exception is thrown.
public java.util.Map getPathTypes(java.util.List types,
java.util.Map alias)
throws RepositoryException
JcrNodeReturns the path types of the current node path.
Parse: base, keys, path, name and file of the current node.
getPathTypes in interface JcrNodetypes - Path types to return.alias - map with alternative keys.
RepositoryException - if JCR exception is thrown.protected java.lang.String getSubpath(java.lang.String type)
public Type getNodeType()
throws RepositoryException
getNodeType in interface JcrNodeRepositoryException
public long getChildrenSize()
throws RepositoryException
JcrNodeReturns the children node list size.
getChildrenSize in interface JcrNodeRepositoryException - if JCR exception ocurrs.
protected boolean hasValue(JcrNode node,
java.lang.String property,
java.lang.String[] values)
public boolean isLeaf()
throws RepositoryException
JcrNodeChecks if there is a ending node.
isLeaf in interface JcrNodeRepositoryException - if JCR exception ocurrs.
public boolean isRoot()
throws RepositoryException
isRoot in interface JcrNodeRepositoryException
public boolean isBase()
throws RepositoryException
JcrNodeCheck if the current node is in the base path of the repository.
isBase in interface JcrNodeRepositoryException - if JCR exception ocurrs.
public boolean isKeys()
throws RepositoryException
JcrNodeCheck if the current node is a key node.
isKeys in interface JcrNodeRepositoryException - if JCR exception ocurrs.
public boolean isLink()
throws RepositoryException
JcrNodeCheck if the current node is a link to another.
isLink in interface JcrNodeRepositoryException - if JCR exception ocurrs.
public boolean isEditable()
throws RepositoryException
JcrNodeCheck if the current node can be changed. (System nodes root, keys and base can be changed.)
isEditable in interface JcrNodeRepositoryException
public void checkEditable()
throws RepositoryException
checkEditable in interface JcrNodeRepositoryException
public boolean hasNodeType()
throws RepositoryException
hasNodeType in interface JcrNodeRepositoryException
public JcrStream getStream()
throws RepositoryException,
LockException
JcrNodeReturns the saved stream in the node.
getStream in interface JcrNodeRepositoryException - if JCR exception ocurrs.
LockException - if the current node is locked.
public JcrStream getStream(boolean data)
throws RepositoryException,
LockException
JcrNodeReturns the saved stream in the node and / or its properties.
getStream in interface JcrNodedata - True returns the stream data and related properties.RepositoryException - if JCR exception ocurrs.
LockException - if the current node is locked.
protected JcrStream createStream(Node node,
boolean data)
throws RepositoryException
RepositoryException
public JcrProperty getProperty()
throws RepositoryException
JcrNodeReturns a property handler for the current node.
getProperty in interface JcrNodeRepositoryException - if JCR exception ocurrs.
protected JcrProperty createProperty(Node node)
throws RepositoryException
RepositoryException
public JcrVersion getVersion()
throws RepositoryException
JcrNodeReturns a version handle for the current node.
getVersion in interface JcrNodeRepositoryException - if JCR exception ocurrs.
protected JcrVersion createVersion(JcrNode node)
throws RepositoryException
RepositoryExceptionpublic static java.util.List createQueryKeys(java.util.List keys)
protected static java.util.Map createQueryFields(java.util.Map fields)
public JcrNodeIterator getChildren(java.util.Map fields,
boolean recursive)
throws RepositoryException
JcrNodeReturn a iterator with the children filtered with the given Map.
getChildren in interface JcrNodefields - List only the nodes with the current keys/values.recursive - Search child nodes recursive.
RepositoryException - if JCR exception ocurrs.
protected void checkInsert(Type nodeType)
throws RepositoryException
RepositoryException
protected Node createFolderNode(Node parent,
java.lang.String name)
throws RepositoryException
RepositoryException
protected Node createFileNode(Node parent,
java.lang.String name)
throws RepositoryException
RepositoryException
protected Node createLinkNode(Node parent,
java.lang.String name,
Node content)
throws RepositoryException
RepositoryException
public JcrNode insert(java.util.Map info,
java.util.Map properties)
throws RepositoryException
JcrNodeInsert a new child node to current node.
Support to insert complete directories path.
insert in interface JcrNodeinfo - New node informationproperties - Additional properties to new nodes.
RepositoryException - if JCR exception ocurrs.
public JcrNode update(java.util.Map info,
boolean version)
throws RepositoryException,
LockException
JcrNodeSet new information to the base version of the current node.
update in interface JcrNodeinfo - Node information
RepositoryException - if JCR exception ocurrs.
LockException - if the current node is locked.
public JcrNode paste(java.util.Map info,
java.util.Map properties,
boolean copy)
throws LockException,
RepositoryException
JcrNodeMoves the current node to the desired target.
Recursive
The target must exists.
paste in interface JcrNodeinfo - Node to paste informationproperties - Additional properties to the target node.
LockException - if the current node is locked.
RepositoryException - if JCR exception ocurrs.
public JcrNode rename(java.lang.String name)
throws LockException,
RepositoryException
JcrNodeChanges the name of the current node.
rename in interface JcrNodename - New node name
LockException - if the current node is locked.
RepositoryException - if JCR exception ocurrs.
public JcrNode remove()
throws LockException,
RepositoryException
JcrNodeRemoves the current node.
If the current node is a file, remove all links to current node.
remove in interface JcrNodeLockException - if the current node is locked.
RepositoryException - if JCR exception ocurrs.
protected void removeReferences(Node node)
throws RepositoryException
RepositoryException
public JcrLock isLocked()
throws RepositoryException
JcrLockableCheck 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.
isLocked in interface JcrLockableRepositoryException - if JCR exception ocurrs.
protected Lock createInternalLock(Node node)
throws RepositoryException
RepositoryException
protected void createInternalUnlock(Node node)
throws RepositoryException
RepositoryException
protected JcrLock isLocked(boolean checkEmpty)
throws RepositoryException
Searchs in the current node the selected lock flags.
checkEmpty - Searchs all files without length (already not uploaded).
RepositoryException
public JcrLock lock(Status status)
throws RepositoryException
JcrLockableTags the current element as locked with the Status.
lock in interface JcrLockablestatus - New status.
RepositoryException - if JCR exception ocurrs.
protected JcrLock createLock(Lock nodeLock,
Status status)
throws RepositoryException
RepositoryException
public JcrLock unlock()
throws RepositoryException
unlock in interface JcrLockableRepositoryException
public JcrLock unlock(boolean emptyLength)
throws RepositoryException
JcrLockable
unlock in interface JcrLockableemptyLength - Allows to set a zero length to reset status.
RepositoryException
public JcrLock unlock(Status status)
throws RepositoryException
unlock in interface JcrLockableRepositoryException
public JcrLock unlock(Status[] status)
throws RepositoryException
unlock in interface JcrLockableRepositoryException
protected void doRemove(java.lang.String property,
Status status,
java.util.List properties)
throws RepositoryException
RepositoryExceptionprotected abstract java.lang.String createEncoded(java.lang.String path)
protected abstract java.lang.String createDecoded(java.lang.String path)
public JcrNode clone(Node node)
throws RepositoryException
clone in interface JcrNodeRepositoryExceptionpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
Ontimize Document Management | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||