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 extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
clear()
protected static Properties
computeProperties
(Map<?, ?> result) boolean
containsKey
(Object key) property map implementationboolean
containsValue
(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()
boolean
boolean
boolean
boolean
isEmpty()
boolean
isFolder()
boolean
boolean
isLocked()
boolean
isProxy()
boolean
boolean
keySet()
put
(String key, Serializable value) As we need to handleScriptObjectMirror
for array type from nashorn.void
boolean
removeFacet
(String facet) resolvePath
(String relative) resolvePathAsRef
(String relative) void
setProperty
(String key, Serializable value) void
setPropertyValue
(String key, Serializable value) Alias for #setProperty.void
setPropertyValue
(String key, org.openjdk.nashorn.api.scripting.ScriptObjectMirror value) Used by nashorn for native javascript array/date.int
size()
toString()
static Object
values()
static Object
wrap
(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, putIfAbsent, remove, replace, replace, replaceAll
Methods 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:
containsKey
in interfaceMap<String,
Object> - Overrides:
containsKey
in classHashMap<String,
Object>
-
containsValue
The behavior of this method was changed -> it is checking if an xpath has a value attached.- Specified by:
containsValue
in interfaceMap<String,
Object> - Overrides:
containsValue
in classHashMap<String,
Object>
-
get
-
isEmpty
public boolean isEmpty() -
size
public int size() -
keySet
-
values
-
entrySet
-
put
As we need to handleScriptObjectMirror
for array type from nashorn. -
put
-
putAll
-
remove
-
clear
public void clear() -
toString
- Overrides:
toString
in classAbstractMap<String,
Object>
-