Class ControllerEntityLinksFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<ControllerEntityLinks>
org.springframework.hateoas.server.core.ControllerEntityLinksFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<ControllerEntityLinks>,InitializingBean,ApplicationContextAware
public class ControllerEntityLinksFactoryBean
extends AbstractFactoryBean<ControllerEntityLinks>
implements 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 ControllerEntityLinksClass<?>voidsetAnnotation(Class<? extends Annotation> annotation) Configures the annotation type to inspect theApplicationContextfor beans that carry the given annotation.voidsetApplicationContext(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
- Specified by:
setApplicationContextin interfaceApplicationContextAware
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<ControllerEntityLinks>- Specified by:
getObjectTypein classAbstractFactoryBean<ControllerEntityLinks>
-
createInstance
- Specified by:
createInstancein classAbstractFactoryBean<ControllerEntityLinks>
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceInitializingBean- Overrides:
afterPropertiesSetin classAbstractFactoryBean<ControllerEntityLinks>- Throws:
Exception
-