Class Modules
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.core.Modules
-
public class Modules extends Object
This class contains useful methods for writing Step classes.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
deprecatedParameter
public static void deprecatedParameter(StepConfigurationContext context, Parameter parameter)
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 parameter- 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 parameter- 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
-
removedParameter
public static void removedParameter(String stepId, Parameter parameter) throws EoulsanException
Throw a exception for removed parameters.- Parameters:
stepId- the step identifierparameter- the deprecated parameter- Throws:
EoulsanException
-
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
-
unknownParameter
public static void unknownParameter(String stepId, Parameter parameter) throws EoulsanException
Throw a exception for unknown parameters.- Parameters:
stepId- the step identifierparameter- the deprecated parameter- Throws:
EoulsanException
-
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
-
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
-
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
-
invalidConfiguration
public static void invalidConfiguration(String stepId, String message) throws EoulsanException
Throw a exception for an invalid configuration.- Parameters:
stepId- the step identifiermessage- error message- Throws:
EoulsanException
-
getParameter
public static Parameter getParameter(Set<Parameter> parameters, String parameterName)
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
public static boolean containsParameter(Set<Parameter> parameters, String parameterName)
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
-
-