public class ParameterHelper extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends Enum<T>> |
checkNullOrEmptyParameter(T key,
String value,
Set<T> mandatories)
Check parameter emptiness or nullity
|
static <T extends Enum<T>> |
checkNullOrEmptyParameters(Map<T,String> parameters,
Set<T> mandatories)
Check parameters emptiness or nullity
|
static <T extends VitamParameter> |
checkNullOrEmptyParameters(T parameters)
Check parameters emptiness or nullity
|
static Integer |
getTenantParameter()
Get the tenant parameter from the Vitam Session
|
public static <T extends Enum<T>> void checkNullOrEmptyParameter(T key, String value, Set<T> mandatories)
key
- the attribute namevalue
- the attribute value to checkmandatories
- the set of mandatories fieldIllegalArgumentException
- if an argument is null or empty against mandatorypublic static <T extends Enum<T>> void checkNullOrEmptyParameters(Map<T,String> parameters, Set<T> mandatories)
parameters
- the map parameters (key = attribute name, value = attribute value)mandatories
- the set of mandatories fieldIllegalArgumentException
- if an argument is null or empty against mandatorypublic static <T extends VitamParameter> void checkNullOrEmptyParameters(T parameters)
parameters
- the template of vitam parameterIllegalArgumentException
- if an argument is null or empty against mandatorypublic static Integer getTenantParameter()
IllegalArgumentException
- if the tenant Id is not found in the sessionVitamThreadAccessException
- if there is no VitamThreadCopyright © 2018 Vitam. All rights reserved.