Class IconManagerImpl
java.lang.Object
com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
com.inductiveautomation.ignition.gateway.config.NamedResourceHandler<IconLibraryConfig>
com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl
- All Implemented Interfaces:
Lifecycle
,IconManager
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.inductiveautomation.ignition.gateway.config.NamedResourceHandler
NamedResourceHandler.Builder<R>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResourceType
static final ResourceTypeMeta<IconLibraryConfig>
Fields inherited from class com.inductiveautomation.ignition.gateway.config.NamedResourceHandler
configManager, logger, meta
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.inductiveautomation.ignition.common.gson.JsonObject>
digests()
getLibDigest
(String libraryKey) Fetch a map of all icon library names and their respective icon namesgetLibrary
(String libraryName) Fetch the raw icon library as an SVG Stringvoid
migrate()
protected void
onInitialResources
(List<DecodedResource<IconLibraryConfig>> decodedResources) Called once at startup with the resource that are already present in the configuration collection.protected void
Called once per each resource that is added.protected void
onResourceRemoved
(DecodedResource<IconLibraryConfig> removedResource) Called for resources that are removed (or updated and then fail to parse).protected void
onResourcesUpdated
(List<DecodedResource<IconLibraryConfig>> decodedResources) Called each time the overall set of resources changes in any way.protected void
Called once per each resource that is updated.void
setup()
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, renameAndModify
Methods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
isRunning, shutdown, startup
-
Field Details
-
RESOURCE_TYPE
-
RESOURCE_TYPE_META
-
-
Constructor Details
-
IconManagerImpl
-
-
Method Details
-
migrate
- Throws:
MigrationException
-
setup
public void setup() -
onInitialResources
Description copied from class:NamedResourceHandler
Called once at startup with the resource that are already present in the configuration collection.- Overrides:
onInitialResources
in classNamedResourceHandler<IconLibraryConfig>
-
onResourceAdded
Description copied from class:NamedResourceHandler
Called once per each resource that is added.- Overrides:
onResourceAdded
in classNamedResourceHandler<IconLibraryConfig>
-
onResourceUpdated
Description copied from class:NamedResourceHandler
Called 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:
onResourceUpdated
in classNamedResourceHandler<IconLibraryConfig>
-
onResourceRemoved
Description copied from class:NamedResourceHandler
Called for resources that are removed (or updated and then fail to parse).- Overrides:
onResourceRemoved
in classNamedResourceHandler<IconLibraryConfig>
-
onResourcesUpdated
Description copied from class:NamedResourceHandler
Called each time the overall set of resources changes in any way. Called after added, updated, and removed are called.- Overrides:
onResourcesUpdated
in classNamedResourceHandler<IconLibraryConfig>
-
getLibraries
Description copied from interface:IconManager
Fetch a map of all icon library names and their respective icon names- Specified by:
getLibraries
in interfaceIconManager
- Returns:
- The map of all icon library names and their respective icon names
-
digests
-
getLibrary
Description copied from interface:IconManager
Fetch the raw icon library as an SVG String- Specified by:
getLibrary
in interfaceIconManager
- Parameters:
libraryName
- The name of the icon library to fetch- Returns:
- An optional String whose contents are an SVG containing the library's icons, or an empty Optional if an icon library with the given name does not exist
-
getLibDigest
-