|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.plugins.util.Parameters
public class Parameters
Utility class for creating some useful plug-in parameters.
Constructor Summary | |
---|---|
Parameters()
|
Method Summary | ||
---|---|---|
static PluginParameter<String> |
charsetParameter(String title,
String description,
String defaultValue)
Parameter definition that asks for the character encoding used in the file that is imported. |
|
static PluginParameter<String> |
childDescriptionParameter(String label,
String description,
String defaultValue)
Create a plugin parameter that asks for the description of the child bioassay set. |
|
static PluginParameter<String> |
childNameParameter(String label,
String description,
String defaultValue)
Create a plugin parameter that asks for the name of the child bioassay set. |
|
static
|
cloneParameter(PluginParameter<T> pp,
T defaultValue)
Clone a plug-in parameter but give it a different default value. |
|
static PluginParameter<String> |
dateFormatError(String title,
String description,
String defaultValue,
String... options)
Create the parameter for handling invalid dates/timestamps. |
|
static PluginParameter<String> |
dateFormatParameter(String title,
String description,
String defaultValue)
Parameter definition that asks for the format used by date values when parsed from strings. |
|
static PluginParameter<String> |
decimalSeparatorParameter(String title,
String description,
String defaultValue)
Parameter definition that asks for the decimal separator used by numeric values when parsed from strings. |
|
static PluginParameter<String> |
defaultError(String title,
String description,
String defaultValue,
String... options)
Create the default error handling parameter. |
|
static PluginParameter<Boolean> |
dryRunParameter(String title,
String description,
Boolean defaultValue)
Parameter definition that enable/disable dry-run of a plug-in. |
|
static PluginParameter<String> |
errorSection(String title,
String description)
Create a parameter starting an error section. |
|
static PluginParameter<String> |
invalidUseOfNullError(String title,
String description,
String defaultValue,
String... options)
Create the parameter for handling required but missing values. |
|
static PluginParameter<String> |
logFileParameter(String title,
String description,
String defaultValue)
Parameter definition that asks for the path to a log file that a plug-in can use for logging detailed information about it's progress. |
|
static PluginParameter<String> |
numberFormatError(String title,
String description,
String defaultValue,
String... options)
Create the parameter for handling invalid numbers. |
|
static PluginParameter<String> |
numberOutOfRangeError(String title,
String description,
String defaultValue,
String... options)
Create the parameter for handling numeric values that are outside the allowed range. |
|
static PluginParameter<String> |
stringTooLongError(String title,
String description,
String defaultValue,
String... options)
Create the parameter for handling too long strings. |
|
static PluginParameter<String> |
timestampFormatParameter(String title,
String description,
String defaultValue)
Parameter definition that asks for the format used by timestamp values when parsed from strings. |
|
static PluginParameter<String> |
transformationNameParameter(String label,
String description,
String defaultValue)
Create a plugin parameter that asks for the name of the transformation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final PluginParameter<String> errorSection
public static final String ERROR_SECTION
errorSection(String, String)
.
public static final String DEFAULT_ERROR
defaultError(String, String, String, String...)
.
public static final String STRING_TOO_LONG_ERROR
stringTooLongError(String, String, String, String...)
.
public static final String NUMBER_FORMAT_ERROR
numberFormatError(String, String, String, String...)
.
public static final String DATE_FORMAT_ERROR
dateFormatError(String, String, String, String...)
.
public static final String INVALID_USE_OF_NULL_ERROR
invalidUseOfNullError(String, String, String, String...)
.
public static final String NUMBER_OUT_OF_RANGE_ERROR
numberOutOfRangeError(String, String, String, String...)
.
public static final String CHARSET_PARAMETER
charsetParameter(String, String, String)
private static final StringParameterType charsetType
charsetParameter(String, String, String)
public static final String DECIMAL_SEPARATOR_PARAMETER
decimalSeparatorParameter(String, String, String)
public static final String DATE_FORMAT_PARAMETER
dateFormatParameter(String, String, String)
public static final String TIMESTAMP_FORMAT_PARAMETER
timestampFormatParameter(String, String, String)
public static final String LOGFILE_PARAMETER
logFileParameter(String, String, String)
public static final String DRY_RUN_PARAMETER
logFileParameter(String, String, String)
public static final String CHILD_NAME
childNameParameter(String, String, String)
public static final String CHILD_DESCRIPTION
childDescriptionParameter(String, String, String)
public static final String TRANSFORMATION_NAME
transformationNameParameter(String, String, String)
Constructor Detail |
---|
public Parameters()
Method Detail |
---|
public static final PluginParameter<String> errorSection(String title, String description)
title
- The title of the section, or null for the default (Error handling)description
- A description, or null for the default
public static final PluginParameter<String> defaultError(String title, String description, String defaultValue, String... options)
title
- The title for the parameter or null for the default (Default error handling)description
- The description or null for the defaultdefaultValue
- The default value or null to use "fail"options
- Options to select from, if null or empty, the "fail" and "skip" are used
public static final PluginParameter<String> stringTooLongError(String title, String description, String defaultValue, String... options)
title
- The title for the parameter or null for the default (String too long)description
- The description or null for the defaultdefaultValue
- The default value or null to use the default error handlingoptions
- Options to select from, if null or empty, the "crop", "fail" and "skip" are used
public static final PluginParameter<String> numberFormatError(String title, String description, String defaultValue, String... options)
title
- The title for the parameter or null for the default (Invalid numeric value)description
- The description or null for the defaultdefaultValue
- The default value or null to use the default error handlingoptions
- Options to select from, if null or empty, the "null", "fail" and "skip" are used
public static final PluginParameter<String> dateFormatError(String title, String description, String defaultValue, String... options)
title
- The title for the parameter or null for the default (Invalid date)description
- The description or null for the defaultdefaultValue
- The default value or null to use the default error handlingoptions
- Options to select from, if null or empty, the "null", "fail" and "skip" are used
public static final PluginParameter<String> invalidUseOfNullError(String title, String description, String defaultValue, String... options)
title
- The title for the parameter or null for the default (Missing a required value)description
- The description or null for the defaultdefaultValue
- The default value or null to use the default error handlingoptions
- Options to select from, if null or empty, the "fail" and "skip" are used
public static final PluginParameter<String> numberOutOfRangeError(String title, String description, String defaultValue, String... options)
title
- The title for the parameter or null for the default (Numeric value out of range)description
- The description or null for the defaultdefaultValue
- The default value or null to use the default error handlingoptions
- Options to select from, if null or empty, the "fail" and "skip" are used
public static final PluginParameter<String> charsetParameter(String title, String description, String defaultValue)
Config.getCharset()
.
title
- The title to use for the parameter or null to use the default label
(Character set)description
- The description to use for the parameter or null to use the
default descriptiondefaultValue
- The default value for the character set or null to use
the system defaultpublic static final PluginParameter<String> decimalSeparatorParameter(String title, String description, String defaultValue)
title
- The title to use for the parameter or null to use the default title
(Decimal separator)description
- The description to use for the parameter or null to use the
default descriptiondefaultValue
- The default value for the decimal separatorpublic static final PluginParameter<String> dateFormatParameter(String title, String description, String defaultValue)
SimpleDateFormat
for more info about template values.
title
- The title to use for the parameter or null to use the default title
(Date format)description
- The description to use for the parameter or null to use the
default descriptiondefaultValue
- The default value for the date formatpublic static final PluginParameter<String> timestampFormatParameter(String title, String description, String defaultValue)
SimpleDateFormat
for more info about template values.
title
- The title to use for the parameter or null to use the default title
(Timestamp format)description
- The description to use for the parameter or null to use the
default descriptiondefaultValue
- The default value for the timestamp formatpublic static PluginParameter<String> logFileParameter(String title, String description, String defaultValue)
title
- The title to use for the parameter or null to use the default title
(Log file)description
- The description to use for the parameter or null to use the
default descriptiondefaultValue
- The default pathpublic static PluginParameter<Boolean> dryRunParameter(String title, String description, Boolean defaultValue)
logFileParameter(String, String, String)
.
title
- The title to use for the parameter or null to use the default title
(Dry run)description
- The description to use for the parameter or null to use the
default descriptiondefaultValue
- The default valuepublic static <T> PluginParameter<T> cloneParameter(PluginParameter<T> pp, T defaultValue)
pp
- The plug-in parameter to clonedefaultValue
- The new default value
public static PluginParameter<String> childNameParameter(String label, String description, String defaultValue)
label
- The label to use for the parameter or null to use the default label
(Child name)description
- The description to use for the parameter or null to use the
default description (The name of the child bioassay set)defaultValue
- The default value for the child name or null to use
the default value (New bioassay set)
public static PluginParameter<String> childDescriptionParameter(String label, String description, String defaultValue)
label
- The label to use for the parameter or null to use the default label
(Child description)description
- The description to use for the parameter or null to use the
default description (An optional description of the child bioassay set)defaultValue
- The default value for the child name or null to not use any
default value
public static PluginParameter<String> transformationNameParameter(String label, String description, String defaultValue)
label
- The label to use for the parameter or null to use the default label
(Transformation name)description
- The description to use for the parameter or null to use the
default description (The name of the transformation)defaultValue
- The default value for the transformation name or null to not
use any default
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |