Package org.n52.faroe

Interface SettingValueFactory


public interface SettingValueFactory
Factory to construct implementation specific SettingValues.
Since:
1.0.0
  • Method Details

    • newBooleanSettingValue

      default SettingValue<Boolean> newBooleanSettingValue(BooleanSettingDefinition setting, String stringValue)
      Constructs a new Boolean setting value from the supplied definition and string value.
      Parameters:
      setting - the setting definition
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newBooleanSettingValue

      default SettingValue<Boolean> newBooleanSettingValue(String key, String stringValue)
      Constructs a new Boolean setting value from the supplied key and string value.
      Parameters:
      key - the setting key
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newBooleanSettingValue

      SettingValue<Boolean> newBooleanSettingValue(String key, Boolean value)
      Constructs a new Boolean setting value from the supplied key and value.
      Parameters:
      key - the setting key
      value - the value
      Returns:
      the implementation specific SettingValue
    • newIntegerSettingValue

      default SettingValue<Integer> newIntegerSettingValue(IntegerSettingDefinition setting, String stringValue)
      Constructs a new Integer setting value from the supplied definition and string value.
      Parameters:
      setting - the setting definition
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newIntegerSettingValue

      default SettingValue<Integer> newIntegerSettingValue(String key, String stringValue)
      Constructs a new Integer setting value from the supplied key and string value.
      Parameters:
      key - the setting key
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newIntegerSettingValue

      SettingValue<Integer> newIntegerSettingValue(String key, Integer value)
      Constructs a new Integer setting value from the supplied key and value.
      Parameters:
      key - the setting key
      value - the value
      Returns:
      the implementation specific SettingValue
    • newStringSettingValue

      default SettingValue<String> newStringSettingValue(StringSettingDefinition setting, String stringValue)
      Constructs a new String setting value from the supplied definition and string value.
      Parameters:
      setting - the setting definition
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newStringSettingValue

      SettingValue<String> newStringSettingValue(String key, String stringValue)
      Constructs a new String setting value from the supplied key and string value.
      Parameters:
      key - the setting key
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newFileSettingValue

      default SettingValue<File> newFileSettingValue(FileSettingDefinition setting, String stringValue)
      Constructs a new File setting value from the supplied definition and string value.
      Parameters:
      setting - the setting definition
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newFileSettingValue

      default SettingValue<File> newFileSettingValue(String key, String stringValue)
      Constructs a new File setting value from the supplied key and string value.
      Parameters:
      key - the setting key
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newFileSettingValue

      SettingValue<File> newFileSettingValue(String key, File value)
      Constructs a new File setting value from the supplied key and value.
      Parameters:
      key - the setting key
      value - the value
      Returns:
      the implementation specific SettingValue
    • newUriSettingValue

      default SettingValue<URI> newUriSettingValue(UriSettingDefinition setting, String stringValue)
      Constructs a new URI setting value from the supplied definition and string value.
      Parameters:
      setting - the setting definition
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newUriSettingValue

      default SettingValue<URI> newUriSettingValue(String key, String stringValue)
      Constructs a new URI setting value from the supplied key and string value.
      Parameters:
      key - the setting key
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newUriSettingValue

      SettingValue<URI> newUriSettingValue(String key, URI value)
      Constructs a new URI setting value from the supplied key and value.
      Parameters:
      key - the setting key
      value - the value
      Returns:
      the implementation specific SettingValue
    • newNumericSettingValue

      default SettingValue<Double> newNumericSettingValue(NumericSettingDefinition setting, String stringValue)
      Constructs a new Double setting value from the supplied definition and string value.
      Parameters:
      setting - the setting definition
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newNumericSettingValue

      default SettingValue<Double> newNumericSettingValue(String key, String stringValue)
      Constructs a new Double setting value from the supplied key and string value.
      Parameters:
      key - the setting key
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newNumericSettingValue

      SettingValue<Double> newNumericSettingValue(String key, Double value)
      Constructs a new Double setting value from the supplied key and value.
      Parameters:
      key - the setting key
      value - the value
      Returns:
      the implementation specific SettingValue
    • newDateTimeSettingValue

      default SettingValue<org.joda.time.DateTime> newDateTimeSettingValue(DateTimeSettingDefinition setting, String stringValue)
      Constructs a new TimeInstant setting value from the supplied definition and string value.
      Parameters:
      setting - the setting definition
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newDateTimeSettingValue

      default SettingValue<org.joda.time.DateTime> newDateTimeSettingValue(String key, String stringValue)
      Constructs a new TimeInstant setting value from the supplied key and string value.
      Parameters:
      key - the setting key
      stringValue - 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 new TimeInstant setting value from the supplied key and value.
      Parameters:
      key - the setting key
      value - the value
      Returns:
      the implementation specific SettingValue
    • newMultiLingualStringSettingValue

      default SettingValue<MultilingualString> newMultiLingualStringSettingValue(MultilingualStringSettingDefinition setting, String stringValue)
      Constructs a new MultilingualString setting value from the supplied definition and string value.
      Parameters:
      setting - the setting definition
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newMultiLingualStringSettingValue

      default SettingValue<MultilingualString> newMultiLingualStringSettingValue(String key, String stringValue)
      Constructs a new MultilingualString setting value from the supplied key and string value.
      Parameters:
      key - the setting key
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newMultiLingualStringSettingValue

      SettingValue<MultilingualString> newMultiLingualStringSettingValue(String key, MultilingualString value)
      Constructs a new MultilingualString setting value from the supplied key and value.
      Parameters:
      key - the setting key
      value - the value
      Returns:
      the implementation specific SettingValue
    • newChoiceSettingValue

      default SettingValue<String> newChoiceSettingValue(ChoiceSettingDefinition setting, String stringValue)
      Constructs a new String setting value from the supplied definition and string value.
      Parameters:
      setting - the setting definition
      stringValue - the value as string
      Returns:
      the implementation specific SettingValue
    • newChoiceSettingValue

      SettingValue<String> newChoiceSettingValue(String key, String stringValue)
      Constructs a new String setting value from the supplied definition and string value.
      Parameters:
      key - the setting key
      stringValue - 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 definition
      value - the value as string
      Returns:
      the implementation specific SettingValue
    • decodeIntegerValue

      static Integer decodeIntegerValue(String stringValue) throws NumberFormatException
      Throws:
      NumberFormatException
    • decodeFileValue

      static File decodeFileValue(String stringValue)
    • 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()