Class FontManagerImpl
java.lang.Object
com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
com.inductiveautomation.ignition.gateway.config.NamedResourceHandler<FontConfig>
com.inductiveautomation.perspective.gateway.assets.fonts.FontManagerImpl
- All Implemented Interfaces:
Lifecycle,FontManager
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.gateway.config.NamedResourceHandler
NamedResourceHandler.Builder<R> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResourceTypestatic final ResourceTypeMeta<FontConfig>Fields inherited from class com.inductiveautomation.ignition.gateway.config.NamedResourceHandler
configManager, logger, meta -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFont(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 fontsvoidmigrate()protected voidonInitialResources(List<DecodedResource<FontConfig>> decodedResources) Called once at startup with the resource that are already present in the configuration collection.protected voidCalled once per each resource that is added.protected voidonResourceRemoved(DecodedResource<FontConfig> removedResource) Called for resources that are removed (or updated and then fail to parse).protected voidonResourcesUpdated(List<DecodedResource<FontConfig>> decodedResources) Called each time the overall set of resources changes in any way.protected voidCalled once per each resource that is updated.voidsetup()Methods inherited from class com.inductiveautomation.ignition.gateway.config.NamedResourceHandler
create, create, create, decode, delete, delete, filter, findResource, getResources, isCaseSensitive, isRenameAware, modify, modify, modify, newBuilder, newUuid, onShutdown, onStartup, renameAndModify, renameAndModify, renameAndModify, renameAndModifyMethods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
isRunning, shutdown, startup
-
Field Details
-
RESOURCE_TYPE
-
RESOURCE_TYPE_META
-
-
Constructor Details
-
FontManagerImpl
-
-
Method Details
-
migrate
- Throws:
MigrationException
-
setup
public void setup() -
getFonts
Description copied from interface:FontManagerReturns a copy of the list of all of the managed fonts- Specified by:
getFontsin interfaceFontManager- 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 interfaceFontManager- Parameters:
fontName- The name of the font to fetchfontStyle- The style of the font to fetchfontType- Thetypeof 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
-
onInitialResources
Description copied from class:NamedResourceHandlerCalled once at startup with the resource that are already present in the configuration collection.- Overrides:
onInitialResourcesin classNamedResourceHandler<FontConfig>
-
onResourceAdded
Description copied from class:NamedResourceHandlerCalled once per each resource that is added.- Overrides:
onResourceAddedin classNamedResourceHandler<FontConfig>
-
onResourceUpdated
Description copied from class:NamedResourceHandlerCalled once per each resource that is updated.Note that whether "rename" events are considered "updates" or "removes" and "adds" is determined by
NamedResourceHandler.isRenameAware().- Overrides:
onResourceUpdatedin classNamedResourceHandler<FontConfig>
-
onResourceRemoved
Description copied from class:NamedResourceHandlerCalled for resources that are removed (or updated and then fail to parse).- Overrides:
onResourceRemovedin classNamedResourceHandler<FontConfig>
-
onResourcesUpdated
Description copied from class:NamedResourceHandlerCalled each time the overall set of resources changes in any way. Called after added, updated, and removed are called.- Overrides:
onResourcesUpdatedin classNamedResourceHandler<FontConfig>
-