Package org.bonitasoft.engine.command
Interface Command<T extends ServiceAccessor>
- All Known Implementing Classes:
AbstractStartProcessCommand,AddHandlerCommand,AdvancedStartProcessCommand,DeletePlatformSessionCommand,ExecuteBDMQueryCommand,GetBusinessDataByIdCommand,GetBusinessDataByIdsCommand,GetBusinessDataByQueryCommand,MultipleStartPointsProcessCommand,RuntimeCommand,SearchCommentsSupervisedBy,SearchWaitingEventsCommand,WaitServerCommand
public interface Command<T extends ServiceAccessor>
A command is a class that is called from the API and executed on the server side.
It is used to extend the engine behavior. See
This class should not be directly subclassed by implementors: use
It is used to extend the engine behavior. See
CommandAPI for explanations of how to
deploy, undeploy and execute a command.
This class should not be directly subclassed by implementors: use
RuntimeCommand instead- Author:
- Matthieu Chaffotte
- See Also:
-
CommandAPIRuntimeCommand
-
Method Summary
Modifier and TypeMethodDescriptionexecute(Map<String, Serializable> parameters, T serviceAccessor) Method that is called by the engine on the server side when the client callsCommandAPI.execute(String, Map)with the name or id of this command.
-
Method Details
-
execute
Serializable execute(Map<String, Serializable> parameters, T serviceAccessor) throws SCommandParameterizationException, SCommandExecutionExceptionMethod that is called by the engine on the server side when the client callsCommandAPI.execute(String, Map)with the name or id of this command. Implementors of commands must put here the code to be executed on the server side- Parameters:
parameters- a map of parameters that can be used by the command and that is given by the client when executing the commandserviceAccessor- the ServiceAccessor that provides access to the engine's server-side services- Returns:
- a result that will be returned to the client
- Throws:
SCommandParameterizationException- can be thrown if insufficient or wrong parameters are given by the clientSCommandExecutionException- can be thrown when something unexpected happens while executing the command
-