Class Modules
java.lang.Object
fr.ens.biologie.genomique.eoulsan.core.Modules
This class contains useful methods for writing Step classes.
- Since:
- 2.0
- Author:
- Laurent Jourdren
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidbadParameterValue(StepConfigurationContext context, Parameter parameter, String message) Throw a exception for bad parameter value.static voidbadParameterValue(String stepId, Parameter parameter, String message) Throw a exception for bad parameter value.static booleancontainsParameter(Set<Parameter> parameters, String parameterName) test if a set of parameters contains a parameter.static voiddeprecatedParameter(StepConfigurationContext context, Parameter parameter) Show a message for deprecated parameters.static voiddeprecatedParameter(StepConfigurationContext context, Parameter parameter, boolean throwException) Show a message for deprecated parameters.static voiddeprecatedParameter(String stepId, Parameter parameter, boolean throwException) Show a message for deprecated parameters.static ParametergetParameter(Set<Parameter> parameters, String parameterName) Get the last parameter which name match for a parameter set.static voidinvalidConfiguration(StepConfigurationContext context, String message) Throw a exception for an invalid configuration.static voidinvalidConfiguration(String stepId, String message) Throw a exception for an invalid configuration.static voidremovedParameter(StepConfigurationContext context, Parameter parameter) Throw a exception for removed parameters.static voidremovedParameter(String stepId, Parameter parameter) Throw a exception for removed parameters.static voidrenamedParameter(StepConfigurationContext context, Parameter parameter, String newParameterName) Show a message for deprecated parameters that has been renamed.static voidrenamedParameter(StepConfigurationContext context, Parameter parameter, String newParameterName, boolean throwException) Show a message for deprecated parameters that has been renamed.static voidrenamedParameter(String stepId, Parameter parameter, String newParameterName, boolean throwException) Show a message for deprecated parameters that has been renamed.static voidunknownParameter(StepConfigurationContext context, Parameter parameter) Throw a exception for unknown parameters.static voidunknownParameter(String stepId, Parameter parameter) Throw a exception for unknown parameters.
-
Method Details
-
deprecatedParameter
Show a message for deprecated parameters.- Parameters:
context- the step configuration contextparameter- the deprecated parameter
-
deprecatedParameter
public static void deprecatedParameter(StepConfigurationContext context, Parameter parameter, boolean throwException) throws EoulsanException Show a message for deprecated parameters.- Parameters:
context- the step configuration contextparameter- the deprecated parameterthrowException- if true, an exception will be thrown if the parameter is deprecated- Throws:
EoulsanException- throw an exception if required
-
deprecatedParameter
public static void deprecatedParameter(String stepId, Parameter parameter, boolean throwException) throws EoulsanException Show a message for deprecated parameters.- Parameters:
stepId- the step identifierparameter- the deprecated parameterthrowException- if true, an exception will be thrown if the parameter is deprecated- Throws:
EoulsanException- throw an exception if required
-
renamedParameter
public static void renamedParameter(StepConfigurationContext context, Parameter parameter, String newParameterName) Show a message for deprecated parameters that has been renamed. This method do not throw an exception.- Parameters:
context- the step configuration contextparameter- the deprecated parameternewParameterName- the new parameter name
-
renamedParameter
public static void renamedParameter(StepConfigurationContext context, Parameter parameter, String newParameterName, boolean throwException) throws EoulsanException Show a message for deprecated parameters that has been renamed.- Parameters:
context- the step configuration contextparameter- the deprecated parameternewParameterName- the new parameter namethrowException- throw an exception- Throws:
EoulsanException- throw an exception if required
-
renamedParameter
public static void renamedParameter(String stepId, Parameter parameter, String newParameterName, boolean throwException) throws EoulsanException Show a message for deprecated parameters that has been renamed.- Parameters:
stepId- the step identifierparameter- the deprecated parameternewParameterName- the new parameter namethrowException- throw an exception- Throws:
EoulsanException- throw an exception if required
-
removedParameter
public static void removedParameter(StepConfigurationContext context, Parameter parameter) throws EoulsanException Throw a exception for removed parameters.- Parameters:
context- the step configuration contextparameter- the deprecated parameter- Throws:
EoulsanException- if the parameter has been removed
-
removedParameter
Throw a exception for removed parameters.- Parameters:
stepId- the step identifierparameter- the deprecated parameter- Throws:
EoulsanException- if the parameter has been removed
-
unknownParameter
public static void unknownParameter(StepConfigurationContext context, Parameter parameter) throws EoulsanException Throw a exception for unknown parameters.- Parameters:
context- the step configuration contextparameter- the deprecated parameter- Throws:
EoulsanException- if the parameter is unknown
-
unknownParameter
Throw a exception for unknown parameters.- Parameters:
stepId- the step identifierparameter- the deprecated parameter- Throws:
EoulsanException- if the parameter is unknown
-
badParameterValue
public static void badParameterValue(StepConfigurationContext context, Parameter parameter, String message) throws EoulsanException Throw a exception for bad parameter value.- Parameters:
context- the step configuration contextparameter- the deprecated parametermessage- error message- Throws:
EoulsanException- if the parameter value is invalid
-
badParameterValue
public static void badParameterValue(String stepId, Parameter parameter, String message) throws EoulsanException Throw a exception for bad parameter value.- Parameters:
stepId- the step identifierparameter- the deprecated parametermessage- error message- Throws:
EoulsanException- if the parameter value is invalid
-
invalidConfiguration
public static void invalidConfiguration(StepConfigurationContext context, String message) throws EoulsanException Throw a exception for an invalid configuration.- Parameters:
context- the step configuration contextmessage- error message- Throws:
EoulsanException- if the configuration is invalid
-
invalidConfiguration
Throw a exception for an invalid configuration.- Parameters:
stepId- the step identifiermessage- error message- Throws:
EoulsanException- if the configuration is invalid
-
getParameter
Get the last parameter which name match for a parameter set.- Parameters:
parameters- the parameter setparameterName- the name of the parameter to look for- Returns:
- the last parameter that match or null if the parameter is not found
-
containsParameter
test if a set of parameters contains a parameter.- Parameters:
parameters- the parameter setparameterName- the name of the parameter to look for- Returns:
- true if the set of parameter contains the parameter
-