public interface DocumentContainer
| Modifier and Type | Method and Description |
|---|---|
Document |
addChild(String name,
String typeName)
Creates a new child document given its typename.
|
Document |
getChild(String name)
Gets a child document given its name.
|
Iterator<Document> |
getChildren()
Gets an iterator over the children of the document.
|
DocumentIterator |
getChildren(int start) |
List<String> |
getChildrenIds()
Gets a list of the children ids.
|
boolean |
hasChild(String name)
Tests if the document has the named child.
|
boolean |
hasChildren()
Tests if the document has any children.
|
void |
orderBefore(String src,
String dest)
Orders the given source child before the destination child.
|
void |
removeChild(String name)
Removes the child having the given name
|
Document |
resolvePath(String relPath)
Resolves a document given its relative path to the current document.
|
Document resolvePath(String relPath) throws DocumentException
If the path is absolute then it will be transformed in a relative path (i.e. the leading '/' removed).
relPath - the path relative to this documentDocumentExceptionDocument getChild(String name) throws DocumentException
Throws an exception if the document could not be found.
If the supplied name is null, returns the default child of the document if any, otherwise raises an exception.
name - the name of the child to retrieveUnsupportedOperationException - if this is not a folder documentDocumentExceptionIterator<Document> getChildren() throws DocumentException
This operation silently ignores non-folder documents: if the document is not a folder then it returns an empty iterator.
DocumentExceptionDocumentIterator getChildren(int start) throws DocumentException
DocumentExceptionList<String> getChildrenIds() throws DocumentException
DocumentExceptionboolean hasChild(String name) throws DocumentException
This operation silently ignores non-folder documents: If the document is not a folder then return false.
name - the name of the child to testDocumentExceptionboolean hasChildren()
throws DocumentException
This operation silently ignores non-folder documents: If the document is not a folder then returns false.
DocumentExceptionDocument addChild(String name, String typeName) throws DocumentException
This operation throws an error if the current document is not a folder.
name - the name of the new child to createtypeName - the type of the child to createDocumentExceptionvoid removeChild(String name) throws DocumentException
If this is not a folder does nothing.
If this is a folder and no child exists with the given name then throws an exception
name - the child nameDocumentExceptionvoid orderBefore(String src, String dest) throws DocumentException
src - the document to movedest - the document before which to place the source documentDocumentException - if this document is not an orderable folder or any other exception occursCopyright © 2014 Nuxeo SA. All rights reserved.