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
public class CommandAPIImpl extends java.lang.Object implements org.bonitasoft.engine.api.CommandAPI- Author:
- Zhang Bole, Matthieu Chaffotte, Celine Souchet, Emmanuel Duchastenier, Laurent Vaills
-
-
Constructor Summary
Constructors Constructor Description CommandAPIImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDependency(java.lang.String name, byte[] jar)java.io.Serializableexecute(long commandId, java.util.Map<java.lang.String,java.io.Serializable> parameters)java.io.Serializableexecute(java.lang.String commandName, java.util.Map<java.lang.String,java.io.Serializable> parameters)java.io.SerializableexecuteWithUserTransactions(long commandId, java.util.Map<java.lang.String,java.io.Serializable> parameters)java.io.SerializableexecuteWithUserTransactions(java.lang.String commandName, java.util.Map<java.lang.String,java.io.Serializable> parameters)org.bonitasoft.engine.command.CommandDescriptorget(long commandId)java.util.List<org.bonitasoft.engine.command.CommandDescriptor>getAllCommands(int startIndex, int maxResults, org.bonitasoft.engine.command.CommandCriterion sort)org.bonitasoft.engine.command.CommandDescriptorgetCommand(java.lang.String commandName)protected static TenantServiceAccessorgetTenantAccessor()java.util.List<org.bonitasoft.engine.command.CommandDescriptor>getUserCommands(int startIndex, int maxResults, org.bonitasoft.engine.command.CommandCriterion sort)org.bonitasoft.engine.command.CommandDescriptorregister(java.lang.String name, java.lang.String description, java.lang.String implementation)voidremoveDependency(java.lang.String name)org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.command.CommandDescriptor>searchCommands(org.bonitasoft.engine.search.SearchOptions searchOptions)voidunregister(long commandId)voidunregister(java.lang.String name)voidunregisterAll()voidupdate(long commandId, org.bonitasoft.engine.command.CommandUpdater updateDescriptor)voidupdate(java.lang.String commandName, org.bonitasoft.engine.command.CommandUpdater updateDescriptor)
-
-
-
Method Detail
-
getTenantAccessor
protected static TenantServiceAccessor getTenantAccessor()
-
addDependency
public void addDependency(java.lang.String name, byte[] jar) throws org.bonitasoft.engine.exception.AlreadyExistsException, org.bonitasoft.engine.exception.CreationException- Specified by:
addDependencyin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.exception.AlreadyExistsExceptionorg.bonitasoft.engine.exception.CreationException
-
removeDependency
public void removeDependency(java.lang.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(java.lang.String name, java.lang.String description, java.lang.String implementation) throws org.bonitasoft.engine.exception.AlreadyExistsException, org.bonitasoft.engine.exception.CreationException- Specified by:
registerin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.exception.AlreadyExistsExceptionorg.bonitasoft.engine.exception.CreationException
-
execute
public java.io.Serializable execute(java.lang.String commandName, java.util.Map<java.lang.String,java.io.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 java.io.Serializable execute(long commandId, java.util.Map<java.lang.String,java.io.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 java.io.Serializable executeWithUserTransactions(java.lang.String commandName, java.util.Map<java.lang.String,java.io.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 java.io.Serializable executeWithUserTransactions(long commandId, java.util.Map<java.lang.String,java.io.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(java.lang.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(java.lang.String commandName) throws org.bonitasoft.engine.command.CommandNotFoundException- Specified by:
getCommandin interfaceorg.bonitasoft.engine.api.CommandAPI- Throws:
org.bonitasoft.engine.command.CommandNotFoundException
-
getAllCommands
public java.util.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(java.lang.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 java.util.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
-
-