Package org.bonitasoft.engine.parameter
Interface ParameterService
- All Known Implementing Classes:
ParameterServiceImpl
public interface ParameterService
- Since:
- 6.0
- Author:
- Matthieu Chaffotte
-
Method Summary
Modifier and TypeMethodDescriptionvoidStore all parameters provided to the specific process in file systembooleancontainsNullValues(long processDefinitionId) Check if the specific process contains null-valued parameter or not.voiddeleteAll(long processDefinitionId) Delete all parameters for a specific processDefinitionGet parameters in a specific interval for specific process, this is used for paginationGet parameter by name in specific processgetAll(long processDefinitionId) return all parameters in a mapgetNullValues(long processDefinitionId, int fromIndex, int numberOfResult, OrderBy order) Get a list of parameters will null values in order in specific processvoidMerge given parameters with existing ones.voidUpdate specific parameter value in a process
-
Method Details
-
update
void update(long processDefinitionId, String parameterName, String parameterValue) throws SParameterNameNotFoundException, SBonitaReadException, SObjectModificationException Update specific parameter value in a process- Parameters:
processDefinitionId- identifier of processDefinitionparameterName- name of the parameter will be updatedparameterValue- new value of the parameter- Throws:
SParameterNameNotFoundException- error thrown if no parameter found for the specific parameterNameSBonitaReadExceptionSObjectModificationException
-
merge
void merge(long processDefinitionId, Map<String, String> parameters) throws SBonitaReadException, SObjectModificationExceptionMerge given parameters with existing ones. Unknown parameters are ignored.- Parameters:
processDefinitionId- identifier of processDefinitionparameters- parameters to merge- Throws:
SBonitaReadException- error thrown if an error occurred while retrieving the process definitionSObjectModificationException- error thrown if an error occurred while updating the parameter value
-
addAll
void addAll(long processDefinitionId, Map<String, String> parameters) throws SParameterProcessNotFoundException, SObjectCreationException, SBonitaReadException, SObjectModificationExceptionStore all parameters provided to the specific process in file system- Parameters:
processDefinitionId- identifier of processDefinitionparameters- parameters will be stored in file system- Throws:
SParameterProcessNotFoundException- error thrown if no parameters configuration file found in file systemSObjectCreationExceptionSBonitaReadExceptionSObjectModificationException
-
getAll
Map<String,String> getAll(long processDefinitionId) throws SParameterProcessNotFoundException, SBonitaReadException return all parameters in a map- Parameters:
processDefinitionId-- Throws:
SParameterProcessNotFoundExceptionSBonitaReadException
-
deleteAll
void deleteAll(long processDefinitionId) throws SParameterProcessNotFoundException, SBonitaReadException, SObjectModificationException Delete all parameters for a specific processDefinition- Parameters:
processDefinitionId- ID of processDefinition- Throws:
SParameterProcessNotFoundException- error thrown if no parameters configuration file found in file systemSBonitaReadExceptionSObjectModificationException
-
get
List<SParameter> get(long processDefinitionId, int fromIndex, int numberOfResult, OrderBy order) throws SOutOfBoundException, SBonitaReadException Get parameters in a specific interval for specific process, this is used for pagination- Parameters:
processDefinitionId- identifier of processDefinitionfromIndex- index of the record to be retrieved from. First record has index 0numberOfResult- number of result we want to get. Maximum number of result returned.order- OrderBy object, contains information to do order- Returns:
- a list of SParameter objects
- Throws:
SOutOfBoundException- error throw if fromIndex >= total size of parametersSBonitaReadException
-
get
Get parameter by name in specific process- Parameters:
processDefinitionId- identifier of processDefinitionparameterName- name of parameter- Returns:
- the parameter or null if it does not exists
- Throws:
SBonitaReadException
-
getNullValues
List<SParameter> getNullValues(long processDefinitionId, int fromIndex, int numberOfResult, OrderBy order) throws SParameterProcessNotFoundException, SOutOfBoundException, SBonitaReadException Get a list of parameters will null values in order in specific process- Parameters:
processDefinitionId- identifier of processDefinitionfromIndex- index of the record to be retrieved from. First record has index 0numberOfResult- number of result we want to get. Maximum number of result returned.order- OrderBy object, contains information to do order- Returns:
- a list of parameters
- Throws:
SParameterProcessNotFoundException- error thrown if no parameters configuration file found in file systemSOutOfBoundException- error throw if fromIndex >= total size of parametersSBonitaReadException
-
containsNullValues
Check if the specific process contains null-valued parameter or not.- Parameters:
processDefinitionId- The ID of the process definition- Returns:
- true if at least one parameter contains a null value, false otherwise.
- Throws:
SParameterProcessNotFoundExceptionSBonitaReadException
-