Class PdfferTemplateComponentScanner

java.lang.Object
org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider
org.springframework.context.annotation.ClassPathBeanDefinitionScanner
org.nekosoft.pdffer.registry.PdfferTemplateComponentScanner
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ResourceLoaderAware, org.springframework.core.env.EnvironmentCapable

public class PdfferTemplateComponentScanner extends org.springframework.context.annotation.ClassPathBeanDefinitionScanner

A custom scanner that looks for PDF templates for the PDFfer registry.

It scans the org.nekosoft.PDFferTemplates package for templates.

The scanner is configured with a custom filter, name generator and scope resolver, and does not use the default filters. In order to be picked up, classes need to implement the PdfTemplate interface and be annotated with PdfTemplateComponent.

Also see PdfferTemplateBeanNameGenerator, PdfferTemplateScopeMetadataResolver, PdfferTemplateExcludeFilter.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates the component scanner and a new application context for the registry.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    checkCandidate​(String beanName, org.springframework.beans.factory.config.BeanDefinition beanDefinition)
     
    protected void
    registerBeanDefinition​(org.springframework.beans.factory.config.BeanDefinitionHolder definitionHolder, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
     

    Methods inherited from class org.springframework.context.annotation.ClassPathBeanDefinitionScanner

    doScan, getBeanDefinitionDefaults, getRegistry, isCompatible, postProcessBeanDefinition, scan, setAutowireCandidatePatterns, setBeanDefinitionDefaults, setBeanNameGenerator, setIncludeAnnotationConfig, setScopedProxyMode, setScopeMetadataResolver

    Methods inherited from class org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider

    addExcludeFilter, addIncludeFilter, clearCache, findCandidateComponents, getEnvironment, getMetadataReaderFactory, getResourceLoader, isCandidateComponent, isCandidateComponent, registerDefaultFilters, resetFilters, resolveBasePackage, setEnvironment, setMetadataReaderFactory, setResourceLoader, setResourcePattern

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PdfferTemplateComponentScanner

      public PdfferTemplateComponentScanner()
      Instantiates the component scanner and a new application context for the registry.
  • Method Details

    • checkCandidate

      protected boolean checkCandidate(String beanName, org.springframework.beans.factory.config.BeanDefinition beanDefinition) throws IllegalStateException
      Overrides:
      checkCandidate in class org.springframework.context.annotation.ClassPathBeanDefinitionScanner
      Throws:
      IllegalStateException
    • registerBeanDefinition

      protected void registerBeanDefinition(org.springframework.beans.factory.config.BeanDefinitionHolder definitionHolder, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
      Overrides:
      registerBeanDefinition in class org.springframework.context.annotation.ClassPathBeanDefinitionScanner