Class SecureConfigurationPropertiesProvider

java.lang.Object
org.mule.runtime.api.component.AbstractComponent
org.mule.runtime.config.api.dsl.model.properties.DefaultConfigurationPropertiesProvider
org.mule.test.crafted.config.properties.deprecated.extension.SecureConfigurationPropertiesProvider
All Implemented Interfaces:
org.mule.runtime.api.component.Component, org.mule.runtime.api.lifecycle.Disposable, org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProvider, org.mule.runtime.properties.api.ConfigurationPropertiesProvider

public class SecureConfigurationPropertiesProvider extends org.mule.runtime.config.api.dsl.model.properties.DefaultConfigurationPropertiesProvider implements org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.api.lifecycle.Disposable
Artifact attributes configuration. This class represents a single secure-configuration-properties element from the configuration.
Since:
4.1
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.mule.runtime.api.component.Component

    org.mule.runtime.api.component.Component.Annotations
  • Field Summary

    Fields inherited from class org.mule.runtime.config.api.dsl.model.properties.DefaultConfigurationPropertiesProvider

    configurationAttributes, encoding, fileLocation, PROPERTIES_EXTENSION, resourceProvider, UNKNOWN, YAML_EXTENSION

    Fields inherited from class org.mule.runtime.api.component.AbstractComponent

    ANNOTATION_NAME, LOCATION_KEY, ROOT_CONTAINER_NAME_KEY

    Fields inherited from interface org.mule.runtime.api.component.Component

    ANNOTATIONS_PROPERTY_NAME, NS_MULE_DOCUMENTATION, NS_MULE_PARSER_METADATA

    Fields inherited from interface org.mule.runtime.api.lifecycle.Disposable

    PHASE_NAME

    Fields inherited from interface org.mule.runtime.api.lifecycle.Initialisable

    PHASE_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    SecureConfigurationPropertiesProvider(org.mule.runtime.config.api.dsl.model.ResourceProvider resourceProvider, String file, String algorithm, String mode)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    createValue(String key, String value)
     
    void
     
    Optional<org.mule.runtime.config.api.dsl.model.properties.ConfigurationProperty>
    getConfigurationProperty(String configurationAttributeKey)
    Returns the configuration property loaded from the file with the given key.
     
    void
     

    Methods inherited from class org.mule.runtime.config.api.dsl.model.properties.DefaultConfigurationPropertiesProvider

    createAttributesFromYamlObject, createKey, getResourceInputStream, getResourceInputStreamReader, readAttributesFromFile

    Methods inherited from class org.mule.runtime.api.component.AbstractComponent

    getAnnotation, getAnnotations, getDslSource, getIdentifier, getLocation, getRepresentation, getRootContainerLocation, initRootContainerName, setAnnotations

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProvider

    provide
  • Constructor Details

    • SecureConfigurationPropertiesProvider

      public SecureConfigurationPropertiesProvider(org.mule.runtime.config.api.dsl.model.ResourceProvider resourceProvider, String file, String algorithm, String mode)
  • Method Details

    • initialise

      public void initialise() throws org.mule.runtime.api.lifecycle.InitialisationException
      Specified by:
      initialise in interface org.mule.runtime.api.lifecycle.Initialisable
      Overrides:
      initialise in class org.mule.runtime.config.api.dsl.model.properties.DefaultConfigurationPropertiesProvider
      Throws:
      org.mule.runtime.api.lifecycle.InitialisationException
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.mule.runtime.api.lifecycle.Disposable
    • getConfigurationProperty

      public Optional<org.mule.runtime.config.api.dsl.model.properties.ConfigurationProperty> getConfigurationProperty(String configurationAttributeKey)
      Returns the configuration property loaded from the file with the given key.

      MULE-15032: There are 2 special keys used for testing purposes: "lifecycle::initialize" and "lifecycle::dispose". If this custom configuration properties provider is loaded by SPI in any integration test, asking for a property with any of those keys will return the number of times this provider was initialized or disposed. This was added as a workaround for testing that those phases were actually being applied to the ConfigurationPropertiesProviders when creating or clearing an ApplicationModel. keep in mind that this extension is only intended for testing purposes and this behaviour will not be replicated for any productive code.

      Specified by:
      getConfigurationProperty in interface org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProvider
      Overrides:
      getConfigurationProperty in class org.mule.runtime.config.api.dsl.model.properties.DefaultConfigurationPropertiesProvider
      Parameters:
      configurationAttributeKey -
      Returns:
      an Optional with the value of the given key or Optional.empty() otherwise.
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProvider
      Specified by:
      getDescription in interface org.mule.runtime.properties.api.ConfigurationPropertiesProvider
      Overrides:
      getDescription in class org.mule.runtime.config.api.dsl.model.properties.DefaultConfigurationPropertiesProvider
    • createValue

      protected String createValue(String key, String value)
      Overrides:
      createValue in class org.mule.runtime.config.api.dsl.model.properties.DefaultConfigurationPropertiesProvider