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 voidaddAll(long processDefinitionId, java.util.Map<java.lang.String,java.lang.String> parameters)Store 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 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 paginationSParameterget(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 processvoidmerge(long processDefinitionId, java.util.Map<java.lang.String,java.lang.String> parameters)Merge given parameters with existing ones.voidupdate(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, SObjectModificationExceptionUpdate 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, java.util.Map<java.lang.String,java.lang.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 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, 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
java.util.Map<java.lang.String,java.lang.String> getAll(long processDefinitionId) throws SParameterProcessNotFoundException, SBonitaReadExceptionreturn all parameters in a map- Parameters:
processDefinitionId-- Throws:
SParameterProcessNotFoundExceptionSBonitaReadException
-
deleteAll
void deleteAll(long processDefinitionId) throws SParameterProcessNotFoundException, SBonitaReadException, SObjectModificationExceptionDelete 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
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 SBonitaReadExceptionCheck 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
-
-