Class PlatformFunctions
java.lang.Object
org.nuxeo.ecm.automation.core.scripting.CoreFunctions
org.nuxeo.ecm.automation.features.PlatformFunctions
- All Implemented Interfaces:
ContextHelper
- Author:
- Bogdan Stefanescu
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> List<T>
concatenateIntoList
(List<T> list, Object... values) Concatenate into the list given as first argument other arguments.<T> List<T>
concatenateValuesAsNewList
(Object... values) Idem than concatenateInto except that a new list is created.boolean
documentExists
(CoreSession session, String idOrPath) Checks if a document with the supplied id (or path) exists.Deprecated.since 11.1.protected String
getEmail
(NuxeoPrincipal principal, String userSchemaName, String userEmailFieldName) Returns user emailsgetEmailsFromGroup
(String group) getEmailsFromGroup
(String group, boolean ignoreGroups) getPrincipal
(String username) getPrincipal
(String username, boolean fetchReferences) getPrincipalEmails
(List<NuxeoPrincipal> principals) getPrincipalsFromGroup
(String group) getPrincipalsFromGroup
(String group, boolean ignoreGroups) getVocabularyLabel
(String voc, String key) htmlEscape
(String str) nxqlEscape
(String str) Escapes a string according to NXQL escaping rules.Methods inherited from class org.nuxeo.ecm.automation.core.scripting.CoreFunctions
calendar, calendar, date, escapeHtml
-
Field Details
-
HIBERNATE_SEQUENCER_PROPERTY
- See Also:
-
-
Constructor Details
-
PlatformFunctions
public PlatformFunctions()
-
-
Method Details
-
getUserManager
-
getDirService
Deprecated.since 11.1. UseFramework.getService(Class)
withDirectoryService
instead. -
getVocabularyLabel
-
getPrincipal
- Since:
- 2021.14
-
getPrincipal
-
getEmail
protected String getEmail(NuxeoPrincipal principal, String userSchemaName, String userEmailFieldName) -
getEmail
-
getPrincipalsFromGroup
-
getPrincipalsFromGroup
-
getEmailsFromGroup
-
getEmailsFromGroup
-
getPrincipalEmails
-
getEmails
-
getEmails
Returns user emails- Parameters:
usernames
- list of user namesusePrefix
- indicates if user resolution takes into account nuxeo prefix user:- Since:
- 5.5
-
getNextId
-
getNextId
-
htmlEscape
-
nxqlEscape
Escapes a string according to NXQL escaping rules.The resulting string is safe to include between single quotes in a NXQL expression.
- Parameters:
str
- the input string- Returns:
- the escaped string
- Since:
- 6.0-HF21, 7.10
-
concatenateIntoList
Concatenate into the list given as first argument other arguments. Other arguments will be explosed if it is a list of object. ex: concatenateInto(myList, a, anotherList) with a is scalar object and anotherList is a list of object will produced myList.add(a) and the same for each object contained into the anotherList list.- Parameters:
list
- List of values of type Avalues
- Value can be instance ofCollection<Object>
or an array ofObjects
or simply a scalarObject
. If Null, the parameter is ignored- Returns:
- the list that contains the list contain and value (see value description)
- Throws:
ClassCastException
- if in values there is at least one object type not compatible with the collection list
-
concatenateValuesAsNewList
Idem than concatenateInto except that a new list is created. -
documentExists
Checks if a document with the supplied id (or path) exists.- Parameters:
session
- The CoreSession to obtain the documentidOrPath
- The document Id or path- Returns:
- true if the document exists, or false otherwise
-