Package org.n52.faroe
Interface SettingValueFactory
-
public interface SettingValueFactoryFactory to construct implementation specificSettingValues.- Since:
- 1.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static 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)SettingValue<Boolean>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.SettingValue<String>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.SettingValue<File>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.SettingValue<Integer>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.SettingValue<MultilingualString>newMultiLingualStringSettingValue(String key, MultilingualString 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.SettingValue<Double>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.SettingValue<String>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.SettingValue<URI>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 Detail
-
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
default SettingValue<Boolean> newBooleanSettingValue(String key, String stringValue)
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
SettingValue<Boolean> newBooleanSettingValue(String key, Boolean value)
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
default SettingValue<Integer> newIntegerSettingValue(String key, String stringValue)
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
SettingValue<Integer> newIntegerSettingValue(String key, Integer value)
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
SettingValue<String> newStringSettingValue(String key, String stringValue)
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
default SettingValue<File> newFileSettingValue(FileSettingDefinition setting, String stringValue)
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
default SettingValue<File> newFileSettingValue(String key, String stringValue)
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
SettingValue<File> newFileSettingValue(String key, File value)
Constructs a newFilesetting value from the supplied key and value.- Parameters:
key- the setting keyvalue- the value- Returns:
- the implementation specific
SettingValue
-
newUriSettingValue
default SettingValue<URI> newUriSettingValue(UriSettingDefinition setting, String stringValue)
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
default SettingValue<URI> newUriSettingValue(String key, String stringValue)
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
SettingValue<URI> newUriSettingValue(String key, URI value)
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
default SettingValue<Double> newNumericSettingValue(String key, String stringValue)
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
SettingValue<Double> newNumericSettingValue(String key, Double value)
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
SettingValue<String> newChoiceSettingValue(String key, String stringValue)
Constructs a newStringsetting value from the supplied definition and string value.- Parameters:
key- the setting keystringValue- the value- Returns:
- the implementation specific
SettingValue
-
newSettingValue
default SettingValue<?> newSettingValue(SettingDefinition<?> setting, String value)
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
static Integer decodeIntegerValue(String stringValue) throws NumberFormatException
- Throws:
NumberFormatException
-
decodeUriValue
static URI decodeUriValue(String stringValue) throws ConfigurationError
- Throws:
ConfigurationError
-
decodeNumericValue
static Double decodeNumericValue(String stringValue) throws NumberFormatException
- Throws:
NumberFormatException
-
decodeDateTimeValue
static org.joda.time.DateTime decodeDateTimeValue(String stringValue)
-
decodeMultiLingualStringValue
static MultilingualString decodeMultiLingualStringValue(String stringValue)
-
nullOrEmpty
static boolean nullOrEmpty(String stringValue)
- Parameters:
stringValue-- Returns:
stringValue == null || stringValue.trim().isEmpty()
-
-