Class ConfigurationService

java.lang.Object
org.openremote.manager.app.ConfigurationService
All Implemented Interfaces:
org.openremote.model.ContainerService

public class ConfigurationService extends Object implements org.openremote.model.ContainerService
  • Field Details

    • OR_MAP_SETTINGS_PATH

      public static final String OR_MAP_SETTINGS_PATH
      See Also:
    • OR_MAP_SETTINGS_PATH_DEFAULT

      public static final String OR_MAP_SETTINGS_PATH_DEFAULT
      See Also:
    • OR_MAP_TILES_PATH

      public static final String OR_MAP_TILES_PATH
      See Also:
    • OR_MAP_TILES_PATH_DEFAULT

      public static final String OR_MAP_TILES_PATH_DEFAULT
      See Also:
    • identityService

      protected ManagerIdentityService identityService
    • persistenceService

      protected org.openremote.container.persistence.PersistenceService persistenceService
    • pathPublicRoot

      protected Path pathPublicRoot
    • mapTilesPath

      protected Path mapTilesPath
    • mapSettingsPath

      protected Path mapSettingsPath
    • managerConfigPath

      protected Path managerConfigPath
    • managerAppConfig

      protected AtomicReference<org.openremote.model.manager.ManagerAppConfig> managerAppConfig
  • Constructor Details

    • ConfigurationService

      public ConfigurationService()
  • Method Details

    • init

      public void init(org.openremote.model.Container container) throws Exception
      Specified by:
      init in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • start

      public void start(org.openremote.model.Container container) throws Exception
      Specified by:
      start in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • stop

      public void stop(org.openremote.model.Container container) throws Exception
      Specified by:
      stop in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getMapConfig

      public com.fasterxml.jackson.databind.node.ObjectNode getMapConfig()
    • saveMapConfig

      public void saveMapConfig(com.fasterxml.jackson.databind.node.ObjectNode mapConfiguration) throws RuntimeException
      Throws:
      RuntimeException
    • getMapTilesPath

      public Path getMapTilesPath()
    • getCustomMapTilesPath

      public Path getCustomMapTilesPath(boolean findMBTilesFile) throws IOException
      Must be called after mapTilesPath is initialized.
      Returns:
      the parent directory path for custom mbtiles, or the custom mbtiles file if findMBTilesFile is true. If no custom mbtiles file is found or it is the same file as mapTilesPath then the parent directory path is returned (i.e. as if no custom mbtiles file can be found).
      Throws:
      IOException - if persistence directory cannot be created or read
    • getManagerConfig

      public org.openremote.model.manager.ManagerAppConfig getManagerConfig()
    • saveManagerConfig

      public void saveManagerConfig(org.openremote.model.manager.ManagerAppConfig managerAppConfig) throws Exception
      Throws:
      Exception
    • saveManagerConfigImage

      public void saveManagerConfigImage(String path, org.openremote.model.file.FileInfo fileInfo) throws Exception
      Throws:
      Exception
    • getManagerConfigImage

      public Optional<File> getManagerConfigImage(String filename)
    • getPersistedManagerConfigPath

      protected Path getPersistedManagerConfigPath()
    • getPersistedMapConfigPath

      protected Path getPersistedMapConfigPath()
    • getPersistedCustomTilesPath

      protected Path getPersistedCustomTilesPath()
    • getPersistedManagerConfigImagePath

      protected Path getPersistedManagerConfigImagePath()
    • checkAndFixImageReferences

      protected org.openremote.model.manager.ManagerAppConfig checkAndFixImageReferences(org.openremote.model.manager.ManagerAppConfig managerAppConfig)
    • fixImageRef

      protected String fixImageRef(String image)