Package org.bonitasoft.engine.parameter
Interface ParameterService
-
- All Known Implementing Classes:
ParameterServiceImpl
public interface ParameterService
- Since:
- 6.0
- Author:
- Matthieu Chaffotte
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAll(long processDefinitionId, java.util.Map<java.lang.String,java.lang.String> parameters)
Store all parameters provided to the specific process in file systemboolean
containsNullValues(long processDefinitionId)
Check if the specific process contains null-valued parameter or not.void
deleteAll(long processDefinitionId)
Delete all parameters for a specific processDefinitionjava.util.List<SParameter>
get(long processDefinitionId, int fromIndex, int numberOfResult, OrderBy order)
Get parameters in a specific interval for specific process, this is used for paginationSParameter
get(long processDefinitionId, java.lang.String parameterName)
Get parameter by name in specific processjava.util.Map<java.lang.String,java.lang.String>
getAll(long processDefinitionId)
return all parameters in a mapjava.util.List<SParameter>
getNullValues(long processDefinitionId, int fromIndex, int numberOfResult, OrderBy order)
Get a list of parameters will null values in order in specific processvoid
merge(long processDefinitionId, java.util.Map<java.lang.String,java.lang.String> parameters)
Merge given parameters with existing ones.void
update(long processDefinitionId, java.lang.String parameterName, java.lang.String parameterValue)
Update specific parameter value in a process
-
-
-
Method Detail
-
update
void update(long processDefinitionId, java.lang.String parameterName, java.lang.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 parameterNameSBonitaReadException
SObjectModificationException
-
merge
void merge(long processDefinitionId, java.util.Map<java.lang.String,java.lang.String> parameters) throws SBonitaReadException, SObjectModificationException
Merge given parameters with existing ones. Unknown parameters are ignored.- Parameters:
processDefinitionId
- identifier of processDefinitionparameters
- parameters to merge- Throws:
SBonitaReadException
- error thrown if an error occured while retrieving the process definitionSObjectModificationException
- error thrown if an error occured while updating the parameter value
-
addAll
void addAll(long processDefinitionId, java.util.Map<java.lang.String,java.lang.String> parameters) throws SParameterProcessNotFoundException, SObjectCreationException, SBonitaReadException, SObjectModificationException
Store 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 systemSObjectCreationException
SBonitaReadException
SObjectModificationException
-
getAll
java.util.Map<java.lang.String,java.lang.String> getAll(long processDefinitionId) throws SParameterProcessNotFoundException, SBonitaReadException
return all parameters in a map- Parameters:
processDefinitionId
-- Throws:
SParameterProcessNotFoundException
SBonitaReadException
-
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 systemSBonitaReadException
SObjectModificationException
-
get
java.util.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
SParameter get(long processDefinitionId, java.lang.String parameterName) throws SBonitaReadException
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
java.util.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
boolean containsNullValues(long processDefinitionId) throws SBonitaReadException
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:
SParameterProcessNotFoundException
SBonitaReadException
-
-