public class DefaultEntityScriptManager extends Object implements IEntityScriptManager
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultEntityScriptManager.ScriptEntityDataChangeListener |
static class |
DefaultEntityScriptManager.ScriptTransactionalEntityDataChangeListener |
| Modifier and Type | Field and Description |
|---|---|
protected List |
dataChangeListeners |
protected List<ScriptAction> |
entityScriptActions |
protected boolean |
init |
protected EntityReferenceLocator |
locator |
protected TableEntity |
tableEntity |
| Constructor and Description |
|---|
DefaultEntityScriptManager(TableEntity entity,
EntityReferenceLocator locator) |
| Modifier and Type | Method and Description |
|---|---|
static Object |
executeScript(Script script,
EntityReferenceLocator locator,
Map<String,Object> bindings) |
static void |
executeScripts(List<ScriptAction> scriptActions,
EntityReferenceLocator locator,
String action,
Map<String,Object> bindings) |
void |
fireScriptingDataChangeEvent(DataChangeEvent event) |
void |
fireScriptingTransactionDataChangeEvent(DataChangeEvent event,
Connection con) |
static List<EntityDataChangeListener> |
getEntityDataChangeListeners(List<ScriptAction> scriptActions,
EntityReferenceLocator locator)
Get a list of
EntityDataChangeListener objects using the scripts
registered |
static List<ScriptAction> |
getEntityScriptActions(EntityReferenceLocator locator,
String entityName)
Get all the script actions registered for the entity
|
protected void |
loadScripts() |
void |
postDelete(EntityResult deleteResult,
Hashtable keysValues,
int sessionId,
Connection con) |
void |
postInsert(EntityResult insertResult,
Hashtable attributesValues,
int sessionId,
Connection con) |
void |
postUpdate(EntityResult updateResult,
Hashtable attributesValues,
Hashtable keysValues,
int sessionId,
Connection con) |
void |
preDelete(Hashtable keysValues,
int sessionId,
Connection con) |
void |
preInsert(Hashtable attributesValues,
int sessionId,
Connection con) |
void |
preUpdate(Hashtable attributesValues,
Hashtable keysValues,
int sessionId,
Connection con) |
protected void |
registerDataChangeListeners(List scriptActions) |
void |
reloadScripts(boolean reloadNow) |
protected TableEntity tableEntity
protected boolean init
protected List dataChangeListeners
protected List<ScriptAction> entityScriptActions
protected EntityReferenceLocator locator
public DefaultEntityScriptManager(TableEntity entity, EntityReferenceLocator locator)
public void reloadScripts(boolean reloadNow)
reloadScripts in interface IEntityScriptManagerprotected void loadScripts()
protected void registerDataChangeListeners(List scriptActions)
public void fireScriptingDataChangeEvent(DataChangeEvent event)
fireScriptingDataChangeEvent in interface IEntityScriptManagerpublic void fireScriptingTransactionDataChangeEvent(DataChangeEvent event, Connection con)
fireScriptingTransactionDataChangeEvent in interface IEntityScriptManagerpublic void preInsert(Hashtable attributesValues, int sessionId, Connection con) throws Exception
preInsert in interface IEntityScriptManagerExceptionpublic void postInsert(EntityResult insertResult, Hashtable attributesValues, int sessionId, Connection con) throws Exception
postInsert in interface IEntityScriptManagerExceptionpublic void preUpdate(Hashtable attributesValues, Hashtable keysValues, int sessionId, Connection con) throws Exception
preUpdate in interface IEntityScriptManagerExceptionpublic void postUpdate(EntityResult updateResult, Hashtable attributesValues, Hashtable keysValues, int sessionId, Connection con) throws Exception
postUpdate in interface IEntityScriptManagerExceptionpublic void preDelete(Hashtable keysValues, int sessionId, Connection con) throws Exception
preDelete in interface IEntityScriptManagerExceptionpublic void postDelete(EntityResult deleteResult, Hashtable keysValues, int sessionId, Connection con) throws Exception
postDelete in interface IEntityScriptManagerExceptionpublic static List<ScriptAction> getEntityScriptActions(EntityReferenceLocator locator, String entityName) throws Exception
locator - entityName - Exceptionpublic static List<EntityDataChangeListener> getEntityDataChangeListeners(List<ScriptAction> scriptActions, EntityReferenceLocator locator)
EntityDataChangeListener objects using the scripts
registeredscriptActions - action - locator - public static void executeScripts(List<ScriptAction> scriptActions, EntityReferenceLocator locator, String action, Map<String,Object> bindings) throws ScriptException
ScriptExceptionpublic static Object executeScript(Script script, EntityReferenceLocator locator, Map<String,Object> bindings) throws ScriptException
ScriptExceptionCopyright © 2016 Imatia Innovation S.L.. All rights reserved.