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
-
Field Summary
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected ControllerEntityLinks@NonNull Class<?>voidsetAnnotation(Class<? extends Annotation> annotation) Configures the annotation type to inspect theApplicationContextfor beans that carry the given annotation.voidsetApplicationContext(org.springframework.context.ApplicationContext context) voidsetLinkBuilderFactory(LinkBuilderFactory<? extends LinkBuilder> linkBuilderFactory) Configures theLinkBuilderFactoryto be used to createLinkBuilderinstances.Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
ControllerEntityLinksFactoryBean
public ControllerEntityLinksFactoryBean()
-
-
Method Details
-
setAnnotation
Configures the annotation type to inspect theApplicationContextfor beans that carry the given annotation.- Parameters:
annotation- must not be null.
-
setLinkBuilderFactory
Configures theLinkBuilderFactoryto be used to createLinkBuilderinstances.- Parameters:
linkBuilderFactory- the linkBuilderFactory to set
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<ControllerEntityLinks>- Specified by:
getObjectTypein classorg.springframework.beans.factory.config.AbstractFactoryBean<ControllerEntityLinks>
-
createInstance
- Specified by:
createInstancein classorg.springframework.beans.factory.config.AbstractFactoryBean<ControllerEntityLinks>
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classorg.springframework.beans.factory.config.AbstractFactoryBean<ControllerEntityLinks>- Throws:
Exception
-