Interface IConfigurationPropertyStore


public interface IConfigurationPropertyStore
Used by the Galasa Framework to initialise the various Configuration Property Stores that may exist within the OSGi instance. Only 1 CPS maybe enabled during the lifetime of a Galasa test run or server instance. The CPS should request from the framework the URI that is defined in the bootstrap. It should examine the returned URI to determine if it is this CPS that is required to be initialised. If the CPS should be initialised, the CPS should do so and then register itself in the Framework.
  • Method Details

    • getProperty

      @Null @Null String getProperty(@NotNull @NotNull String key) throws ConfigurationPropertyStoreException
      Retrieve the property from the underlying configuration property store. The framework will prefix with the appropriate namespace and apply the infixes before calling this method
      Parameters:
      key - - The key of the property to retrieve
      Returns:
      - The value of the property, or null if it does not exist
      Throws:
      ConfigurationPropertyStoreException - - If there is a problem accessing the underlying store
    • getPrefixedProperties

      @NotNull @NotNull Map<String,String> getPrefixedProperties(@NotNull @NotNull String prefix) throws ConfigurationPropertyStoreException
      Retrieve prefixed properties from the underlying configuration property store. The framework will prefix with the appropriate namespace before calling this method
      Parameters:
      prefix - - The prefix to use
      Returns:
      A map of found properties with includes the namesapce
      Throws:
      ConfigurationPropertyStoreException - - if there is a error in the underlying cps
    • setProperty

      @Null void setProperty(@NotNull @NotNull String key, @NotNull @NotNull String value) throws ConfigurationPropertyStoreException
      Set the property from the underlying configuration property store. The framework will prefix with the appropriate namespace and apply the infixes before calling this method
      Parameters:
      key - - The key of the property to retrieve
      value - - The value of the property to retrieve
      Throws:
      ConfigurationPropertyStoreException - - If there is a problem accessing the underlying store
    • deleteProperty

      void deleteProperty(@NotNull @NotNull String key) throws ConfigurationPropertyStoreException
      Delete the property from the underlying configuration property store. The framework will prefix with the appropriate namespace and apply the infixes before calling this method
      Parameters:
      key - The key of the property being deleted.
      Throws:
      ConfigurationPropertyStoreException - - An error occurred.
    • getPropertiesFromNamespace

      Map<String,String> getPropertiesFromNamespace(String namespace) throws ConfigurationPropertyStoreException
      Retrieves all possible different properties set from a given namespace
      Parameters:
      namespace - The namespace for which properties will be gathered.
      Returns:
      Map of names and values of all properties
      Throws:
      ConfigurationPropertyStoreException - - An error occurred.
    • getNamespaces

      Return all namespaces which have properties set
      Returns:
      List all namespaces with properties set
      Throws:
      ConfigurationPropertyStoreException - - An error occurred.
    • shutdown

      void shutdown() throws ConfigurationPropertyStoreException
      Called by the framework when shutting down. It gives this extension a chance to shut down, cleanly and free any held resources.
      Throws:
      ConfigurationPropertyStoreException - - An error occurred during shutdown.