Package org.bonitasoft.engine.api.impl
Class CommandAPIImpl
java.lang.Object
org.bonitasoft.engine.api.impl.CommandAPIImpl
- All Implemented Interfaces:
org.bonitasoft.engine.api.CommandAPI
- Author:
- Zhang Bole, Matthieu Chaffotte, Celine Souchet, Emmanuel Duchastenier, Laurent Vaills
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependency(String name, byte[] jar) execute(long commandId, Map<String, Serializable> parameters) execute(String commandName, Map<String, Serializable> parameters) executeWithUserTransactions(long commandId, Map<String, Serializable> parameters) executeWithUserTransactions(String commandName, Map<String, Serializable> parameters) org.bonitasoft.engine.command.CommandDescriptorget(long commandId) List<org.bonitasoft.engine.command.CommandDescriptor>getAllCommands(int startIndex, int maxResults, org.bonitasoft.engine.command.CommandCriterion sort) org.bonitasoft.engine.command.CommandDescriptorgetCommand(String commandName) protected static ServiceAccessorList<org.bonitasoft.engine.command.CommandDescriptor>getUserCommands(int startIndex, int maxResults, org.bonitasoft.engine.command.CommandCriterion sort) org.bonitasoft.engine.command.CommandDescriptorvoidremoveDependency(String name) org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.command.CommandDescriptor>searchCommands(org.bonitasoft.engine.search.SearchOptions searchOptions) voidunregister(long commandId) voidunregister(String name) voidvoidupdate(long commandId, org.bonitasoft.engine.command.CommandUpdater updateDescriptor) void
-
Constructor Details
-
CommandAPIImpl
public CommandAPIImpl()
-
-
Method Details
-
getServiceAccessor
-
addDependency
public void addDependency(String name, byte[] jar) throws org.bonitasoft.engine.exception.CreationException - Specified by:
addDependencyin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.exception.CreationException
-
removeDependency
public void removeDependency(String name) throws org.bonitasoft.engine.command.DependencyNotFoundException, org.bonitasoft.engine.exception.DeletionException - Specified by:
removeDependencyin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.command.DependencyNotFoundExceptionorg.bonitasoft.engine.exception.DeletionException
-
register
public org.bonitasoft.engine.command.CommandDescriptor register(String name, String description, String implementation) throws org.bonitasoft.engine.exception.CreationException - Specified by:
registerin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.exception.CreationException
-
execute
public Serializable execute(String commandName, Map<String, Serializable> parameters) throws org.bonitasoft.engine.command.CommandNotFoundException, org.bonitasoft.engine.command.CommandParameterizationException, org.bonitasoft.engine.command.CommandExecutionException- Specified by:
executein interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.command.CommandNotFoundExceptionorg.bonitasoft.engine.command.CommandParameterizationExceptionorg.bonitasoft.engine.command.CommandExecutionException
-
execute
public Serializable execute(long commandId, Map<String, Serializable> parameters) throws org.bonitasoft.engine.command.CommandNotFoundException, org.bonitasoft.engine.command.CommandParameterizationException, org.bonitasoft.engine.command.CommandExecutionException- Specified by:
executein interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.command.CommandNotFoundExceptionorg.bonitasoft.engine.command.CommandParameterizationExceptionorg.bonitasoft.engine.command.CommandExecutionException
-
executeWithUserTransactions
public Serializable executeWithUserTransactions(String commandName, Map<String, Serializable> parameters) throws org.bonitasoft.engine.command.CommandNotFoundException, org.bonitasoft.engine.command.CommandParameterizationException, org.bonitasoft.engine.command.CommandExecutionException- Specified by:
executeWithUserTransactionsin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.command.CommandNotFoundExceptionorg.bonitasoft.engine.command.CommandParameterizationExceptionorg.bonitasoft.engine.command.CommandExecutionException
-
executeWithUserTransactions
public Serializable executeWithUserTransactions(long commandId, Map<String, Serializable> parameters) throws org.bonitasoft.engine.command.CommandNotFoundException, org.bonitasoft.engine.command.CommandParameterizationException, org.bonitasoft.engine.command.CommandExecutionException- Specified by:
executeWithUserTransactionsin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.command.CommandNotFoundExceptionorg.bonitasoft.engine.command.CommandParameterizationExceptionorg.bonitasoft.engine.command.CommandExecutionException
-
unregister
public void unregister(long commandId) throws org.bonitasoft.engine.command.CommandNotFoundException, org.bonitasoft.engine.exception.DeletionException - Specified by:
unregisterin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.command.CommandNotFoundExceptionorg.bonitasoft.engine.exception.DeletionException
-
unregister
public void unregister(String name) throws org.bonitasoft.engine.command.CommandNotFoundException, org.bonitasoft.engine.exception.DeletionException - Specified by:
unregisterin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.command.CommandNotFoundExceptionorg.bonitasoft.engine.exception.DeletionException
-
unregisterAll
public void unregisterAll() throws org.bonitasoft.engine.exception.DeletionException- Specified by:
unregisterAllin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.exception.DeletionException
-
get
public org.bonitasoft.engine.command.CommandDescriptor get(long commandId) throws org.bonitasoft.engine.command.CommandNotFoundException - Specified by:
getin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.command.CommandNotFoundException
-
getCommand
public org.bonitasoft.engine.command.CommandDescriptor getCommand(String commandName) throws org.bonitasoft.engine.command.CommandNotFoundException - Specified by:
getCommandin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.command.CommandNotFoundException
-
getAllCommands
public List<org.bonitasoft.engine.command.CommandDescriptor> getAllCommands(int startIndex, int maxResults, org.bonitasoft.engine.command.CommandCriterion sort) - Specified by:
getAllCommandsin interfaceorg.bonitasoft.engine.api.CommandAPI
-
update
public void update(long commandId, org.bonitasoft.engine.command.CommandUpdater updateDescriptor) throws org.bonitasoft.engine.exception.UpdateException - Specified by:
updatein interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.exception.UpdateException
-
update
public void update(String commandName, org.bonitasoft.engine.command.CommandUpdater updateDescriptor) throws org.bonitasoft.engine.exception.UpdateException - Specified by:
updatein interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.exception.UpdateException
-
getUserCommands
public List<org.bonitasoft.engine.command.CommandDescriptor> getUserCommands(int startIndex, int maxResults, org.bonitasoft.engine.command.CommandCriterion sort) - Specified by:
getUserCommandsin interfaceorg.bonitasoft.engine.api.CommandAPI
-
searchCommands
public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.command.CommandDescriptor> searchCommands(org.bonitasoft.engine.search.SearchOptions searchOptions) throws org.bonitasoft.engine.exception.SearchException - Specified by:
searchCommandsin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.exception.SearchException
-