Class FontManagerImpl
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
- 
- com.inductiveautomation.perspective.gateway.assets.AbstractAssetManager<PerspectiveFont,byte[]>
- 
- com.inductiveautomation.perspective.gateway.assets.fonts.FontManagerImpl
 
 
 
- 
- All Implemented Interfaces:
- FontManager
 
 public class FontManagerImpl extends AbstractAssetManager<PerspectiveFont,byte[]> implements FontManager 
- 
- 
Field Summary- 
Fields inherited from class com.inductiveautomation.perspective.gateway.assets.AbstractAssetManagerassetPath, cacheLock, perspectiveContext
 
- 
 - 
Constructor SummaryConstructors Constructor Description FontManagerImpl(PerspectiveContext perspectiveContext)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<PerspectiveFont>generateKey(java.nio.file.Path path)Generate a cache key for the givenPathjava.util.Optional<java.io.InputStream>getFont(java.lang.String fontName, java.lang.String fontStyle, PerspectiveFontType fontType)Returns a stream of the raw font's bytes identified by the given name, style, and typejava.util.List<PerspectiveFont>getFonts()Returns a copy of the list of all of the managed fontsprotected java.util.Optional<byte[]>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- 
FontManagerImplpublic FontManagerImpl(@Nonnull PerspectiveContext perspectiveContext)
 
- 
 - 
Method Detail- 
getFonts@Nonnull public java.util.List<PerspectiveFont> getFonts() Description copied from interface:FontManagerReturns a copy of the list of all of the managed fonts- Specified by:
- getFontsin interface- FontManager
- Returns:
- A Listof all managedfonts
 
 - 
getFont@Nonnull public java.util.Optional<java.io.InputStream> getFont(java.lang.String fontName, java.lang.String fontStyle, PerspectiveFontType fontType)Description copied from interface:FontManagerReturns a stream of the raw font's bytes identified by the given name, style, and type- Specified by:
- getFontin interface- FontManager
- Parameters:
- fontName- The name of the font to fetch
- fontStyle- The style of the font to fetch
- fontType- The- typeof the font to fetch
- Returns:
- An Optionalcontaining theInputStreamof raw bytes for the font with the given name, style, and type or an empty Optional of no such font is managed with the given name, style, and type
 
 - 
generateKey@Nonnull public java.util.Optional<PerspectiveFont> generateKey(@Nonnull java.nio.file.Path path) Description copied from class:AbstractAssetManagerGenerate a cache key for the givenPath- Specified by:
- generateKeyin class- AbstractAssetManager<PerspectiveFont,byte[]>
- 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<byte[]> parseValue(@Nonnull java.nio.file.Path path)Description copied from class:AbstractAssetManagerParse the cache value for the givenPath- Specified by:
- parseValuein class- AbstractAssetManager<PerspectiveFont,byte[]>
- 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
 
 
- 
 
-