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 ResourceTypestatic 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 Stringvoidmigrate()protected voidonInitialResources(List<DecodedResource<IconLibraryConfig>> 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 voidonResourceRemoved(DecodedResource<IconLibraryConfig> removedResource) Called for resources that are removed (or updated and then fail to parse).protected voidonResourcesUpdated(List<DecodedResource<IconLibraryConfig>> 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
-
IconManagerImpl
-
-
Method Details
-
migrate
- Throws:
MigrationException
-
setup
public void setup() -
onInitialResources
Description copied from class:NamedResourceHandlerCalled once at startup with the resource that are already present in the configuration collection.- Overrides:
onInitialResourcesin classNamedResourceHandler<IconLibraryConfig>
-
onResourceAdded
Description copied from class:NamedResourceHandlerCalled once per each resource that is added.- Overrides:
onResourceAddedin classNamedResourceHandler<IconLibraryConfig>
-
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<IconLibraryConfig>
-
onResourceRemoved
Description copied from class:NamedResourceHandlerCalled for resources that are removed (or updated and then fail to parse).- Overrides:
onResourceRemovedin classNamedResourceHandler<IconLibraryConfig>
-
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<IconLibraryConfig>
-
getLibraries
Description copied from interface:IconManagerFetch a map of all icon library names and their respective icon names- Specified by:
getLibrariesin interfaceIconManager- Returns:
- The map of all icon library names and their respective icon names
-
digests
-
getLibrary
Description copied from interface:IconManagerFetch the raw icon library as an SVG String- Specified by:
getLibraryin 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
-