Class CommandAPIImpl

java.lang.Object
org.bonitasoft.engine.api.impl.CommandAPIImpl
All Implemented Interfaces:
org.bonitasoft.engine.api.CommandAPI

public class CommandAPIImpl extends Object implements org.bonitasoft.engine.api.CommandAPI
Author:
Zhang Bole, Matthieu Chaffotte, Celine Souchet, Emmanuel Duchastenier, Laurent Vaills
  • Constructor Details

    • CommandAPIImpl

      public CommandAPIImpl()
  • Method Details

    • getServiceAccessor

      protected static ServiceAccessor getServiceAccessor()
    • addDependency

      public void addDependency(String name, byte[] jar) throws org.bonitasoft.engine.exception.CreationException
      Specified by:
      addDependency in interface org.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:
      removeDependency in interface org.bonitasoft.engine.api.CommandAPI
      Throws:
      org.bonitasoft.engine.command.DependencyNotFoundException
      org.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:
      register in interface org.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:
      execute in interface org.bonitasoft.engine.api.CommandAPI
      Throws:
      org.bonitasoft.engine.command.CommandNotFoundException
      org.bonitasoft.engine.command.CommandParameterizationException
      org.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:
      execute in interface org.bonitasoft.engine.api.CommandAPI
      Throws:
      org.bonitasoft.engine.command.CommandNotFoundException
      org.bonitasoft.engine.command.CommandParameterizationException
      org.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:
      executeWithUserTransactions in interface org.bonitasoft.engine.api.CommandAPI
      Throws:
      org.bonitasoft.engine.command.CommandNotFoundException
      org.bonitasoft.engine.command.CommandParameterizationException
      org.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:
      executeWithUserTransactions in interface org.bonitasoft.engine.api.CommandAPI
      Throws:
      org.bonitasoft.engine.command.CommandNotFoundException
      org.bonitasoft.engine.command.CommandParameterizationException
      org.bonitasoft.engine.command.CommandExecutionException
    • unregister

      public void unregister(long commandId) throws org.bonitasoft.engine.command.CommandNotFoundException, org.bonitasoft.engine.exception.DeletionException
      Specified by:
      unregister in interface org.bonitasoft.engine.api.CommandAPI
      Throws:
      org.bonitasoft.engine.command.CommandNotFoundException
      org.bonitasoft.engine.exception.DeletionException
    • unregister

      public void unregister(String name) throws org.bonitasoft.engine.command.CommandNotFoundException, org.bonitasoft.engine.exception.DeletionException
      Specified by:
      unregister in interface org.bonitasoft.engine.api.CommandAPI
      Throws:
      org.bonitasoft.engine.command.CommandNotFoundException
      org.bonitasoft.engine.exception.DeletionException
    • unregisterAll

      public void unregisterAll() throws org.bonitasoft.engine.exception.DeletionException
      Specified by:
      unregisterAll in interface org.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:
      get in interface org.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:
      getCommand in interface org.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:
      getAllCommands in interface org.bonitasoft.engine.api.CommandAPI
    • update

      public void update(long commandId, org.bonitasoft.engine.command.CommandUpdater updateDescriptor) throws org.bonitasoft.engine.exception.UpdateException
      Specified by:
      update in interface org.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:
      update in interface org.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:
      getUserCommands in interface org.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:
      searchCommands in interface org.bonitasoft.engine.api.CommandAPI
      Throws:
      org.bonitasoft.engine.exception.SearchException