Class IconManagerImpl
java.lang.Object
com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
com.inductiveautomation.perspective.gateway.assets.AbstractAssetManager<String,com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary>
com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl
- All Implemented Interfaces:
IconManager
public class IconManagerImpl
extends AbstractAssetManager<String,com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary>
implements IconManager
-
Field Summary
Fields inherited from class com.inductiveautomation.perspective.gateway.assets.AbstractAssetManager
assetPath, cacheLock, perspectiveContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.inductiveautomation.ignition.common.gson.JsonObject>digests()generateKey(Path path) Generate a cache key for the givenPathgetLibDigest(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 Stringprotected Optional<com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary>parseValue(Path path) Parse the cache value for the givenPathMethods inherited from class com.inductiveautomation.perspective.gateway.assets.AbstractAssetManager
copyInputStreamToPath, copyInputStreamToPath, copyOptions, getCache, getCachedValue, getDigestCopy, getDigestFor, onCacheChanged, onShutdown, onStartup, setupMethods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
isRunning, shutdown, startup
-
Constructor Details
-
IconManagerImpl
-
-
Method Details
-
generateKey
Description copied from class:AbstractAssetManagerGenerate a cache key for the givenPath- Specified by:
generateKeyin classAbstractAssetManager<String,com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary> - Parameters:
path- ThePathfor which we want to generate a cache key- Returns:
- An
Optionalcontaining the cache key or an empty Optional if the cache key could not be generated
-
parseValue
@Nonnull protected Optional<com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary> parseValue(@Nonnull Path path) Description copied from class:AbstractAssetManagerParse the cache value for the givenPath- Specified by:
parseValuein classAbstractAssetManager<String,com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary> - Parameters:
path- ThePathfor which we want to generate a cache value- Returns:
- An
Optionalcontaining the cache value or an empty Optional if the cache value could not be generated
-
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
-