|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ScriptingEngine
Scripting engine
| Method Summary | |
|---|---|
FxScriptMappingEntry |
createAssignmentScriptMapping(FxScriptEvent scriptEvent,
long scriptId,
long assignmentId,
boolean active,
boolean derivedUsage)
Create a new mapping for assignments with with a given FxScriptEvent |
FxScriptMappingEntry |
createAssignmentScriptMapping(long scriptId,
long assignmentId,
boolean active,
boolean derivedUsage)
Create a new mapping for assignments with the default FxScriptEvent the script was created with |
FxScriptInfo |
createScript(FxScriptEvent event,
java.lang.String name,
java.lang.String description,
java.lang.String code)
Deprecated. use createScript(FxScriptInfoEdit) instead |
FxScriptInfo |
createScript(FxScriptInfoEdit scriptInfo)
Constructs a new script with the data provided by FxScriptInfoEdit, (the id is discarded) |
FxScriptInfo |
createScriptFromDropLibrary(java.lang.String dropName,
FxScriptEvent event,
java.lang.String libraryname,
java.lang.String name,
java.lang.String description)
Deprecated. use createScriptFromDropLibrary(String, String, FxScriptInfo) instead |
FxScriptInfo |
createScriptFromDropLibrary(java.lang.String dropName,
java.lang.String libraryname,
FxScriptInfo scriptInfo)
Create a new script based on a script from a drop's library: The script's code is loaded from the library, other data needed for creating the script is provided by the scriptInfo parameter (id is discarded). |
FxScriptInfo |
createScriptFromLibrary(FxScriptEvent event,
java.lang.String libraryname,
java.lang.String name,
java.lang.String description)
Deprecated. use createScriptFromLibrary(String, FxScriptInfo) instead |
FxScriptInfo |
createScriptFromLibrary(java.lang.String libraryname,
FxScriptInfo scriptInfo)
Create a new script based on a script from the library: The script's code is loaded from the library, other data needed for creating the script is provided by the scriptInfo parameter (id is discarded). |
FxScriptSchedule |
createScriptSchedule(FxScriptScheduleEdit scriptSchedule)
Create a script schedule |
FxScriptMappingEntry |
createTypeScriptMapping(FxScriptEvent scriptEvent,
long scriptId,
long typeId,
boolean active,
boolean derivedUsage)
Create a new mapping for types with a given FxScriptEvent |
FxScriptMappingEntry |
createTypeScriptMapping(long scriptId,
long typeId,
boolean active,
boolean derivedUsage)
Create a new mapping for types with the default FxScriptEvent the script was created with |
void |
executeDropRunOnceScripts(Parameter<java.lang.Boolean> param,
java.lang.String dropName)
Execute run-once scripts for drops. |
void |
executeDropStartupScripts(java.lang.String dropName)
Execute start up scripts for a specific drop. |
void |
executeRunOnceScripts()
Execute run-once scripts. |
void |
executeStartupScripts()
Execute start up scripts. |
java.util.List<java.lang.String[]> |
getAvailableScriptEngines()
Get a list containing script extension and script engine info as 2-dimensional String array |
java.util.List<java.lang.Long> |
getByScriptEvent(FxScriptEvent scriptEvent)
Get scripts by their event |
java.util.List<FxScriptRunInfo> |
getRunOnceInformation()
Get information about running/executed runOnce scripts (including all drops) Please note that this method will only return entries if scripts have been executed in the current VM and in the current session (information is not persisted - yet!) |
java.util.List<FxScriptInfo> |
getScriptInfos()
Get all available information for all existing scripts |
java.lang.String |
loadScriptCode(long scriptId)
Load a scripts code |
FxScriptMapping |
loadScriptMapping(long scriptId)
Loads all assignment mappings for a specified script |
void |
remove(long scriptId)
Remove a script (will remove all mappings for this script as well) |
void |
removeAssignmentScriptMapping(long scriptId,
long assignmentId)
Remove a mapping from a script to an assignment (directly mapped, not via inheritance!) |
void |
removeAssignmentScriptMappingForEvent(long scriptId,
long assignmentId,
FxScriptEvent event)
Remove a mapping from a script to an assignment for a specific event (directly mapped, not via inheritance!) |
void |
removeScriptSchedule(long scheduleId)
Removes an existing script schedule |
void |
removeTypeScriptMapping(long scriptId,
long typeId)
Remove a mapping from a script to a type (directly mapped, not via inheritance!) |
void |
removeTypeScriptMappingForEvent(long scriptId,
long typeId,
FxScriptEvent event)
Remove a mapping from a script to a type (directly mapped, not via inheritance!) for a specific script event |
FxScriptResult |
runScript(long scriptId)
Run a script |
FxScriptResult |
runScript(long scriptId,
FxScriptBinding binding)
Run a script with the given variable binding |
FxScriptResult |
runScript(java.lang.String scriptName,
FxScriptBinding binding)
Run a script with the given variable binding |
FxScriptResult |
runScript(java.lang.String name,
FxScriptBinding binding,
java.lang.String code)
Execute a script |
FxScriptMappingEntry |
updateAssignmentScriptMappingForEvent(long scriptId,
long assignmentId,
FxScriptEvent event,
boolean active,
boolean derivedUsage)
Update a mapping for assignments (activate or deactivate a mapping, toggle derived usage) |
void |
updateScriptCode(long scriptId,
java.lang.String code)
Convenience method to update a scripts code |
void |
updateScriptInfo(FxScriptInfoEdit scriptInfo)
Update script info |
void |
updateScriptInfo(long scriptId,
FxScriptEvent event,
java.lang.String name,
java.lang.String description,
java.lang.String code,
boolean active)
Deprecated. use updateScriptInfo(FxScriptInfoEdit) instead |
FxScriptSchedule |
updateScriptSchedule(FxScriptScheduleEdit scriptSchedule)
Update an existing script schedule |
FxScriptMappingEntry |
updateTypeScriptMappingForEvent(long scriptId,
long typeId,
FxScriptEvent event,
boolean active,
boolean derivedUsage)
Update a mapping for types (activate or deactivate a mapping, toggle derived usage) |
| Method Detail |
|---|
java.lang.String loadScriptCode(long scriptId)
throws FxApplicationException
scriptId - requested script
FxApplicationException - on errors
java.util.List<FxScriptInfo> getScriptInfos()
throws FxApplicationException
FxApplicationException - on errors
@Deprecated
void updateScriptInfo(long scriptId,
FxScriptEvent event,
java.lang.String name,
java.lang.String description,
java.lang.String code,
boolean active)
throws FxApplicationException
updateScriptInfo(FxScriptInfoEdit) instead
scriptId - requested script idevent - requested script eventname - new name (or null if unchanged)description - new description (or null if unchanged)code - the codeactive - if the script is active
FxApplicationException - on errorsFxScriptEvent
void updateScriptInfo(FxScriptInfoEdit scriptInfo)
throws FxApplicationException
scriptInfo - the edited script info
FxApplicationException - on errors
void updateScriptCode(long scriptId,
java.lang.String code)
throws FxApplicationException
scriptId - requested script idcode - the code
FxApplicationException - on errorsupdateScriptInfo(long, com.flexive.shared.scripting.FxScriptEvent , String, String, String, boolean)java.util.List<java.lang.Long> getByScriptEvent(FxScriptEvent scriptEvent)
scriptEvent - requested script event
@Deprecated
FxScriptInfo createScript(FxScriptEvent event,
java.lang.String name,
java.lang.String description,
java.lang.String code)
throws FxApplicationException
createScript(FxScriptInfoEdit) instead
event - script eventname - (unique) namedescription - descriptioncode - code
FxApplicationException - on errorsFxScriptEvent
FxScriptInfo createScript(FxScriptInfoEdit scriptInfo)
throws FxApplicationException
scriptInfo - script information
FxApplicationException - on errors
@Deprecated
FxScriptInfo createScriptFromLibrary(FxScriptEvent event,
java.lang.String libraryname,
java.lang.String name,
java.lang.String description)
throws FxApplicationException
createScriptFromLibrary(String, FxScriptInfo) instead
event - script eventlibraryname - name of the script in the script libraryname - (unique) namedescription - description
FxApplicationException - on errorsFxScriptEvent
FxScriptInfo createScriptFromLibrary(java.lang.String libraryname,
FxScriptInfo scriptInfo)
throws FxApplicationException
libraryname - name of the script in the script libraryscriptInfo - script information
FxApplicationException - on errorsFxScriptEvent
FxScriptInfo createScriptFromDropLibrary(java.lang.String dropName,
java.lang.String libraryname,
FxScriptInfo scriptInfo)
throws FxApplicationException
dropName - name of the drop to use as repositorylibraryname - name of the script in dropscriptInfo - script information
FxApplicationException - on errorsFxScriptEvent
@Deprecated
FxScriptInfo createScriptFromDropLibrary(java.lang.String dropName,
FxScriptEvent event,
java.lang.String libraryname,
java.lang.String name,
java.lang.String description)
throws FxApplicationException
createScriptFromDropLibrary(String, String, FxScriptInfo) instead
dropName - name of the drop to use as repositoryevent - script eventlibraryname - name of the script in the script libraryname - (unique) namedescription - description
FxApplicationException - on errorsFxScriptEvent
void remove(long scriptId)
throws FxApplicationException
scriptId - id of the script and its mappings to remove
FxApplicationException - on errors
FxScriptResult runScript(java.lang.String scriptName,
FxScriptBinding binding)
throws FxApplicationException
scriptName - name of the script to runbinding - variable binding to use (all bound variables have to be serializable!)
FxApplicationException - on errors
FxScriptResult runScript(long scriptId,
FxScriptBinding binding)
throws FxApplicationException
scriptId - id of the script to runbinding - variable binding to use (all bound variables have to be serializable!)
FxApplicationException - on errors
FxScriptResult runScript(java.lang.String name,
FxScriptBinding binding,
java.lang.String code)
throws FxApplicationException
name - name of the script, extension is needed to choose interpreterbinding - bindings to applycode - the script code
FxApplicationException - on errors
java.util.List<java.lang.String[]> getAvailableScriptEngines()
throws FxApplicationException
FxApplicationException - on errors
FxScriptResult runScript(long scriptId)
throws FxApplicationException
scriptId - id of the script to run
FxApplicationException - on errors
FxScriptMappingEntry createAssignmentScriptMapping(long scriptId,
long assignmentId,
boolean active,
boolean derivedUsage)
throws FxApplicationException
scriptId - id of the scriptassignmentId - id of the assignmentactive - mapping is active?derivedUsage - mapping used in derived assignments?
FxApplicationException - on errors
FxScriptMappingEntry createAssignmentScriptMapping(FxScriptEvent scriptEvent,
long scriptId,
long assignmentId,
boolean active,
boolean derivedUsage)
throws FxApplicationException
scriptEvent - FxScriptEvent for this mapping (on create, save, remove, etc.)scriptId - id of the scriptassignmentId - id of the assignmentactive - mapping is active?derivedUsage - mapping used in derived assignments?
FxApplicationException - on errors
FxScriptMapping loadScriptMapping(long scriptId)
throws FxLoadException,
java.sql.SQLException
scriptId - the script
FxLoadException - on errors
java.sql.SQLException - on errors
FxScriptMappingEntry createTypeScriptMapping(long scriptId,
long typeId,
boolean active,
boolean derivedUsage)
throws FxApplicationException
scriptId - id of the scripttypeId - id of the typeactive - mapping is active?derivedUsage - mapping used in derived types?
FxApplicationException - on errors
FxScriptMappingEntry createTypeScriptMapping(FxScriptEvent scriptEvent,
long scriptId,
long typeId,
boolean active,
boolean derivedUsage)
throws FxApplicationException
scriptEvent - FxScriptEvent for this mapping (on create, save, remove, etc.)scriptId - id of the scripttypeId - id of the typeactive - mapping is active?derivedUsage - mapping used in derived types?
FxApplicationException - on errors
void removeAssignmentScriptMapping(long scriptId,
long assignmentId)
throws FxApplicationException
scriptId - id of the scriptassignmentId - id of the assignment
FxApplicationException - on errors
void removeAssignmentScriptMappingForEvent(long scriptId,
long assignmentId,
FxScriptEvent event)
throws FxApplicationException
scriptId - id of the scriptassignmentId - id of the assignmentevent - the script event
FxApplicationException - on errors
void removeTypeScriptMapping(long scriptId,
long typeId)
throws FxApplicationException
scriptId - id of the scripttypeId - id of the type
FxApplicationException - on errors
void removeTypeScriptMappingForEvent(long scriptId,
long typeId,
FxScriptEvent event)
throws FxApplicationException
scriptId - id of the scripttypeId - id of the typeevent - the script event
FxApplicationException - on errors
FxScriptMappingEntry updateAssignmentScriptMappingForEvent(long scriptId,
long assignmentId,
FxScriptEvent event,
boolean active,
boolean derivedUsage)
throws FxApplicationException
scriptId - id of the scriptassignmentId - id of the assignmentevent - the script eventactive - mapping is active?derivedUsage - mapping used in derived assignments?
FxApplicationException - on errors
FxScriptMappingEntry updateTypeScriptMappingForEvent(long scriptId,
long typeId,
FxScriptEvent event,
boolean active,
boolean derivedUsage)
throws FxApplicationException
scriptId - id of the scripttypeId - id of the typeevent - the script eventactive - mapping is active?derivedUsage - mapping used in derived types?
FxApplicationException - on errors
void executeRunOnceScripts()
throws FxApplicationException
FxApplicationException - on errorsvoid executeStartupScripts()
void executeDropRunOnceScripts(Parameter<java.lang.Boolean> param,
java.lang.String dropName)
throws FxApplicationException
param - boolean parameter to mark scripts as being rundropName - name of the drop (WAR archive name without extension)
FxApplicationException - if the requested drop is unknown or invalid
void executeDropStartupScripts(java.lang.String dropName)
throws FxApplicationException
dropName - name of the drop (WAR archive name without extension)
FxApplicationException - if the requested drop is unknown or invalid
java.util.List<FxScriptRunInfo> getRunOnceInformation()
throws FxApplicationException
FxApplicationException - on errors
FxScriptSchedule createScriptSchedule(FxScriptScheduleEdit scriptSchedule)
throws FxApplicationException
scriptSchedule - script schedule edit
FxApplicationException - on errors
void removeScriptSchedule(long scheduleId)
throws FxApplicationException
scheduleId - script schedule id
FxApplicationException - on errors
FxScriptSchedule updateScriptSchedule(FxScriptScheduleEdit scriptSchedule)
throws FxApplicationException
scriptSchedule - script schedule
FxApplicationException - on errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||