Interface for the object that will be used to get an ExecutionContext object and manage framework life cycle.
| Type | Name and description |
|---|---|
boolean |
checkEmptyDb()Called after construction but before registration with Moqui/Servlet, check for empty database and load configured data. |
void |
destroy()Destroy this ExecutionContextFactory and all resources it uses (all facades, tools, etc) |
void |
destroyActiveExecutionContext()Destroy the active Execution Context. |
CacheFacade |
getCache()For managing and accessing caches. |
java.lang.ClassLoader |
getClassLoader()Get the framework ClassLoader, aware of all additional classes in runtime and in components. |
java.util.LinkedHashMap<java.lang.String, java.lang.String> |
getComponentBaseLocations()Get a Map where each key is a component name and each value is the component's base location. |
EntityFacade |
getEntity()For interactions with a relational database. |
ExecutionContext |
getExecutionContext()Get the ExecutionContext associated with the current thread or initialize one and associate it with the thread. |
groovy.lang.GroovyClassLoader |
getGroovyClassLoader()Get a GroovyClassLoader for runtime compilation, etc. |
L10nFacade |
getL10n()For localization (l10n) functionality, like localizing messages. |
LoggerFacade |
getLogger()For trace, error, etc logging to the console, files, etc. |
java.lang.String |
getMoquiVersion() |
ResourceFacade |
getResource()For accessing resources by location string (http://, jar://, component://, content://, classpath://, etc). |
java.lang.String |
getRuntimePath()Get the path of the runtime directory |
ScreenFacade |
getScreen()For rendering screens for general use (mostly for things other than web pages or web page snippets). |
javax.websocket.server.ServerContainer |
getServerContainer()The WebSocket ServerContainer, if found in 'javax.websocket.server.ServerContainer' ServletContext attribute |
ServiceFacade |
getService()For calling services (local or remote, sync or async or scheduled). |
javax.servlet.ServletContext |
getServletContext()The ServletContext, if Moqui was initialized in a webapp (generally through MoquiContextListener) |
V |
getTool(java.lang.String toolName, java.lang.Class<V> instanceClass, java.lang.Object... parameters)Get an instance object from the named ToolFactory instance (loaded by configuration); the instanceClass may be null in scripts or other contexts where static typing is not needed |
org.moqui.context.ToolFactory<V> |
getToolFactory(java.lang.String toolName)Get the named ToolFactory instance (loaded by configuration) |
TransactionFacade |
getTransaction()For transaction operations use this facade instead of the JTA UserTransaction and TransactionManager. |
void |
initServletContext(javax.servlet.ServletContext sc)For starting initialization only, tell the ECF about the ServletContext for getServletContext() and getServerContainer() |
boolean |
isDestroyed() |
void |
registerNotificationMessageListener(NotificationMessageListener nml) |
Called after construction but before registration with Moqui/Servlet, check for empty database and load configured data.
Destroy this ExecutionContextFactory and all resources it uses (all facades, tools, etc)
Destroy the active Execution Context. When another is requested in this thread a new one will be created.
For managing and accessing caches.
Get the framework ClassLoader, aware of all additional classes in runtime and in components.
Get a Map where each key is a component name and each value is the component's base location.
For interactions with a relational database.
Get the ExecutionContext associated with the current thread or initialize one and associate it with the thread.
Get a GroovyClassLoader for runtime compilation, etc.
For localization (l10n) functionality, like localizing messages.
For trace, error, etc logging to the console, files, etc.
For accessing resources by location string (http://, jar://, component://, content://, classpath://, etc).
Get the path of the runtime directory
For rendering screens for general use (mostly for things other than web pages or web page snippets).
The WebSocket ServerContainer, if found in 'javax.websocket.server.ServerContainer' ServletContext attribute
For calling services (local or remote, sync or async or scheduled).
The ServletContext, if Moqui was initialized in a webapp (generally through MoquiContextListener)
Get an instance object from the named ToolFactory instance (loaded by configuration); the instanceClass may be null in scripts or other contexts where static typing is not needed
Get the named ToolFactory instance (loaded by configuration)
For transaction operations use this facade instead of the JTA UserTransaction and TransactionManager. See javadoc comments there for examples of code usage.
For starting initialization only, tell the ECF about the ServletContext for getServletContext() and getServerContainer()