public class CommandServiceImpl extends Object implements CommandService
| Modifier and Type | Field and Description |
|---|---|
static int |
FETCH_SIZE |
COMMAND| Constructor and Description |
|---|
CommandServiceImpl(org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService,
Recorder recorder,
EventService eventService,
TechnicalLoggerService logger,
QueriableLoggerService queriableLoggerService,
CommandProvider defaultCommandProvider) |
CommandServiceImpl(org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService,
Recorder recorder,
EventService eventService,
TechnicalLoggerService logger,
QueriableLoggerService queriableLoggerService,
CommandProvider defaultCommandProvider,
int fetchSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
create(SCommand command)
Create command by given command
|
void |
delete(long commandId)
Delete command by given command id
|
protected void |
delete(SCommand command,
SCommandLogBuilder logBuilder) |
void |
delete(String commandName)
Delete command by given command name
|
void |
deleteAll()
Delete all commands
|
SCommand |
get(long commandId)
Get command by given id
|
SCommand |
get(String commandName)
Get command by given name
|
List<SCommand> |
getAllCommands(int startIndex,
int maxResults,
SCommandCriterion sCommandCriterion)
Retrieves a paginated list of commands, The returned list is paginated
|
long |
getNumberOfCommands(org.bonitasoft.engine.persistence.QueryOptions options)
Get total number of commands according to the specific criteria
|
List<SCommand> |
getUserCommands(int startIndex,
int maxResults,
SCommandCriterion sCommandCriterion)
Retrieves a paginated list of commands with System is false
|
void |
pause() |
void |
resume() |
List<SCommand> |
searchCommands(org.bonitasoft.engine.persistence.QueryOptions options)
Get a list of commands according to the specific criteria
|
void |
start() |
void |
stop() |
void |
update(SCommand command,
EntityUpdateDescriptor updateDescriptor)
Update the command by its id
|
public static final int FETCH_SIZE
public CommandServiceImpl(org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService,
Recorder recorder,
EventService eventService,
TechnicalLoggerService logger,
QueriableLoggerService queriableLoggerService,
CommandProvider defaultCommandProvider)
public CommandServiceImpl(org.bonitasoft.engine.persistence.ReadPersistenceService persistenceService,
Recorder recorder,
EventService eventService,
TechnicalLoggerService logger,
QueriableLoggerService queriableLoggerService,
CommandProvider defaultCommandProvider,
int fetchSize)
public void create(SCommand command) throws SCommandAlreadyExistsException, SCommandCreationException
CommandServicecreate in interface CommandServicecommand - command without IdSCommandAlreadyExistsException - Error thrown when relative command already existsSCommandCreationException - Error thrown if has exceptions during the creating command.public void delete(long commandId)
throws SCommandNotFoundException,
SCommandDeletionException
CommandServicedelete in interface CommandServicecommandId - identifier of command which will be deletedSCommandNotFoundException - Error thrown if no command have name corresponding to the parameter.SCommandDeletionException - Error thrown if has exception during the deleting command.protected void delete(SCommand command, SCommandLogBuilder logBuilder) throws SCommandDeletionException
SCommandDeletionExceptionpublic void delete(String commandName) throws SCommandNotFoundException, SCommandDeletionException
CommandServicedelete in interface CommandServicecommandName - Name of command which will be deletedSCommandNotFoundException - Error thrown if no command have name corresponding to the parameter.SCommandDeletionException - Error thrown if has exception during the deleting command.public void deleteAll()
throws SCommandDeletionException
CommandServicedeleteAll in interface CommandServiceSCommandDeletionException - Error thrown if has exception during the deleting command.public SCommand get(String commandName) throws SCommandNotFoundException
CommandServiceget in interface CommandServicecommandName - Name of commandSCommandNotFoundException - Error thrown if no command have name corresponding to the parameter.public List<SCommand> getAllCommands(int startIndex, int maxResults, SCommandCriterion sCommandCriterion) throws SCommandGettingException
CommandServicegetAllCommands in interface CommandServicestartIndex - Start index of command recordmaxResults - Number of commands we want to get. Maximum number of commands returned.sCommandCriterion - The criterion used to sort the retried commandsSCommandGettingException - Error thrown if has exception during the command getting.public void update(SCommand command, EntityUpdateDescriptor updateDescriptor) throws SCommandUpdateException
CommandServiceupdate in interface CommandServicecommand - The command will be updatedupdateDescriptor - The description for update commandSCommandUpdateException - Error thrown if has exception during the command updating.public List<SCommand> getUserCommands(int startIndex, int maxResults, SCommandCriterion sCommandCriterion) throws SCommandGettingException
CommandServicegetUserCommands in interface CommandServicestartIndex - Start index of command recordmaxResults - Number of commands we want to get. Maximum number of commands returned.sCommandCriterion - The criterion used to sort the retried commandsSCommandGettingException - Error thrown if has exception during the command getting.public SCommand get(long commandId) throws SCommandNotFoundException
CommandServiceget in interface CommandServicecommandId - identifier of commandSCommandNotFoundException - Error thrown if no command have name corresponding to the parameter.public long getNumberOfCommands(org.bonitasoft.engine.persistence.QueryOptions options)
throws org.bonitasoft.engine.persistence.SBonitaReadException
CommandServicegetNumberOfCommands in interface CommandServiceoptions - search criteriaorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic List<SCommand> searchCommands(org.bonitasoft.engine.persistence.QueryOptions options) throws org.bonitasoft.engine.persistence.SBonitaReadException
CommandServicesearchCommands in interface CommandServiceoptions - search criteriaorg.bonitasoft.engine.persistence.SBonitaReadExceptionpublic void start()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
start in interface org.bonitasoft.engine.commons.LifecycleServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic void stop()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
stop in interface org.bonitasoft.engine.commons.LifecycleServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic void pause()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
pause in interface org.bonitasoft.engine.commons.LifecycleServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic void resume()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
resume in interface org.bonitasoft.engine.commons.LifecycleServiceorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionCopyright © 2018 Bonitasoft S.A.. All rights reserved.