|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Document
A document object.
Method Summary | ||
---|---|---|
boolean |
addFacet(String facet)
Adds a facet to the document instance. |
|
boolean |
followTransition(String transition)
Follows a given life cycle transition. |
|
Set<String> |
getAllFacets()
Gets the facets available on this document (from the type and the instance facets). |
|
Collection<String> |
getAllowedStateTransitions()
Returns the allowed state transitions for this document. |
|
String[] |
getFacets()
Gets the facets defined on this document instance. |
|
Calendar |
getLastModified()
Gets the last modification time on this document. |
|
String |
getLifeCyclePolicy()
Returns the life cycle policy of this document. |
|
String |
getLifeCycleState()
Returns the life cycle of the document. |
|
String |
getName()
Gets the name of this document. |
|
Document |
getParent()
Gets the parent document or null if this is the root document. |
|
String |
getPath()
Gets the path of this document. |
|
Repository |
getRepository()
Returns the repository in which the document lives. |
|
Session |
getSession()
Gets the session that owns this document. |
|
|
getSystemProp(String name,
Class<T> type)
Get system property of the specified type. |
|
DocumentType |
getType()
Gets this document's type. |
|
String |
getUUID()
Gets this document's UUID. |
|
boolean |
hasFacet(String facet)
Checks if the document has a facet, either from its type or added on the instance. |
|
boolean |
isFolder()
Tests whether this document represent a folder or a leaf document. |
|
boolean |
isProxy()
Checks whether or not this doc is a proxy document. |
|
void |
readDocumentPart(DocumentPart dp)
Load document part properties from storage and fill them inside the given document part. |
|
void |
remove()
Removes this document and all its children, if any. |
|
boolean |
removeFacet(String facet)
Removes a facet from the document instance. |
|
void |
save()
Saves any modification done on this document or its children. |
|
void |
setCurrentLifeCycleState(String state)
Sets the lifecycle state of the document. |
|
void |
setLifeCyclePolicy(String policy)
Sets the life cycle policy of this document. |
|
|
setSystemProp(String name,
T value)
Set a system property which is a property of by the built-in node type ECM_SYSTEM_ANY. |
|
void |
writeDocumentPart(DocumentPart dp)
Read modifications in the given document part and write them on storage. |
Methods inherited from interface org.nuxeo.ecm.core.model.DocumentContainer |
---|
addChild, getChild, getChildren, getChildren, getChildrenIds, hasChild, hasChildren, orderBefore, removeChild, resolvePath |
Methods inherited from interface org.nuxeo.ecm.core.model.PropertyContainer |
---|
exportFlatMap, exportMap, exportMap, getBoolean, getContent, getDate, getDirtyFields, getDouble, getLong, getProperties, getProperty, getPropertyIterator, getPropertyValue, getString, importFlatMap, importMap, isPropertySet, removeProperty, setBoolean, setContent, setDate, setDouble, setLong, setPropertyValue, setString |
Methods inherited from interface org.nuxeo.ecm.core.versioning.VersionableDocument |
---|
checkIn, checkOut, getBaseVersion, getCheckinComment, getLastVersion, getSourceDocument, getVersion, getVersionCreationDate, getVersionLabel, getVersions, getVersionSeriesId, getVersionsIds, getWorkingCopy, hasVersions, isCheckedOut, isLatestMajorVersion, isLatestVersion, isMajorVersion, isVersion, isVersionSeriesCheckedOut, restore |
Methods inherited from interface org.nuxeo.ecm.core.model.Lockable |
---|
getLock, removeLock, setLock |
Method Detail |
---|
Session getSession()
String getName() throws DocumentException
DocumentException
- if any exception occurredString getUUID()
Document getParent() throws DocumentException
DocumentException
DocumentType getType()
String getPath() throws DocumentException
DocumentException
Calendar getLastModified() throws DocumentException
DocumentException
boolean isFolder()
void remove() throws DocumentException
DocumentException
- if an error occursvoid save() throws DocumentException
For some implementations this may do nothing if they are commiting modifications as they are done by calling the corresponding method.
DocumentException
- if an error occursString getLifeCycleState() throws LifeCycleException
LifeCycleException
org.nuxeo.ecm.core.lifecycle
void setCurrentLifeCycleState(String state) throws LifeCycleException
state
- the state
LifeCycleException
String getLifeCyclePolicy() throws LifeCycleException
LifeCycleException
void setLifeCyclePolicy(String policy) throws LifeCycleException
policy
- the policy
LifeCycleException
boolean followTransition(String transition) throws LifeCycleException
This will update the current life cycle of the document.
transition
- the name of the transition to follow
LifeCycleException
Collection<String> getAllowedStateTransitions() throws LifeCycleException
LifeCycleException
boolean isProxy()
Repository getRepository()
<T extends Serializable> void setSystemProp(String name, T value) throws DocumentException
T
- name
- value
-
DocumentException
<T extends Serializable> T getSystemProp(String name, Class<T> type) throws DocumentException
T
- name
- type
-
DocumentException
void readDocumentPart(DocumentPart dp) throws Exception
dp
-
Exception
void writeDocumentPart(DocumentPart dp) throws Exception
dp
-
Exception
Set<String> getAllFacets()
String[] getFacets()
boolean hasFacet(String facet)
facet
- the facet name
true
if the document has the facetboolean addFacet(String facet) throws DocumentException
Does nothing if the facet was already present on the document.
facet
- the facet name
true
if the facet was added, or false
if it is
already present
DocumentException
- if the facet does not existboolean removeFacet(String facet) throws DocumentException
It's not possible to remove a facet coming from the document type.
facet
- the facet name
true
if the facet was removed, or false
if it
isn't present or is present on the type or does not exit
DocumentException
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |