public interface CommandService extends TenantLifecycleService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMAND |
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
|
void |
delete(java.lang.String name)
Delete command by given command name
|
void |
deleteAll()
Delete all commands
|
SCommand |
get(long commandId)
Get command by given id
|
SCommand |
get(java.lang.String name)
Get command by given name
|
java.util.List<SCommand> |
getAllCommands(int startIndex,
int maxResults,
SCommandCriterion sort)
Retrieves a paginated list of commands, The returned list is paginated
|
long |
getNumberOfCommands(QueryOptions options)
Get total number of commands according to the specific criteria
|
java.util.List<SCommand> |
getUserCommands(int startIndex,
int maxResults,
SCommandCriterion sCommandCriterion)
Retrieves a paginated list of commands with System is false
|
java.util.List<SCommand> |
searchCommands(QueryOptions options)
Get a list of commands according to the specific criteria
|
void |
update(SCommand command,
EntityUpdateDescriptor updateDescriptor)
Update the command by its id
|
pause, resume, start, stop
static final java.lang.String COMMAND
void create(SCommand command) throws SCommandAlreadyExistsException, SCommandCreationException
command
- command without IdSCommandAlreadyExistsException
- Error thrown when relative command already existsSCommandCreationException
- Error thrown if has exceptions during the creating command.void delete(java.lang.String name) throws SCommandNotFoundException, SCommandDeletionException
name
- 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.void deleteAll() throws SCommandDeletionException
SCommandDeletionException
- Error thrown if has exception during the deleting command.SCommand get(java.lang.String name) throws SCommandNotFoundException
name
- Name of commandSCommandNotFoundException
- Error thrown if no command have name corresponding to the parameter.java.util.List<SCommand> getAllCommands(int startIndex, int maxResults, SCommandCriterion sort) throws SCommandGettingException
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 commandsSCommandGettingException
- Error thrown if has exception during the command getting.void update(SCommand command, EntityUpdateDescriptor updateDescriptor) throws SCommandNotFoundException, SCommandUpdateException
command
- The command will be updatedupdateDescriptor
- The description for update commandSCommandNotFoundException
- Error thrown if no command have name corresponding to the parameter.SCommandUpdateException
- Error thrown if has exception during the command updating.java.util.List<SCommand> getUserCommands(int startIndex, int maxResults, SCommandCriterion sCommandCriterion) throws SCommandGettingException
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 commandsSCommandGettingException
- Error thrown if has exception during the command getting.SCommand get(long commandId) throws SCommandNotFoundException
commandId
- identifier of commandSCommandNotFoundException
- Error thrown if no command have name corresponding to the parameter.void delete(long commandId) throws SCommandNotFoundException, SCommandDeletionException
commandId
- 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.long getNumberOfCommands(QueryOptions options) throws SBonitaReadException
options
- search criteriaSBonitaReadException
java.util.List<SCommand> searchCommands(QueryOptions options) throws SBonitaReadException
options
- search criteriaSBonitaReadException