Class DocumentScriptingWrapper
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
Wrap a
DocumentModel to expose in a pretty way more information to automation scripts.- Since:
- 8.4
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclear()protected static PropertiescomputeProperties(Map<?, ?> result) booleancontainsKey(Object key) property map implementationbooleancontainsValue(Object value) The behavior of this method was changed -> it is checking if an xpath has a value attached.entrySet()getDoc()getId()getName()getPath()getProperty(String key) getPropertyValue(String key) Alias for #getProperty.getRef()String[]getTitle()getType()booleanbooleanbooleanbooleanisEmpty()booleanisFolder()booleanbooleanisLocked()booleanisProxy()booleanbooleankeySet()put(String key, Serializable value) As we need to handleScriptObjectMirrorfor array type from nashorn.voidbooleanremoveFacet(String facet) resolvePath(String relative) resolvePathAsRef(String relative) voidsetProperty(String key, Serializable value) voidsetPropertyValue(String key, Serializable value) Alias for #setProperty.voidsetPropertyValue(String key, org.openjdk.nashorn.api.scripting.ScriptObjectMirror value) Used by nashorn for native javascript array/date.intsize()toString()static Objectvalues()static Objectwrap(Object object, AutomationMapper mapper) wrap(Map<String, Object> source, AutomationMapper mapper) Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, newHashMap, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from class java.util.AbstractMap
equals, hashCode
-
Field Details
-
mapper
-
doc
-
-
Constructor Details
-
DocumentScriptingWrapper
-
-
Method Details
-
wrap
-
wrap
-
unwrap
-
computeProperties
-
unwrap
-
getDoc
-
getSession
-
getParent
-
getParent
-
getWorkspace
-
getDomain
-
getTitle
-
getPath
-
resolvePath
-
getRef
- Returns:
- the document ref
-
resolvePathAsRef
-
getDescription
-
hasFacet
-
hasSchema
-
addFacet
-
removeFacet
-
getType
-
getDocumentType
-
getLifeCycle
-
isLocked
public boolean isLocked() -
isFolder
public boolean isFolder() -
isImmutable
public boolean isImmutable() -
isProxy
public boolean isProxy() -
isVersion
public boolean isVersion() -
isDownloadable
public boolean isDownloadable() -
isVersionable
public boolean isVersionable() -
getId
-
getName
-
getSchemas
-
getFacets
-
getProperty
-
getPropertyValue
Alias for #getProperty. -
setProperty
-
setPropertyValue
Alias for #setProperty. -
setPropertyValue
public void setPropertyValue(String key, org.openjdk.nashorn.api.scripting.ScriptObjectMirror value) Used by nashorn for native javascript array/date. -
getVersionLabel
-
containsKey
property map implementation- Specified by:
containsKeyin interfaceMap<String,Object> - Overrides:
containsKeyin classHashMap<String,Object>
-
containsValue
The behavior of this method was changed -> it is checking if an xpath has a value attached.- Specified by:
containsValuein interfaceMap<String,Object> - Overrides:
containsValuein classHashMap<String,Object>
-
get
-
isEmpty
public boolean isEmpty() -
size
public int size() -
keySet
-
values
-
entrySet
-
put
As we need to handleScriptObjectMirrorfor array type from nashorn. -
put
-
putAll
-
remove
-
clear
public void clear() -
toString
- Overrides:
toStringin classAbstractMap<String,Object>
-