|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.processor.DefaultRequestElementFactory
public class DefaultRequestElementFactory
The request element factory is responsible for creating Parameters with predefined datatypes, validity
ranges and appropriate editors (i.e. UI elements). The request element factory is invoked by
RequestLoader to assemble Requests and validate the datat coming from a request file.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
DefaultRequestElementFactory()
|
|
| Method Summary | |
|---|---|
ParamProperties |
createBitmaskParamProperties()
Creates a default parameter info type for parameters of type bitmask expression. |
ParamProperties |
createBooleanParamProperties()
Creates default boolean parameter properties. |
ParamProperties |
createBoundFloatParamProperties()
Creates a default parameter info type for parameters of type bound float. |
Parameter |
createDefaultInputProductParameter()
Creates an input product parameter set to the default path. |
Parameter |
createDefaultLogPatternParameter(String prefix)
Creates a default logging pattern parameter set to the prefix passed in. |
Parameter |
createDefaultOutputProductParameter()
Creates an output product parameter set to the current user's home directory. |
ParamProperties |
createFileParamProperties(int fileSelectionMode,
Object defaultValue)
Creates a default ParamProperties for file parameters with given file selection mode and given
default value. |
ParamProperties |
createFloatParamProperties()
Creates a default parameter info type for parameters of type float |
ProductRef |
createInputProductRef(File file,
String fileFormat,
String typeId)
Creates a new reference to an input product for the current processing request. |
ParamProperties |
createIntegerParamProperties()
Creates a default parameter info type for parameters of type float |
Parameter |
createLogToOutputParameter(String value)
Creates a logging to output product parameter with the default value true. |
Parameter |
createOutputFormatParameter()
Creates an output product format parameter with all the registered product format names |
ProductRef |
createOutputProductRef(File file,
String fileFormat,
String typeId)
Creates a new reference to an output product for the current processing request. |
Parameter |
createParameter(String name,
String value)
Creates a Parameter of type String with the given name and the given
String value. |
ParamProperties |
createStringArrayParamProperties()
Creates a string array value parameter information. |
ParamProperties |
createStringParamProperties()
Creates default string value parameter properties. |
static DefaultRequestElementFactory |
getInstance()
Retrieve an instance of the factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultRequestElementFactory()
| Method Detail |
|---|
public static DefaultRequestElementFactory getInstance()
public ProductRef createInputProductRef(File file,
String fileFormat,
String typeId)
throws RequestElementFactoryException
createInputProductRef in interface RequestElementFactoryfile - the input product's file, must not be nullfileFormat - the file format, can be null if not knowntypeId - the product type identifier, can be null if not known
IllegalArgumentException - if url is null
RequestElementFactoryException - if the element could not be created
public ProductRef createOutputProductRef(File file,
String fileFormat,
String typeId)
throws RequestElementFactoryException
createOutputProductRef in interface RequestElementFactoryfile - the output product's file, must not be nullfileFormat - the file format, can be null if not knowntypeId - the product type identifier, can be null if not known
IllegalArgumentException - if url is null
RequestElementFactoryException - if the element could not be created
public Parameter createParameter(String name,
String value)
throws RequestElementFactoryException
Parameter of type String with the given name and the given
String value.
createParameter in interface RequestElementFactoryname - the parameter namevalue - the value of the parameter
RequestElementFactoryException - if the parameter could not be created or is invalidpublic Parameter createDefaultLogPatternParameter(String prefix)
createDefaultLogPatternParameter in interface RequestElementFactoryprefix - the default setting for the logging pattern
public Parameter createLogToOutputParameter(String value)
throws ParamValidateException
true.
The current value is set to the given parameter value.
createLogToOutputParameter in interface RequestElementFactoryvalue - the value as String this parameter is set to.
ParamValidateException
public ParamProperties createFileParamProperties(int fileSelectionMode,
Object defaultValue)
ParamProperties for file parameters with given file selection mode and given
default value.
fileSelectionMode - the file selection mode, can be FSM_FILES_ONLY, FSM_DIRECTORIES_ONLY and
FSM_FILES_AND_DIRECTORIES defined in ParamProperties.defaultValue - the default value wich was set at the returned ParamProperties
IllegalArgumentException - if the parameter fileSelectionMode is not a valid selection mode:
Valid file selection modes are FSM_FILES_ONLY, FSM_DIRECTORIES_ONLY and
FSM_FILES_AND_DIRECTORIESpublic ParamProperties createBitmaskParamProperties()
public ParamProperties createBoundFloatParamProperties()
public ParamProperties createIntegerParamProperties()
public ParamProperties createFloatParamProperties()
public ParamProperties createStringArrayParamProperties()
public ParamProperties createStringParamProperties()
public ParamProperties createBooleanParamProperties()
public Parameter createDefaultInputProductParameter()
createDefaultInputProductParameter in interface RequestElementFactorypublic Parameter createDefaultOutputProductParameter()
createDefaultOutputProductParameter in interface RequestElementFactorypublic Parameter createOutputFormatParameter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||