Class GroovyActionsServiceImpl
- java.lang.Object
-
- org.apache.unomi.groovy.actions.services.impl.GroovyActionsServiceImpl
-
- All Implemented Interfaces:
GroovyActionsService
public class GroovyActionsServiceImpl extends Object implements GroovyActionsService
Implementation of the GroovyActionService. Allows to create a groovy action from a groovy file
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
GroovyActionsServiceImpl.GroovyActionsServiceConfig
-
Constructor Summary
Constructors Constructor Description GroovyActionsServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description groovy.lang.GroovyCodeSource
getGroovyCodeSource(String id)
Get a groovy code source object by an idgroovy.lang.GroovyShell
getGroovyShell()
Get an instantiated groovy shell objectvoid
onDestroy()
void
remove(String id)
Remove a groovy actionvoid
save(String actionName, String groovyScript)
Save a groovy action from a groovy filevoid
setActionExecutorDispatcher(ActionExecutorDispatcher actionExecutorDispatcher)
void
setDefinitionsService(DefinitionsService definitionsService)
void
setPersistenceService(PersistenceService persistenceService)
void
setSchedulerService(SchedulerService schedulerService)
void
start(GroovyActionsServiceImpl.GroovyActionsServiceConfig config, org.osgi.framework.BundleContext bundleContext)
-
-
-
Method Detail
-
setDefinitionsService
public void setDefinitionsService(DefinitionsService definitionsService)
-
setPersistenceService
public void setPersistenceService(PersistenceService persistenceService)
-
setSchedulerService
public void setSchedulerService(SchedulerService schedulerService)
-
setActionExecutorDispatcher
public void setActionExecutorDispatcher(ActionExecutorDispatcher actionExecutorDispatcher)
-
getGroovyShell
public groovy.lang.GroovyShell getGroovyShell()
Description copied from interface:GroovyActionsService
Get an instantiated groovy shell object- Specified by:
getGroovyShell
in interfaceGroovyActionsService
- Returns:
- GroovyShell
-
start
public void start(GroovyActionsServiceImpl.GroovyActionsServiceConfig config, org.osgi.framework.BundleContext bundleContext)
-
onDestroy
public void onDestroy()
-
save
public void save(String actionName, String groovyScript)
Description copied from interface:GroovyActionsService
Save a groovy action from a groovy file- Specified by:
save
in interfaceGroovyActionsService
- Parameters:
actionName
- actionNamegroovyScript
- script to save
-
remove
public void remove(String id)
Description copied from interface:GroovyActionsService
Remove a groovy action- Specified by:
remove
in interfaceGroovyActionsService
- Parameters:
id
- of the action to remove
-
getGroovyCodeSource
public groovy.lang.GroovyCodeSource getGroovyCodeSource(String id)
Description copied from interface:GroovyActionsService
Get a groovy code source object by an id- Specified by:
getGroovyCodeSource
in interfaceGroovyActionsService
- Parameters:
id
- of the action to get- Returns:
- Groovy code source
-
-