Class TemplateManager


  • public class TemplateManager
    extends java.lang.Object
    • Field Detail

      • RESOURCE_TYPE

        public static final ResourceType RESOURCE_TYPE
      • GLOBAL_TEMPLATE_PREFIX

        public static final java.lang.String GLOBAL_TEMPLATE_PREFIX
        See Also:
        Constant Field Values
    • Constructor Detail

      • TemplateManager

        public TemplateManager​(ClientContext context)
    • Method Detail

      • popCache

        public void popCache()
      • convertLegacyPath

        public static java.lang.String convertLegacyPath​(java.lang.String templatePath)
        Detects whether the given path starts with [shared] or not.
        Returns:
        a modified path pointing to a parent "shared" folder
      • getId

        public ResourcePath getId​(java.lang.String templatePath)
        Returns a ResourcePath using the given templatePath. Corrects for legacy [global] paths. Will return null if the path specified doesn't exist in the project.
      • apply

        public void apply​(java.util.List<? extends ChangeOperation> changes)
        Modifies the stored instances of the templates based on a supplied change set.
      • isTemplateValid

        public boolean isTemplateValid​(VisionTemplate template)
        Whether or not this template's info is mapped, possibly removed due to an update
      • getTemplateThumbnail

        public java.awt.image.BufferedImage getTemplateThumbnail​(java.lang.String templatePath)
      • getDropTargetTemplates

        public com.google.common.collect.Multimap<DataTypeEx,​java.lang.String> getDropTargetTemplates()
        Calculates a map of all templates that have a drop target property defined, organized by drop target type