Class ECtransSetup
java.lang.Object
ecmwf.common.ectrans.ECtransSetup
- All Implemented Interfaces:
Serializable
The Class ECtransSetup.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionECtransSetup(String moduleName) Instantiates a new ectrans setup.ECtransSetup(String moduleName, String data, Pair<?>... parameters) Instantiates a new ectrans setup. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the parameter exists in the current module.booleanget(ECtransOptionDefinition option, boolean defaultValue) Gets the.intget(ECtransOptionDefinition option, int defaultValue) Gets the.longget(ECtransOptionDefinition option, long defaultValue) Gets the.get(ECtransOptionDefinition option, ByteSize defaultValue) Gets the.get(ECtransOptionDefinition option, String defaultValue) Gets the.get(ECtransOptionDefinition option, Duration defaultValue) Gets the.get(ECtransOptionDefinition option, Period defaultValue) Gets the.booleanget(ECtransOptions option, boolean defaultValue) intget(ECtransOptions option, int defaultValue) longget(ECtransOptions option, long defaultValue) get(ECtransOptions option, ByteSize defaultValue) get(ECtransOptions option, String defaultValue) get(ECtransOptions option, Duration defaultValue) get(ECtransOptions option, Period defaultValue) intGets the.Gets the.booleangetBoolean(ECtransOptionDefinition option) Gets the boolean.booleangetBoolean(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the boolean.booleangetBoolean(ECtransOptions option) booleangetBoolean(ECtransOptions option, org.graalvm.polyglot.Value bindings) Gets the list of booleans.getBooleanList(ECtransOptions option) Gets the boolean object.getBooleanObject(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the boolean object.getBooleanObject(ECtransOptions option) getBooleanObject(ECtransOptions option, org.graalvm.polyglot.Value bindings) getByteSize(ECtransOptionDefinition option) Gets the byte size.getByteSize(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the byte size.getByteSize(ECtransOptions option) getByteSize(ECtransOptions option, org.graalvm.polyglot.Value bindings) getByteSize(String name) Gets byte size.getByteSize(String name, ByteSize defaultValue) Gets byte size.getByteSize(String moduleName, String name, ByteSize defaultValue) Gets byte size.Gets the list of byte sizes.getByteSizeList(ECtransOptions option) Gets the checksum algorithm currently configured via "ectrans.checksumAlgorithm", defaulting to MD5 if unset or invalid.getChecksumExtension(ECtransOptionDefinition legacyMd5ExtOption) Gets the extension to use for the checksum sidecar file written by transfer modules such as FTP/FTPS/SFTP.getChecksumExtension(ECtransOptions legacyMd5ExtOption) getData()Gets the data (sorted properties and script if engine exists).getDouble(ECtransOptionDefinition option) Gets the double.getDouble(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the double.getDouble(ECtransOptions option) getDouble(ECtransOptions option, org.graalvm.polyglot.Value bindings) getDoubleList(ECtransOptionDefinition option) Gets the list of doubles.getDoubleList(ECtransOptions option) getDuration(ECtransOptionDefinition option) Gets the.getDuration(ECtransOptions option) getDuration(String name) Gets duration.getDuration(String moduleName, String name, Duration defaultValue) Gets the duration.getDuration(String name, Duration defaultValue) Gets duration.getInteger(ECtransOptionDefinition option) Gets the integer.getInteger(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the integer.getInteger(ECtransOptions option) getInteger(ECtransOptions option, org.graalvm.polyglot.Value bindings) Gets the lif of integers.getIntegerList(ECtransOptions option) String[]Gets the list.getLong(ECtransOptionDefinition option) Gets the long.getLong(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the long.getLong(ECtransOptions option) getLong(ECtransOptions option, org.graalvm.polyglot.Value bindings) getLongList(ECtransOptionDefinition option) Gets the list of longs.getLongList(ECtransOptions option) Gets the module name.Gets the optional boolean.getOptionalBoolean(ECtransOptions option) Gets the optional byte size.getOptionalByteSize(ECtransOptions option) Gets the optional double.getOptionalDouble(ECtransOptions option) Gets the optional duration.getOptionalDuration(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the optional duration.getOptionalDuration(ECtransOptions option) getOptionalDuration(ECtransOptions option, org.graalvm.polyglot.Value bindings) Gets the optional integer.getOptionalInteger(ECtransOptions option) Gets the optional long.getOptionalLong(ECtransOptions option) Gets the optional period.getOptionalPeriod(ECtransOptions option) Gets the optional string.getOptionalString(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the optional string.getOptionalString(ECtransOptions option) getOptionalString(ECtransOptions option, org.graalvm.polyglot.Value bindings) Gets the optional time range.getOptionalTimeRange(ECtransOptions option) getOptions(ECtransOptionDefinition option) Gets the.getOptions(ECtransOptionDefinition option, String delimiters) Gets the.getOptions(ECtransOptionDefinition option, String key, String delimiters) Gets the.getOptions(ECtransOptions option) getOptions(ECtransOptions option, String delimiters) getOptions(ECtransOptions option, String key, String delimiters) getOptions(String name, String key, String delimiters) Gets the.getPeriod(ECtransOptionDefinition option) Gets the.getPeriod(ECtransOptions option) Gets the period.Gets the period.Gets the period.getProperties(boolean secured) Gets the sorted properties.Gets the script if the engine exists.Get the resolved underlying script content, or null if empty.Get the script language.getString(ECtransOptionDefinition option) Gets the string.getString(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the string.getString(ECtransOptions option) getString(ECtransOptions option, org.graalvm.polyglot.Value bindings) getStringList(ECtransOptionDefinition option) Gets list of strings.getStringList(ECtransOptions option) getTimeRange(ECtransOptionDefinition option) Gets the time range.getTimeRange(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the time range.getTimeRange(ECtransOptions option) getTimeRange(ECtransOptions option, org.graalvm.polyglot.Value bindings) Gets the list of time ranges.getTimeRangeList(ECtransOptions option) static booleanisOptionDefined(ECtransOptionDefinition option, String content) Basic check to see if the option is declared in the script content.static booleanisOptionDefined(ECtransOptions option, String content) booleanmatches(ECtransOptionDefinition options, String value) Matches.booleanmatches(ECtransOptionDefinition option, String value, String defaultRegex) Matches.booleanmatches(ECtransOptions options, String value) booleanmatches(ECtransOptions option, String value, String defaultRegex) booleanMatches.remove(ECtransOptionDefinition option) Removes the.remove(ECtransOptions option) Removes the.voidremoveAll(ECtransGroups.Module module) Removes all parameters for the specified module name.voidRemoves all parameters for the specified module name.Allow getting a new instance with the added parameters provided.voidset(ECtransOptionDefinition option, boolean value) Sets the.voidset(ECtransOptionDefinition option, double value) Sets the.voidset(ECtransOptionDefinition option, int value) Sets the.voidset(ECtransOptionDefinition option, long value) Sets the.voidset(ECtransOptionDefinition option, ByteSize value) Sets the.voidset(ECtransOptionDefinition option, String value) Sets the.voidset(ECtransOptions option, boolean value) voidset(ECtransOptions option, double value) voidset(ECtransOptions option, int value) voidset(ECtransOptions option, long value) voidset(ECtransOptions option, ByteSize value) voidset(ECtransOptions option, String value) voidSets the double.voidSets the int.voidAllow setting the aliases.voidsetBooleanIfPresent(ECtransOptionDefinition option, Consumer<? super Boolean> action) Sets the optional boolean if present.voidsetBooleanIfPresent(ECtransOptions option, Consumer<? super Boolean> action) voidsetByteSizeIfPresent(ECtransOptionDefinition option, Consumer<? super ByteSize> action) Sets the optional byte size if present.voidsetByteSizeIfPresent(ECtransOptions option, Consumer<? super ByteSize> action) voidSets the data.voidsetDoubleIfPresent(ECtransOptionDefinition option, Consumer<? super Double> action) Sets the optional double if present.voidsetDoubleIfPresent(ECtransOptions option, Consumer<? super Double> action) voidsetDurationIfPresent(ECtransOptionDefinition option, Consumer<? super Duration> action) Sets the optional duration if present.voidsetDurationIfPresent(ECtransOptions option, Consumer<? super Duration> action) voidsetIntegerIfPresent(ECtransOptionDefinition option, Consumer<? super Integer> action) Sets the optional integer if present.voidsetIntegerIfPresent(ECtransOptions option, Consumer<? super Integer> action) voidsetLongIfPresent(ECtransOptionDefinition option, Consumer<? super Long> action) Sets the optional long if present.voidsetLongIfPresent(ECtransOptions option, Consumer<? super Long> action) voidsetPeriodIfPresent(ECtransOptionDefinition option, Consumer<? super Period> action) Sets the optional period if present.voidsetPeriodIfPresent(ECtransOptions option, Consumer<? super Period> action) voidsetStringIfPresent(ECtransOptionDefinition option, Consumer<? super String> action) Sets the optional string if present.voidsetStringIfPresent(ECtransOptions option, Consumer<? super String> action) voidsetTimeRangeIfPresent(ECtransOptionDefinition option, Consumer<? super TimeRange> action) Sets the optional time range if present.voidsetTimeRangeIfPresent(ECtransOptions option, Consumer<? super TimeRange> action) voidstandardize(ECtransOptionDefinition option, boolean removeIfSameAsDefault) Normalize the representation of the data and remove option with same value as default value if required.voidstandardize(ECtransOptions option, boolean removeIfSameAsDefault)
-
Field Details
-
SEPARATOR
-
-
Constructor Details
-
ECtransSetup
Instantiates a new ectrans setup.- Parameters:
moduleName- the module name
-
ECtransSetup
-
-
Method Details
-
replace
Allow getting a new instance with the added parameters provided.- Parameters:
parameters- the parameters- Returns:
- the ectrans setup
-
setData
-
remove
-
remove
Removes the.- Parameters:
option- the option- Returns:
- the string
-
removeAll
Removes all parameters for the specified module name. This is used to clean a host.- Parameters:
moduleName- the module name
-
removeAll
Removes all parameters for the specified module name. This is used to clean a host.- Parameters:
module- the module
-
matches
-
matches
Matches.- Parameters:
options- the optionsvalue- the value- Returns:
- true, if successful
-
matches
Matches.- Parameters:
option- the optionvalue- the valuedefaultRegex- the default regex- Returns:
- true, if successful
-
get
-
get
Gets the.- Parameters:
option- the optiondefaultValue- the default value- Returns:
- the string
-
getDuration
Gets the.- Parameters:
option- the option- Returns:
- the duration
-
get
Gets the.- Parameters:
option- the optiondefaultValue- the default value- Returns:
- the duration
-
getPeriod
Gets the.- Parameters:
option- the option- Returns:
- the period
-
get
Gets the.- Parameters:
option- the optiondefaultValue- the default value- Returns:
- the period
-
get
Gets the.- Parameters:
option- the optiondefaultValue- the default value- Returns:
- the byte size
-
getList
-
getOptions
Gets the.- Parameters:
option- the option- Returns:
- the options
-
getOptions
Gets the.- Parameters:
option- the optiondelimiters- the delimiters- Returns:
- the options
-
getOptions
Gets the.- Parameters:
option- the optionkey- the keydelimiters- the delimiters- Returns:
- the options
-
getOptions
-
getDuration
-
getDuration
-
getDuration
-
getPeriod
-
getPeriod
-
getPeriod
-
getByteSize
-
getByteSize
-
getByteSize
-
getBooleanList
Gets the list of booleans.- Parameters:
option- the option- Returns:
- the list of booleans
-
getBoolean
Gets the boolean.- Parameters:
option- the option- Returns:
- the object of type class
-
getBoolean
Gets the boolean.- Parameters:
option- the optionbindings- the bindings- Returns:
- the object of type class
-
getBooleanObject
Gets the boolean object.- Parameters:
option- the option- Returns:
- the object of type class
-
getBooleanObject
public Boolean getBooleanObject(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the boolean object.- Parameters:
option- the optionbindings- the bindings- Returns:
- the object of type class
-
getOptionalBoolean
Gets the optional boolean.- Parameters:
option- the option- Returns:
- the object of type class
-
setBooleanIfPresent
Sets the optional boolean if present.- Parameters:
option- the optionaction- the action
-
getStringList
Gets list of strings.- Parameters:
option- the option- Returns:
- the list of strings
-
getString
Gets the string.- Parameters:
option- the option- Returns:
- the object of type class
-
getChecksumAlgorithm
Gets the checksum algorithm currently configured via "ectrans.checksumAlgorithm", defaulting to MD5 if unset or invalid.- Returns:
- the checksum algorithm
-
getChecksumExtension
Gets the extension to use for the checksum sidecar file written by transfer modules such as FTP/FTPS/SFTP. Resolution order: the common "ectrans.checksumExt" option if set, then (only when the configured checksum algorithm is MD5) the module-specific legacy extension option (e.g. "ftp.md5Ext"), and finally the default extension for the configured algorithm (e.g. ".sha256").- Parameters:
legacyMd5ExtOption- the module-specific legacy md5Ext option (e.g. HOST_FTP_MD5_EXT)- Returns:
- the checksum extension
-
getString
Gets the string.- Parameters:
option- the optionbindings- the bindings- Returns:
- the object of type class
-
getOptionalString
Gets the optional string.- Parameters:
option- the option- Returns:
- the object of type class
-
getOptionalString
public Optional<String> getOptionalString(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the optional string.- Parameters:
option- the optionbindings- the bindings- Returns:
- the object of type class
-
setStringIfPresent
Sets the optional string if present.- Parameters:
option- the optionaction- the action
-
getIntegerList
Gets the lif of integers.- Parameters:
option- the option- Returns:
- the list of integers
-
getInteger
Gets the integer.- Parameters:
option- the option- Returns:
- the object of type class
-
getInteger
Gets the integer.- Parameters:
option- the optionbindings- the bindings- Returns:
- the object of type class
-
getOptionalInteger
Gets the optional integer.- Parameters:
option- the option- Returns:
- the object of type class
-
setIntegerIfPresent
Sets the optional integer if present.- Parameters:
option- the optionaction- the action
-
getLongList
Gets the list of longs.- Parameters:
option- the option- Returns:
- the list of longs
-
getLong
Gets the long.- Parameters:
option- the option- Returns:
- the object of type class
-
getLong
Gets the long.- Parameters:
option- the optionbindings- the bindings- Returns:
- the object of type class
-
getOptionalLong
Gets the optional long.- Parameters:
option- the option- Returns:
- the object of type class
-
setLongIfPresent
Sets the optional long if present.- Parameters:
option- the optionaction- the action
-
getDoubleList
Gets the list of doubles.- Parameters:
option- the option- Returns:
- the list of doubles
-
getDouble
Gets the double.- Parameters:
option- the option- Returns:
- the object of type class
-
getDouble
Gets the double.- Parameters:
option- the optionbindings- the bindings- Returns:
- the object of type class
-
getOptionalDouble
Gets the optional double.- Parameters:
option- the option- Returns:
- the object of type class
-
setDoubleIfPresent
Sets the optional double if present.- Parameters:
option- the optionaction- the action
-
getByteSizeList
Gets the list of byte sizes.- Parameters:
option- the option- Returns:
- the list of byte sizes
-
getByteSize
Gets the byte size.- Parameters:
option- the option- Returns:
- the object of type class
-
getByteSize
Gets the byte size.- Parameters:
option- the optionbindings- the bindings- Returns:
- the object of type class
-
getOptionalByteSize
Gets the optional byte size.- Parameters:
option- the option- Returns:
- the object of type class
-
setByteSizeIfPresent
Sets the optional byte size if present.- Parameters:
option- the optionaction- the action
-
getOptionalDuration
Gets the optional duration.- Parameters:
option- the option- Returns:
- the object of type class
-
getOptionalDuration
public Optional<Duration> getOptionalDuration(ECtransOptionDefinition option, org.graalvm.polyglot.Value bindings) Gets the optional duration.- Parameters:
option- the option- Returns:
- the object of type class
-
setDurationIfPresent
Sets the optional duration if present.- Parameters:
option- the optionaction- the action
-
getOptionalPeriod
Gets the optional period.- Parameters:
option- the option- Returns:
- the object of type class
-
setPeriodIfPresent
Sets the optional period if present.- Parameters:
option- the optionaction- the action
-
getTimeRangeList
Gets the list of time ranges.- Parameters:
option- the option- Returns:
- the list of time ranges
-
getTimeRange
Gets the time range.- Parameters:
option- the option- Returns:
- the time range
-
getTimeRange
Gets the time range.- Parameters:
option- the optionbindings- the bindings- Returns:
- the time range
-
getOptionalTimeRange
Gets the optional time range.- Parameters:
option- the option- Returns:
- the object of type class
-
setTimeRangeIfPresent
public void setTimeRangeIfPresent(ECtransOptionDefinition option, Consumer<? super TimeRange> action) Sets the optional time range if present.- Parameters:
option- the optionaction- the action
-
getScriptLanguage
-
getScriptContent
Get the resolved underlying script content, or null if empty.- Returns:
- the script content
-
isOptionDefined
Basic check to see if the option is declared in the script content. This is less costly than creating the script manager directly, but does not guarantee it really exists. This will have to be checked at a later stage with the script manager.- Parameters:
option- the optioncontent- the content- Returns:
- true, if successful
-
get
Gets the.- Parameters:
option- the optiondefaultValue- the default value- Returns:
- the true, if successful
-
get
Gets the.- Parameters:
option- the optiondefaultValue- the default value- Returns:
- the result
-
get
Gets the.- Parameters:
option- the optiondefaultValue- the default value- Returns:
- the result
-
exists
Check if the parameter exists in the current module. If the parameter is related to a function then the function is not executed.- Parameters:
name- the name- Returns:
- true, if exists
-
set
Sets the.- Parameters:
option- the optionvalue- the value
-
set
Sets the.- Parameters:
option- the optionvalue- the value
-
set
Sets the.- Parameters:
option- the optionvalue- the value
-
set
Sets the.- Parameters:
option- the optionvalue- the value
-
set
Sets the.- Parameters:
option- the optionvalue- the value
-
set
Sets the.- Parameters:
option- the optionvalue- the value
-
set
-
set
-
set
Sets the double.- Parameters:
name- the namevalue- the value
-
standardize
Normalize the representation of the data and remove option with same value as default value if required.- Parameters:
option- the optionremoveIfSameAsDefault- remove if same as default value
-
getProperties
Gets the sorted properties.- Parameters:
secured- if true then the private fields are hidden- Returns:
- the script
-
getScript
-
getData
Gets the data (sorted properties and script if engine exists).- Returns:
- the data
-
get
Gets the.- Parameters:
name- the namedefaultValue- the default value- Returns:
- the int
-
getModuleName
-
remove
-
matches
-
matches
-
get
-
getDuration
-
get
-
getPeriod
-
get
-
get
-
getOptions
-
getOptions
-
getOptions
-
getBooleanList
-
getBoolean
-
getBoolean
-
getBooleanObject
-
getBooleanObject
-
getOptionalBoolean
-
setBooleanIfPresent
-
getStringList
-
getString
-
getChecksumExtension
-
getString
-
getOptionalString
-
getOptionalString
public Optional<String> getOptionalString(ECtransOptions option, org.graalvm.polyglot.Value bindings) -
setStringIfPresent
-
getIntegerList
-
getInteger
-
getInteger
-
getOptionalInteger
-
setIntegerIfPresent
-
getLongList
-
getLong
-
getLong
-
getOptionalLong
-
setLongIfPresent
-
getDoubleList
-
getDouble
-
getDouble
-
getOptionalDouble
-
setDoubleIfPresent
-
getByteSizeList
-
getByteSize
-
getByteSize
-
getOptionalByteSize
-
setByteSizeIfPresent
-
getOptionalDuration
-
getOptionalDuration
public Optional<Duration> getOptionalDuration(ECtransOptions option, org.graalvm.polyglot.Value bindings) -
setDurationIfPresent
-
getOptionalPeriod
-
setPeriodIfPresent
-
getTimeRangeList
-
getTimeRange
-
getTimeRange
-
getOptionalTimeRange
-
setTimeRangeIfPresent
-
isOptionDefined
-
get
-
get
-
get
-
set
-
set
-
set
-
set
-
set
-
set
-
standardize
-