Class TemplateManager
java.lang.Object
com.inductiveautomation.factorypmi.application.model.TemplateManager
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddTemplateListener(ResourcePath templateId, TemplateListener listener) voidapply(List<? extends ChangeOperation> changes) Modifies the stored instances of the templates based on a supplied change set.static StringconvertLegacyPath(String templatePath) Detects whether the given path starts with [shared] or not.com.google.common.collect.Multimap<DataTypeEx,String> Calculates a map of all templates that have a drop target property defined, organized by drop target typeReturns a ResourcePath using the given templatePath.getTemplateInfo(String path) getTemplateInstance(String templatePath) getTemplateThumbnail(String templatePath) static voidinitDeserializedTemplate(ResourcePath path, TemplateInfo info, VisionTemplate template) booleanisTemplateValid(VisionTemplate template) Whether or not this template's info is mapped, possibly removed due to an updatevoidpopCache()voidvoidremoveTemplateListener(ResourcePath templateId, TemplateListener listener) voidshutdown()Performs any necessary shutdown tasks for the TemplateManager.
- 
Field Details- 
RESOURCE_TYPE
- 
GLOBAL_TEMPLATE_PREFIX- See Also:
 
 
- 
- 
Constructor Details- 
TemplateManager
 
- 
- 
Method Details- 
pushCache
- 
popCachepublic void popCache()
- 
addTemplateListener
- 
removeTemplateListener
- 
convertLegacyPathDetects whether the given path starts with [shared] or not.- Returns:
- a modified path pointing to a parent "shared" folder
 
- 
initDeserializedTemplatepublic static void initDeserializedTemplate(ResourcePath path, TemplateInfo info, VisionTemplate template) 
- 
getIdReturns a ResourcePath using the given templatePath. Corrects for legacy [global] paths. Will return null if the path specified doesn't exist in the project.
- 
applyModifies the stored instances of the templates based on a supplied change set.
- 
getTemplateInstancepublic VisionTemplate getTemplateInstance(String templatePath) throws TemplateNotFoundException, SerializationException 
- 
isTemplateValidWhether or not this template's info is mapped, possibly removed due to an update
- 
getTemplateThumbnail
- 
getDropTargetTemplatesCalculates a map of all templates that have a drop target property defined, organized by drop target type
- 
shutdownpublic void shutdown()Performs any necessary shutdown tasks for the TemplateManager.
- 
getTemplateInfopublic TemplateInfo getTemplateInfo(String path) throws TemplateNotFoundException, SerializationException 
 
-