Class ThemeManagerImpl
java.lang.Object
com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
com.inductiveautomation.ignition.gateway.config.NamedResourceHandler<ThemeConfig>
com.inductiveautomation.perspective.gateway.assets.themes.ThemeManagerImpl
- All Implemented Interfaces:
Lifecycle,ThemeManager
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.gateway.config.NamedResourceHandler
NamedResourceHandler.Builder<R> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResourceTypestatic final ResourceTypeMeta<ThemeConfig>Fields inherited from class com.inductiveautomation.ignition.gateway.config.NamedResourceHandler
configManager, logger, meta -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDelivers a processed theme file.Fetch a list of all of the available theme names.voidmigrate()protected voidonInitialResources(List<DecodedResource<ThemeConfig>> decodedResources) Called once at startup with the resource that are already present in the configuration collection.protected voidCalled once per each resource that is added.protected voidCalled for resources that are removed (or updated and then fail to parse).protected voidonResourcesUpdated(List<DecodedResource<ThemeConfig>> decodedResources) Called each time the overall set of resources changes in any way.protected voidCalled once per each resource that is updated.voidsetup()Methods inherited from class com.inductiveautomation.ignition.gateway.config.NamedResourceHandler
create, create, create, decode, delete, delete, filter, findResource, getResources, isCaseSensitive, isRenameAware, modify, modify, modify, newBuilder, newUuid, onShutdown, onStartup, renameAndModify, renameAndModify, renameAndModify, renameAndModifyMethods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
isRunning, shutdown, startup
-
Field Details
-
RESOURCE_TYPE
-
RESOURCE_TYPE_META
-
-
Constructor Details
-
ThemeManagerImpl
-
-
Method Details
-
migrate
- Throws:
MigrationException
-
setup
public void setup() -
copyReservedThemesToCore
- Throws:
PushException
-
onInitialResources
Description copied from class:NamedResourceHandlerCalled once at startup with the resource that are already present in the configuration collection.- Overrides:
onInitialResourcesin classNamedResourceHandler<ThemeConfig>
-
onResourceAdded
Description copied from class:NamedResourceHandlerCalled once per each resource that is added.- Overrides:
onResourceAddedin classNamedResourceHandler<ThemeConfig>
-
onResourceUpdated
Description copied from class:NamedResourceHandlerCalled once per each resource that is updated.Note that whether "rename" events are considered "updates" or "removes" and "adds" is determined by
NamedResourceHandler.isRenameAware().- Overrides:
onResourceUpdatedin classNamedResourceHandler<ThemeConfig>
-
onResourceRemoved
Description copied from class:NamedResourceHandlerCalled for resources that are removed (or updated and then fail to parse).- Overrides:
onResourceRemovedin classNamedResourceHandler<ThemeConfig>
-
onResourcesUpdated
Description copied from class:NamedResourceHandlerCalled each time the overall set of resources changes in any way. Called after added, updated, and removed are called.- Overrides:
onResourcesUpdatedin classNamedResourceHandler<ThemeConfig>
-
getTheme
Delivers a processed theme file. The CSS is computed and cached via the config system notifying changes to the resources and cached, the response from here is the cached computed theme.- Specified by:
getThemein interfaceThemeManager- Parameters:
themeName- - The base name, i.e., theme-dark, of the theme to fetch. Assumes that the theme does not contain the CSS file extension.- Returns:
- - Returns an optional string representing the requested theme as CSS.
-
getThemesList
Description copied from interface:ThemeManagerFetch a list of all of the available theme names.- Specified by:
getThemesListin interfaceThemeManager- Returns:
- A string list of available themes that may be fetched
using
ThemeManager.getTheme(String themeName).
-