Spring Hateoas

org.springframework.hateoas.core
Class ControllerEntityLinksFactoryBean

java.lang.Object
  extended by org.springframework.beans.factory.config.AbstractFactoryBean<ControllerEntityLinks>
      extended by org.springframework.hateoas.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
 
Constructor Summary
ControllerEntityLinksFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  ControllerEntityLinks createInstance()
           
 Class<?> getObjectType()
           
 void setAnnotation(Class<? extends Annotation> annotation)
          Configures the annotation type to inspect the ApplicationContext for beans that carry the given annotation.
 void setApplicationContext(ApplicationContext context)
           
 void setLinkBuilderFactory(LinkBuilderFactory<? extends LinkBuilder> linkBuilderFactory)
          Configures the LinkBuilderFactory to be used to create LinkBuilder instances.
 
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerEntityLinksFactoryBean

public ControllerEntityLinksFactoryBean()
Method Detail

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(ApplicationContext context)
Specified by:
setApplicationContext in interface ApplicationContextAware

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface FactoryBean<ControllerEntityLinks>
Specified by:
getObjectType in class AbstractFactoryBean<ControllerEntityLinks>

createInstance

protected ControllerEntityLinks createInstance()
                                        throws Exception
Specified by:
createInstance in class AbstractFactoryBean<ControllerEntityLinks>
Throws:
Exception

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Overrides:
afterPropertiesSet in class AbstractFactoryBean<ControllerEntityLinks>
Throws:
Exception

Spring Hateoas

Copyright © 2012-2014–2014 Pivotal, Inc.. All rights reserved.