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 SummaryFields inherited from class com.inductiveautomation.perspective.gateway.assets.AbstractAssetManagerassetPath, cacheLock, perspectiveContext
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongenerateKey(Path path) Generate a cache key for the givenPathgetFont(String fontName, String fontStyle, PerspectiveFontType fontType) Returns a stream of the raw font's bytes identified by the given name, style, and typegetFonts()Returns a copy of the list of all of the managed fontsprotected Optional<byte[]>parseValue(Path path) Parse the cache value for the givenPathMethods inherited from class com.inductiveautomation.perspective.gateway.assets.AbstractAssetManagercopyInputStreamToPath, copyInputStreamToPath, copyOptions, getCache, getCachedValue, getDigestCopy, getDigestFor, onCacheChanged, onShutdown, onStartup, setupMethods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycleisRunning, shutdown, startup
- 
Constructor Details- 
FontManagerImpl
 
- 
- 
Method Details- 
getFontsDescription 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 Optional<InputStream> getFont(String fontName, 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
 
- 
generateKeyDescription 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
 
- 
parseValueDescription 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
 
 
-