Class IconManagerImpl
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
- 
- com.inductiveautomation.perspective.gateway.assets.AbstractAssetManager<java.lang.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<java.lang.String,com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary> implements IconManager 
- 
- 
Field Summary- 
Fields inherited from class com.inductiveautomation.perspective.gateway.assets.AbstractAssetManagerassetPath, cacheLock, perspectiveContext
 
- 
 - 
Constructor SummaryConstructors Constructor Description IconManagerImpl(PerspectiveContext perspectiveContext)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonObject>digests()protected java.util.Optional<java.lang.String>generateKey(java.nio.file.Path path)Generate a cache key for the givenPathjava.util.Optional<java.lang.String>getLibDigest(java.lang.String libraryKey)java.util.Map<java.lang.String,java.util.List<java.lang.String>>getLibraries()Fetch a map of all icon library names and their respective icon namesjava.util.Optional<java.lang.String>getLibrary(java.lang.String libraryName)Fetch the raw icon library as an SVG Stringprotected java.util.Optional<com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary>parseValue(java.nio.file.Path path)Parse the cache value for the givenPath- 
Methods inherited from class com.inductiveautomation.perspective.gateway.assets.AbstractAssetManagercopyInputStreamToPath, copyInputStreamToPath, copyOptions, getCache, getCachedValue, getDigestCopy, getDigestFor, onCacheChanged, onShutdown, onStartup, setup
 - 
Methods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycleisRunning, shutdown, startup
 
- 
 
- 
- 
- 
Constructor Detail- 
IconManagerImplpublic IconManagerImpl(@Nonnull PerspectiveContext perspectiveContext)
 
- 
 - 
Method Detail- 
generateKey@Nonnull protected java.util.Optional<java.lang.String> generateKey(@Nonnull java.nio.file.Path path)Description copied from class:AbstractAssetManagerGenerate a cache key for the givenPath- Specified by:
- generateKeyin class- AbstractAssetManager<java.lang.String,com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary>
- Parameters:
- path- The- Pathfor 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 java.util.Optional<com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary> parseValue(@Nonnull java.nio.file.Path path)Description copied from class:AbstractAssetManagerParse the cache value for the givenPath- Specified by:
- parseValuein class- AbstractAssetManager<java.lang.String,com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary>
- Parameters:
- path- The- Pathfor 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@Nonnull public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getLibraries() Description copied from interface:IconManagerFetch a map of all icon library names and their respective icon names- Specified by:
- getLibrariesin interface- IconManager
- Returns:
- The map of all icon library names and their respective icon names
 
 - 
digestspublic java.util.Optional<com.inductiveautomation.ignition.common.gson.JsonObject> digests() 
 - 
getLibrary@Nonnull public java.util.Optional<java.lang.String> getLibrary(@Nullable java.lang.String libraryName)Description copied from interface:IconManagerFetch the raw icon library as an SVG String- Specified by:
- getLibraryin interface- IconManager
- 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
 
 - 
getLibDigestpublic java.util.Optional<java.lang.String> getLibDigest(java.lang.String libraryKey) 
 
- 
 
-