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
  • Constructor Details

    • IconManagerImpl

      public IconManagerImpl(@Nonnull PerspectiveContext perspectiveContext)
  • Method Details

    • generateKey

      @Nonnull protected Optional<String> generateKey(@Nonnull Path path)
      Description copied from class: AbstractAssetManager
      Generate a cache key for the given Path
      Specified by:
      generateKey in class AbstractAssetManager<String,com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary>
      Parameters:
      path - The Path for which we want to generate a cache key
      Returns:
      An Optional containing 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: AbstractAssetManager
      Parse the cache value for the given Path
      Specified by:
      parseValue in class AbstractAssetManager<String,com.inductiveautomation.perspective.gateway.assets.icons.IconManagerImpl.IconLibrary>
      Parameters:
      path - The Path for which we want to generate a cache value
      Returns:
      An Optional containing the cache value or an empty Optional if the cache value could not be generated
    • getLibraries

      @Nonnull public Map<String,List<String>> getLibraries()
      Description copied from interface: IconManager
      Fetch a map of all icon library names and their respective icon names
      Specified by:
      getLibraries in interface IconManager
      Returns:
      The map of all icon library names and their respective icon names
    • digests

      public Optional<com.inductiveautomation.ignition.common.gson.JsonObject> digests()
    • getLibrary

      @Nonnull public Optional<String> getLibrary(@Nullable String libraryName)
      Description copied from interface: IconManager
      Fetch the raw icon library as an SVG String
      Specified by:
      getLibrary in 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
    • getLibDigest

      public Optional<String> getLibDigest(String libraryKey)