Interface PropertyPlaceholderResolver

    • Method Detail

      • resolvePlaceholders

        java.util.Optional<java.lang.String> resolvePlaceholders​(java.lang.String str)
        Resolve the placeholders and return an Optional String if it was possible to resolve them.
        Parameters:
        str - The placeholder to resolve
        Returns:
        The optional string or Optional.empty() if resolution was not possible
      • getPrefix

        @NonNull
        default java.lang.String getPrefix()
        Returns:
        The prefix used
      • resolveRequiredPlaceholders

        @NonNull
        default java.lang.String resolveRequiredPlaceholders​(java.lang.String str)
                                                      throws ConfigurationException
        Resolve the placeholders and return an Optional String if it was possible to resolve them.
        Parameters:
        str - The placeholder to resolve
        Returns:
        The optional string or Optional.empty() if resolution was not possible
        Throws:
        ConfigurationException - If the placeholders could not be resolved
      • resolveRequiredPlaceholder

        @NonNull
        default <T> T resolveRequiredPlaceholder​(java.lang.String str,
                                                 java.lang.Class<T> type)
                                          throws ConfigurationException
        Resolves the value of a single placeholder.
        Type Parameters:
        T - The type the value should be converted to
        Parameters:
        str - The string containing the placeholder
        type - The class of the type
        Returns:
        The resolved value
        Throws:
        ConfigurationException - If multiple placeholders are found or if the placeholder could not be converted to the requested type