Class SimpleAppConfiguration

java.lang.Object
net.solarnetwork.central.support.SimpleAppConfiguration
All Implemented Interfaces:
AppConfiguration

public class SimpleAppConfiguration extends Object implements AppConfiguration
Basic immutable implementation of AppConfiguration.
  • Constructor Details

    • SimpleAppConfiguration

      public SimpleAppConfiguration()
      Default constructor.
    • SimpleAppConfiguration

      public SimpleAppConfiguration(Map<String,String> serviceUrls)
      Constructor.
      Parameters:
      serviceUrls - the service URLs to expose
  • Method Details

    • getServiceUrls

      public Map<String,String> getServiceUrls()
      Description copied from interface: AppConfiguration
      Get a mapping of named service URLs.

      The keys of the returned maps represent logical names for the associated URL values. The keys will be application-dependent, and should include values for well-defined application services. For example a URL to the application terms of service might be included under a key tos.

      URL values are permitted to contain variables in the form {var} that consumers of the URLs can replace with appropriate values. The variable names must be named so their intended use is obvious, for example nodeId for a SolarNode ID.

      Some common service URL names are defined as constants on this interface. Implementations are recommended to use these keys when it makes sense, and to add any other values needed by the application.

      Specified by:
      getServiceUrls in interface AppConfiguration
      Returns:
      named service URLs, never null