org.nuxeo.ecm.automation.core.scripting
Class DocumentWrapper
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Serializable>
org.nuxeo.ecm.automation.core.scripting.DocumentWrapper
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,Serializable>
public class DocumentWrapper
- extends HashMap<String,Serializable>
Wrap a DocumentModel
to expose in a pretty way more information to
mvel scripts.
- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
DocumentWrapper
public DocumentWrapper(CoreSession session,
DocumentModel doc)
getDoc
public DocumentModel getDoc()
getSession
public CoreSession getSession()
getParent
public DocumentWrapper getParent()
throws Exception
- Throws:
Exception
getParent
public DocumentWrapper getParent(String type)
throws Exception
- Throws:
Exception
getWorkspace
public DocumentWrapper getWorkspace()
throws Exception
- Throws:
Exception
getDomain
public DocumentWrapper getDomain()
throws Exception
- Throws:
Exception
getTitle
public String getTitle()
throws Exception
- Throws:
Exception
getPath
public String getPath()
resolvePath
public String resolvePath(String relative)
resolvePathAsRef
public DocumentRef resolvePathAsRef(String relative)
getDescription
public String getDescription()
throws Exception
- Throws:
Exception
hasFacet
public boolean hasFacet(String facet)
hasSchema
public boolean hasSchema(String schema)
addFacet
public boolean addFacet(String facet)
removeFacet
public boolean removeFacet(String facet)
getType
public String getType()
getDocumentType
public DocumentType getDocumentType()
getLifeCycle
public String getLifeCycle()
throws Exception
- Throws:
Exception
isLocked
public boolean isLocked()
isFolder
public boolean isFolder()
isImmutable
public boolean isImmutable()
isProxy
public boolean isProxy()
isVersion
public boolean isVersion()
isDownloadable
public boolean isDownloadable()
throws Exception
- Throws:
Exception
isVersionable
public boolean isVersionable()
getId
public String getId()
getName
public String getName()
getSchemas
public String[] getSchemas()
getFacets
public Set<String> getFacets()
getProperty
public Serializable getProperty(String key)
throws Exception
- Throws:
Exception
setProperty
public void setProperty(String key,
Serializable value)
throws Exception
- Throws:
Exception
getVersionLabel
public String getVersionLabel()
containsKey
public boolean containsKey(Object key)
- property map implementation
- Specified by:
containsKey
in interface Map<String,Serializable>
- Overrides:
containsKey
in class HashMap<String,Serializable>
containsValue
public boolean containsValue(Object value)
- The behavior of this method was changed -> it is checking if an xpath
has a value attached.
- Specified by:
containsValue
in interface Map<String,Serializable>
- Overrides:
containsValue
in class HashMap<String,Serializable>
get
public Serializable get(Object key)
- Specified by:
get
in interface Map<String,Serializable>
- Overrides:
get
in class HashMap<String,Serializable>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map<String,Serializable>
- Overrides:
isEmpty
in class HashMap<String,Serializable>
size
public int size()
- Specified by:
size
in interface Map<String,Serializable>
- Overrides:
size
in class HashMap<String,Serializable>
keySet
public Set<String> keySet()
- Specified by:
keySet
in interface Map<String,Serializable>
- Overrides:
keySet
in class HashMap<String,Serializable>
values
public Collection<Serializable> values()
- Specified by:
values
in interface Map<String,Serializable>
- Overrides:
values
in class HashMap<String,Serializable>
entrySet
public Set<Map.Entry<String,Serializable>> entrySet()
- Specified by:
entrySet
in interface Map<String,Serializable>
- Overrides:
entrySet
in class HashMap<String,Serializable>
put
public Serializable put(String key,
Serializable value)
- Specified by:
put
in interface Map<String,Serializable>
- Overrides:
put
in class HashMap<String,Serializable>
putAll
public void putAll(Map<? extends String,? extends Serializable> m)
- Specified by:
putAll
in interface Map<String,Serializable>
- Overrides:
putAll
in class HashMap<String,Serializable>
remove
public Serializable remove(Object key)
- Specified by:
remove
in interface Map<String,Serializable>
- Overrides:
remove
in class HashMap<String,Serializable>
clear
public void clear()
- Specified by:
clear
in interface Map<String,Serializable>
- Overrides:
clear
in class HashMap<String,Serializable>
Copyright © 2011 Nuxeo SAS. All Rights Reserved.