Class ControllerEntityLinksFactoryBean

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<ControllerEntityLinks>
org.springframework.hateoas.server.core.ControllerEntityLinksFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<ControllerEntityLinks>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class ControllerEntityLinksFactoryBean extends org.springframework.beans.factory.config.AbstractFactoryBean<ControllerEntityLinks> implements org.springframework.context.ApplicationContextAware
FactoryBean implementation to create ControllerEntityLinks instances looking up controller classes from an ApplicationContext. The controller types are identified by the annotation type configured.
Author:
Oliver Gierke
  • Constructor Details

    • ControllerEntityLinksFactoryBean

      public ControllerEntityLinksFactoryBean()
  • Method Details

    • setAnnotation

      public void setAnnotation(Class<? extends Annotation> annotation)
      Configures the annotation type to inspect the ApplicationContext for beans that carry the given annotation.
      Parameters:
      annotation - must not be null.
    • setLinkBuilderFactory

      public void setLinkBuilderFactory(LinkBuilderFactory<? extends LinkBuilder> linkBuilderFactory)
      Configures the LinkBuilderFactory to be used to create LinkBuilder instances.
      Parameters:
      linkBuilderFactory - the linkBuilderFactory to set
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext context)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
    • getObjectType

      public @NonNull Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<ControllerEntityLinks>
      Specified by:
      getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<ControllerEntityLinks>
    • createInstance

      protected ControllerEntityLinks createInstance()
      Specified by:
      createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<ControllerEntityLinks>
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Overrides:
      afterPropertiesSet in class org.springframework.beans.factory.config.AbstractFactoryBean<ControllerEntityLinks>
      Throws:
      Exception