public class ParameterServiceImpl extends java.lang.Object implements ParameterService
| Modifier and Type | Field and Description |
|---|---|
static int |
PAGE_SIZE |
static java.lang.String |
PARAMETER |
| Constructor and Description |
|---|
ParameterServiceImpl(Recorder recorder,
ReadPersistenceService persistenceService,
TechnicalLoggerService technicalLoggerService) |
| Modifier and Type | Method and 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 system
|
boolean |
containsNullValues(long processDefinitionId)
Check if the specific process contains null-valued parameter or not.
|
void |
deleteAll(long processDefinitionId)
Delete all parameters for a specific processDefinition
|
java.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 pagination
|
SParameter |
get(long processDefinitionId,
java.lang.String parameterName)
Get parameter by name in specific process
|
java.util.Map<java.lang.String,java.lang.String> |
getAll(long processDefinitionId)
return all parameters in a map
|
java.util.List<SParameter> |
getNullValues(long processDefinitionId,
int fromIndex,
int numberOfResult,
OrderBy order)
Get a list of parameters will null values in order in specific process
|
protected java.lang.String |
interpretParameterValue(java.lang.String s)
Handle null values.
|
void |
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
|
public static final int PAGE_SIZE
public static final java.lang.String PARAMETER
public ParameterServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, TechnicalLoggerService technicalLoggerService)
public void update(long processDefinitionId,
java.lang.String parameterName,
java.lang.String parameterValue)
throws SParameterNameNotFoundException,
SBonitaReadException,
SObjectModificationException
ParameterServiceupdate in interface ParameterServiceprocessDefinitionId - identifier of processDefinitionparameterName - name of the parameter will be updatedparameterValue - new value of the parameterSParameterNameNotFoundException - error thrown if no parameter found for the specific parameterNameSBonitaReadExceptionSObjectModificationExceptionpublic void merge(long processDefinitionId,
java.util.Map<java.lang.String,java.lang.String> parameters)
throws SBonitaReadException,
SObjectModificationException
ParameterServicemerge in interface ParameterServiceprocessDefinitionId - identifier of processDefinitionparameters - parameters to mergeSBonitaReadException - error thrown if an error occured while retrieving the process definitionSObjectModificationException - error thrown if an error occured while updating the parameter valueprotected java.lang.String interpretParameterValue(java.lang.String s)
ParameterContribution.NULL, convert it to
nullpublic void addAll(long processDefinitionId,
java.util.Map<java.lang.String,java.lang.String> parameters)
throws SObjectCreationException,
SBonitaReadException,
SObjectModificationException
ParameterServiceaddAll in interface ParameterServiceprocessDefinitionId - identifier of processDefinitionparameters - parameters will be stored in file systemSObjectCreationExceptionSBonitaReadExceptionSObjectModificationExceptionpublic java.util.Map<java.lang.String,java.lang.String> getAll(long processDefinitionId)
throws SParameterProcessNotFoundException,
SBonitaReadException
ParameterServicegetAll in interface ParameterServiceSParameterProcessNotFoundExceptionSBonitaReadExceptionpublic void deleteAll(long processDefinitionId)
throws SParameterProcessNotFoundException,
SBonitaReadException,
SObjectModificationException
ParameterServicedeleteAll in interface ParameterServiceprocessDefinitionId - ID of processDefinitionSParameterProcessNotFoundException - error thrown if no parameters configuration file found in file systemSBonitaReadExceptionSObjectModificationExceptionpublic java.util.List<SParameter> get(long processDefinitionId, int fromIndex, int numberOfResult, OrderBy order) throws SBonitaReadException
ParameterServiceget in interface ParameterServiceprocessDefinitionId - 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 orderSBonitaReadExceptionpublic SParameter get(long processDefinitionId, java.lang.String parameterName) throws SBonitaReadException
ParameterServiceget in interface ParameterServiceprocessDefinitionId - identifier of processDefinitionparameterName - name of parameterSBonitaReadExceptionpublic java.util.List<SParameter> getNullValues(long processDefinitionId, int fromIndex, int numberOfResult, OrderBy order) throws SParameterProcessNotFoundException, SBonitaReadException
ParameterServicegetNullValues in interface ParameterServiceprocessDefinitionId - 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 orderSParameterProcessNotFoundException - error thrown if no parameters configuration file found in file systemSBonitaReadExceptionpublic boolean containsNullValues(long processDefinitionId)
throws SBonitaReadException
ParameterServicecontainsNullValues in interface ParameterServiceprocessDefinitionId - The ID of the process definitionSBonitaReadException