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
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected ControllerEntityLinks
Class<?>
void
setAnnotation
(Class<? extends Annotation> annotation) Configures the annotation type to inspect theApplicationContext
for beans that carry the given annotation.void
setApplicationContext
(ApplicationContext context) void
setLinkBuilderFactory
(LinkBuilderFactory<? extends LinkBuilder> linkBuilderFactory) Configures theLinkBuilderFactory
to be used to createLinkBuilder
instances.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 theApplicationContext
for beans that carry the given annotation.- Parameters:
annotation
- must not be null.
-
setLinkBuilderFactory
Configures theLinkBuilderFactory
to be used to createLinkBuilder
instances.- Parameters:
linkBuilderFactory
- the linkBuilderFactory to set
-
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<ControllerEntityLinks>
- Specified by:
getObjectType
in classAbstractFactoryBean<ControllerEntityLinks>
-
createInstance
- Specified by:
createInstance
in classAbstractFactoryBean<ControllerEntityLinks>
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceInitializingBean
- Overrides:
afterPropertiesSet
in classAbstractFactoryBean<ControllerEntityLinks>
- Throws:
Exception
-