Class OScriptManager
java.lang.Object
com.orientechnologies.orient.core.command.script.OScriptManager
Executes Script Commands.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected Map<String,OScriptFormatter> protected Map<String,OScriptResultHandler> protected List<OScriptInjection> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllowedPackages(Set<String> packages) voidCloses the pool for a database.voidcloseAll()Ask to the Script engine all the formattersgetFunctionDefinition(OFunction iFunction) getFunctionInvoke(OFunction iFunction, Object[] iArgs) getLibrary(ODatabaseDocumentInternal db, String iLanguage) Formats the library of functions for a language.getScriptExecutor(String language) handleResult(String language, Object result, ScriptEngine engine, Bindings binding, ODatabaseDocument database) registerFormatter(String iLanguage, OScriptFormatter iFormatterImpl) voidregisterResultHandler(String iLanguage, OScriptResultHandler resultHandler) voidregisterScriptExecutor(String language, OScriptExecutor executor) voidremoveAllowedPackages(Set<String> packages) void
-
Field Details
-
DEF_LANGUAGE
- See Also:
-
formatters
-
injections
-
handlers
-
-
Constructor Details
-
OScriptManager
-
-
Method Details
-
getFunctionDefinition
-
getFunctionInvoke
-
getLibrary
Formats the library of functions for a language.- Parameters:
db- Current database instanceiLanguage- Language as filter- Returns:
- String containing all the functions
-
getSupportedLanguages
-
registerInjection
-
getAllowedPackages
-
addAllowedPackages
-
removeAllowedPackages
-
unregisterInjection
-
getInjections
-
registerFormatter
-
registerResultHandler
-
handleResult
public Object handleResult(String language, Object result, ScriptEngine engine, Bindings binding, ODatabaseDocument database) -
getFormatters
Ask to the Script engine all the formatters- Returns:
- Map containing all the formatters
-
close
Closes the pool for a database. This is called at Orient shutdown and in case a function has been updated.- Parameters:
iDatabaseName-
-
closeAll
public void closeAll() -
getScriptExecutor
-
registerScriptExecutor
-
getScriptExecutors
-