Package org.bonitasoft.engine.command
Interface CommandService
- All Superinterfaces:
LifecycleService,TenantLifecycleService
- All Known Implementing Classes:
CommandServiceImpl
- Since:
- 6.0
- Author:
- Matthieu Chaffotte
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidCreate command by given commandvoiddelete(long commandId) Delete command by given command idvoidDelete command by given command namevoidDelete all commandsget(long commandId) Get command by given idGet command by given namegetAllCommands(int startIndex, int maxResults, SCommandCriterion sort) Retrieves a paginated list of commands, The returned list is paginatedlonggetNumberOfCommands(QueryOptions options) Get total number of commands according to the specific criteriagetUserCommands(int startIndex, int maxResults, SCommandCriterion sCommandCriterion) Retrieves a paginated list of commands with System is falsesearchCommands(QueryOptions options) Get a list of commands according to the specific criteriavoidupdate(SCommand command, EntityUpdateDescriptor updateDescriptor) Update the command by its idMethods inherited from interface org.bonitasoft.engine.commons.LifecycleService
pause, resume, start, stopMethods inherited from interface org.bonitasoft.engine.commons.TenantLifecycleService
init
-
Field Details
-
COMMAND
- See Also:
-
-
Method Details
-
create
Create command by given command- Parameters:
command- command without Id- Throws:
SCommandAlreadyExistsException- Error thrown when relative command already existsSCommandCreationException- Error thrown if has exceptions during the creating command.
-
delete
Delete command by given command name- Parameters:
name- Name of command which will be deleted- Throws:
SCommandNotFoundException- Error thrown if no command have name corresponding to the parameter.SCommandDeletionException- Error thrown if has exception during the deleting command.
-
deleteAll
Delete all commands- Throws:
SCommandDeletionException- Error thrown if has exception during the deleting command.
-
get
Get command by given name- Parameters:
name- Name of command- Returns:
- a command object
- Throws:
SCommandNotFoundException- Error thrown if no command have name corresponding to the parameter.
-
getAllCommands
List<SCommand> getAllCommands(int startIndex, int maxResults, SCommandCriterion sort) throws SCommandGettingException Retrieves a paginated list of commands, The returned list is paginated- Parameters:
startIndex- Start index of command recordmaxResults- Number of commands we want to get. Maximum number of commands returned.sort- The criterion used to sort the retried commands- Returns:
- a list of command objects
- Throws:
SCommandGettingException- Error thrown if has exception during the command getting.
-
update
void update(SCommand command, EntityUpdateDescriptor updateDescriptor) throws SCommandNotFoundException, SCommandUpdateException Update the command by its id- Parameters:
command- The command will be updatedupdateDescriptor- The description for update command- Throws:
SCommandNotFoundException- Error thrown if no command have name corresponding to the parameter.SCommandUpdateException- Error thrown if has exception during the command updating.
-
getUserCommands
List<SCommand> getUserCommands(int startIndex, int maxResults, SCommandCriterion sCommandCriterion) throws SCommandGettingException Retrieves a paginated list of commands with System is false- Parameters:
startIndex- 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 commands- Returns:
- A list of command objects
- Throws:
SCommandGettingException- Error thrown if has exception during the command getting.- Since:
- 6.0
-
get
Get command by given id- Parameters:
commandId- identifier of command- Returns:
- a command object
- Throws:
SCommandNotFoundException- Error thrown if no command have name corresponding to the parameter.
-
delete
Delete command by given command id- Parameters:
commandId- identifier of command which will be deleted- Throws:
SCommandNotFoundException- Error thrown if no command have name corresponding to the parameter.SCommandDeletionException- Error thrown if has exception during the deleting command.
-
getNumberOfCommands
Get total number of commands according to the specific criteria- Parameters:
options- search criteria- Returns:
- total number of commands corresponding to the specific criteria
- Throws:
SBonitaReadException
-
searchCommands
Get a list of commands according to the specific criteria- Parameters:
options- search criteria- Returns:
- a list of command objects
- Throws:
SBonitaReadException
-