Package org.n52.faroe
Interface SettingValueFactory
public interface SettingValueFactory
Factory to construct implementation specific
SettingValues.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.joda.time.DateTimedecodeDateTimeValue(String stringValue) static FiledecodeFileValue(String stringValue) static IntegerdecodeIntegerValue(String stringValue) static MultilingualStringdecodeMultiLingualStringValue(String stringValue) static DoubledecodeNumericValue(String stringValue) static URIdecodeUriValue(String stringValue) newBooleanSettingValue(String key, Boolean value) Constructs a newBooleansetting value from the supplied key and value.default SettingValue<Boolean> newBooleanSettingValue(String key, String stringValue) Constructs a newBooleansetting value from the supplied key and string value.default SettingValue<Boolean> newBooleanSettingValue(BooleanSettingDefinition setting, String stringValue) Constructs a newBooleansetting value from the supplied definition and string value.newChoiceSettingValue(String key, String stringValue) Constructs a newStringsetting value from the supplied definition and string value.default SettingValue<String> newChoiceSettingValue(ChoiceSettingDefinition setting, String stringValue) Constructs a newStringsetting value from the supplied definition and string value.default SettingValue<org.joda.time.DateTime> newDateTimeSettingValue(String key, String stringValue) Constructs a newTimeInstantsetting value from the supplied key and string value.SettingValue<org.joda.time.DateTime> newDateTimeSettingValue(String key, org.joda.time.DateTime value) Constructs a newTimeInstantsetting value from the supplied key and value.default SettingValue<org.joda.time.DateTime> newDateTimeSettingValue(DateTimeSettingDefinition setting, String stringValue) Constructs a newTimeInstantsetting value from the supplied definition and string value.newFileSettingValue(String key, File value) Constructs a newFilesetting value from the supplied key and value.default SettingValue<File> newFileSettingValue(String key, String stringValue) Constructs a newFilesetting value from the supplied key and string value.default SettingValue<File> newFileSettingValue(FileSettingDefinition setting, String stringValue) Constructs a newFilesetting value from the supplied definition and string value.newIntegerSettingValue(String key, Integer value) Constructs a newIntegersetting value from the supplied key and value.default SettingValue<Integer> newIntegerSettingValue(String key, String stringValue) Constructs a newIntegersetting value from the supplied key and string value.default SettingValue<Integer> newIntegerSettingValue(IntegerSettingDefinition setting, String stringValue) Constructs a newIntegersetting value from the supplied definition and string value.default SettingValue<MultilingualString> newMultiLingualStringSettingValue(String key, String stringValue) Constructs a newMultilingualStringsetting value from the supplied key and string value.Constructs a newMultilingualStringsetting value from the supplied key and value.default SettingValue<MultilingualString> newMultiLingualStringSettingValue(MultilingualStringSettingDefinition setting, String stringValue) Constructs a newMultilingualStringsetting value from the supplied definition and string value.newNumericSettingValue(String key, Double value) Constructs a newDoublesetting value from the supplied key and value.default SettingValue<Double> newNumericSettingValue(String key, String stringValue) Constructs a newDoublesetting value from the supplied key and string value.default SettingValue<Double> newNumericSettingValue(NumericSettingDefinition setting, String stringValue) Constructs a newDoublesetting value from the supplied definition and string value.default SettingValue<?> newSettingValue(SettingDefinition<?> setting, String value) Constructs a new generic setting value from the supplied definition and string value.newStringSettingValue(String key, String stringValue) Constructs a newStringsetting value from the supplied key and string value.default SettingValue<String> newStringSettingValue(StringSettingDefinition setting, String stringValue) Constructs a newStringsetting value from the supplied definition and string value.default SettingValue<URI> newUriSettingValue(String key, String stringValue) Constructs a newURIsetting value from the supplied key and string value.newUriSettingValue(String key, URI value) Constructs a newURIsetting value from the supplied key and value.default SettingValue<URI> newUriSettingValue(UriSettingDefinition setting, String stringValue) Constructs a newURIsetting value from the supplied definition and string value.static booleannullOrEmpty(String stringValue)
-
Method Details
-
newBooleanSettingValue
default SettingValue<Boolean> newBooleanSettingValue(BooleanSettingDefinition setting, String stringValue) Constructs a newBooleansetting value from the supplied definition and string value.- Parameters:
setting- the setting definitionstringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newBooleanSettingValue
Constructs a newBooleansetting value from the supplied key and string value.- Parameters:
key- the setting keystringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newBooleanSettingValue
Constructs a newBooleansetting value from the supplied key and value.- Parameters:
key- the setting keyvalue- the value- Returns:
- the implementation specific
SettingValue
-
newIntegerSettingValue
default SettingValue<Integer> newIntegerSettingValue(IntegerSettingDefinition setting, String stringValue) Constructs a newIntegersetting value from the supplied definition and string value.- Parameters:
setting- the setting definitionstringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newIntegerSettingValue
Constructs a newIntegersetting value from the supplied key and string value.- Parameters:
key- the setting keystringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newIntegerSettingValue
Constructs a newIntegersetting value from the supplied key and value.- Parameters:
key- the setting keyvalue- the value- Returns:
- the implementation specific
SettingValue
-
newStringSettingValue
default SettingValue<String> newStringSettingValue(StringSettingDefinition setting, String stringValue) Constructs a newStringsetting value from the supplied definition and string value.- Parameters:
setting- the setting definitionstringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newStringSettingValue
Constructs a newStringsetting value from the supplied key and string value.- Parameters:
key- the setting keystringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newFileSettingValue
Constructs a newFilesetting value from the supplied definition and string value.- Parameters:
setting- the setting definitionstringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newFileSettingValue
Constructs a newFilesetting value from the supplied key and string value.- Parameters:
key- the setting keystringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newFileSettingValue
Constructs a newFilesetting value from the supplied key and value.- Parameters:
key- the setting keyvalue- the value- Returns:
- the implementation specific
SettingValue
-
newUriSettingValue
Constructs a newURIsetting value from the supplied definition and string value.- Parameters:
setting- the setting definitionstringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newUriSettingValue
Constructs a newURIsetting value from the supplied key and string value.- Parameters:
key- the setting keystringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newUriSettingValue
Constructs a newURIsetting value from the supplied key and value.- Parameters:
key- the setting keyvalue- the value- Returns:
- the implementation specific
SettingValue
-
newNumericSettingValue
default SettingValue<Double> newNumericSettingValue(NumericSettingDefinition setting, String stringValue) Constructs a newDoublesetting value from the supplied definition and string value.- Parameters:
setting- the setting definitionstringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newNumericSettingValue
Constructs a newDoublesetting value from the supplied key and string value.- Parameters:
key- the setting keystringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newNumericSettingValue
Constructs a newDoublesetting value from the supplied key and value.- Parameters:
key- the setting keyvalue- the value- Returns:
- the implementation specific
SettingValue
-
newDateTimeSettingValue
default SettingValue<org.joda.time.DateTime> newDateTimeSettingValue(DateTimeSettingDefinition setting, String stringValue) Constructs a newTimeInstantsetting value from the supplied definition and string value.- Parameters:
setting- the setting definitionstringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newDateTimeSettingValue
default SettingValue<org.joda.time.DateTime> newDateTimeSettingValue(String key, String stringValue) Constructs a newTimeInstantsetting value from the supplied key and string value.- Parameters:
key- the setting keystringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newDateTimeSettingValue
SettingValue<org.joda.time.DateTime> newDateTimeSettingValue(String key, org.joda.time.DateTime value) Constructs a newTimeInstantsetting value from the supplied key and value.- Parameters:
key- the setting keyvalue- the value- Returns:
- the implementation specific
SettingValue
-
newMultiLingualStringSettingValue
default SettingValue<MultilingualString> newMultiLingualStringSettingValue(MultilingualStringSettingDefinition setting, String stringValue) Constructs a newMultilingualStringsetting value from the supplied definition and string value.- Parameters:
setting- the setting definitionstringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newMultiLingualStringSettingValue
default SettingValue<MultilingualString> newMultiLingualStringSettingValue(String key, String stringValue) Constructs a newMultilingualStringsetting value from the supplied key and string value.- Parameters:
key- the setting keystringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newMultiLingualStringSettingValue
SettingValue<MultilingualString> newMultiLingualStringSettingValue(String key, MultilingualString value) Constructs a newMultilingualStringsetting value from the supplied key and value.- Parameters:
key- the setting keyvalue- the value- Returns:
- the implementation specific
SettingValue
-
newChoiceSettingValue
default SettingValue<String> newChoiceSettingValue(ChoiceSettingDefinition setting, String stringValue) Constructs a newStringsetting value from the supplied definition and string value.- Parameters:
setting- the setting definitionstringValue- the value as string- Returns:
- the implementation specific
SettingValue
-
newChoiceSettingValue
Constructs a newStringsetting value from the supplied definition and string value.- Parameters:
key- the setting keystringValue- the value- Returns:
- the implementation specific
SettingValue
-
newSettingValue
Constructs a new generic setting value from the supplied definition and string value.- Parameters:
setting- the setting definitionvalue- the value as string- Returns:
- the implementation specific
SettingValue
-
decodeIntegerValue
- Throws:
NumberFormatException
-
decodeFileValue
-
decodeUriValue
- Throws:
ConfigurationError
-
decodeNumericValue
- Throws:
NumberFormatException
-
decodeDateTimeValue
-
decodeMultiLingualStringValue
-
nullOrEmpty
- Parameters:
stringValue-- Returns:
stringValue == null || stringValue.trim().isEmpty()
-