public interface ExecutionContextFactory
Interface for the object that will be used to get an ExecutionContext object and manage framework life cycle.
Type Params | Return Type | Name and description |
---|---|---|
|
public boolean |
checkEmptyDb() Called after construction but before registration with Moqui/Servlet, check for empty database and load configured data. |
|
public void |
destroy() Destroy this ExecutionContextFactory and all resources it uses (all facades, tools, etc) |
|
public void |
destroyActiveExecutionContext() Destroy the active Execution Context. |
|
public CacheFacade |
getCache() For managing and accessing caches. |
|
public java.lang.ClassLoader |
getClassLoader() Get the framework ClassLoader, aware of all additional classes in runtime and in components. |
|
public 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. |
|
public ElasticFacade |
getElastic() For interactions with ElasticSearch using the built in HTTP REST client. |
|
public EntityFacade |
getEntity() For interactions with a relational database. |
|
public ExecutionContext |
getExecutionContext() Get the ExecutionContext associated with the current thread or initialize one and associate it with the thread. |
|
public groovy.lang.GroovyClassLoader |
getGroovyClassLoader() Get a GroovyClassLoader for runtime compilation, etc. |
|
public L10nFacade |
getL10n() For localization (l10n) functionality, like localizing messages. |
|
public java.util.List<LogEventSubscriber> |
getLogEventSubscribers() |
|
public LoggerFacade |
getLogger() For trace, error, etc logging to the console, files, etc. |
|
public java.lang.String |
getMoquiVersion() |
|
public ResourceFacade |
getResource() For accessing resources by location string (http://, jar://, component://, content://, classpath://, etc). |
|
public java.lang.String |
getRuntimePath() Get the path of the runtime directory |
|
public ScreenFacade |
getScreen() For rendering screens for general use (mostly for things other than web pages or web page snippets). |
|
public javax.websocket.server.ServerContainer |
getServerContainer() The WebSocket ServerContainer, if found in 'javax.websocket.server.ServerContainer' ServletContext attribute |
|
public ServiceFacade |
getService() For calling services (local or remote, sync or async or scheduled). |
|
public javax.servlet.ServletContext |
getServletContext() The ServletContext, if Moqui was initialized in a webapp (generally through MoquiContextListener) |
<V> |
public 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 |
<V> |
public ToolFactory<V> |
getToolFactory(java.lang.String toolName) Get the named ToolFactory instance (loaded by configuration) |
|
public TransactionFacade |
getTransaction() For transaction operations use this facade instead of the JTA UserTransaction and TransactionManager. |
|
public void |
initServletContext(javax.servlet.ServletContext sc) For starting initialization only, tell the ECF about the ServletContext for getServletContext() and getServerContainer() |
|
public boolean |
isDestroyed() |
|
public void |
registerLogEventSubscriber(LogEventSubscriber subscriber) |
|
public 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 ElasticSearch using the built in HTTP REST client.
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()