Package org.openremote.manager.app
Class ConfigurationService
java.lang.Object
org.openremote.manager.app.ConfigurationService
- All Implemented Interfaces:
org.openremote.model.ContainerService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ManagerIdentityServiceprotected AtomicReference<org.openremote.model.manager.ManagerAppConfig> protected Pathprotected Pathprotected Pathstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Pathprotected org.openremote.container.persistence.PersistenceServiceFields inherited from interface org.openremote.model.ContainerService
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, MED_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.openremote.model.manager.ManagerAppConfigcheckAndFixImageReferences(org.openremote.model.manager.ManagerAppConfig managerAppConfig) protected StringfixImageRef(String image) getCustomMapTilesPath(boolean findMBTilesFile) Must be called aftermapTilesPathis initialized.org.openremote.model.manager.ManagerAppConfiggetManagerConfigImage(String filename) com.fasterxml.jackson.databind.node.ObjectNodeprotected Pathprotected Pathprotected Pathprotected Pathvoidinit(org.openremote.model.Container container) voidsaveManagerConfig(org.openremote.model.manager.ManagerAppConfig managerAppConfig) voidsaveManagerConfigImage(String path, org.openremote.model.file.FileInfo fileInfo) voidsaveMapConfig(com.fasterxml.jackson.databind.node.ObjectNode mapConfiguration) voidstart(org.openremote.model.Container container) voidstop(org.openremote.model.Container container) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openremote.model.ContainerService
getPriority
-
Field Details
-
OR_MAP_SETTINGS_PATH
- See Also:
-
OR_MAP_SETTINGS_PATH_DEFAULT
- See Also:
-
OR_MAP_TILES_PATH
- See Also:
-
OR_MAP_TILES_PATH_DEFAULT
- See Also:
-
identityService
-
persistenceService
protected org.openremote.container.persistence.PersistenceService persistenceService -
pathPublicRoot
-
mapTilesPath
-
mapSettingsPath
-
managerConfigPath
-
managerAppConfig
-
-
Constructor Details
-
ConfigurationService
public ConfigurationService()
-
-
Method Details
-
init
- Specified by:
initin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
start
- Specified by:
startin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
stop
- Specified by:
stopin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
toString
-
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
-
getCustomMapTilesPath
Must be called aftermapTilesPathis 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
mapTilesPaththen 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
-
getPersistedManagerConfigPath
-
getPersistedMapConfigPath
-
getPersistedCustomTilesPath
-
getPersistedManagerConfigImagePath
-
checkAndFixImageReferences
protected org.openremote.model.manager.ManagerAppConfig checkAndFixImageReferences(org.openremote.model.manager.ManagerAppConfig managerAppConfig) -
fixImageRef
-