info.magnolia.module.blossom.content2bean
Class SpringContent2BeanTransformer
java.lang.Object
info.magnolia.content2bean.impl.Content2BeanTransformerImpl
info.magnolia.module.blossom.content2bean.ProxyCapableContent2BeanTransformer
info.magnolia.module.blossom.content2bean.SpringContent2BeanTransformer
- All Implemented Interfaces:
- info.magnolia.cms.core.Content.ContentFilter, info.magnolia.content2bean.Content2BeanTransformer
public class SpringContent2BeanTransformer
- extends ProxyCapableContent2BeanTransformer
Content2BeanTransformer that provides support for autowiring of properties, initialization callbacks and gives any
configured BeanPostProcessors a chance to modify or proxy the bean.
You can get access to the content node by implementing a method with the signature void setContent(Content). It will
be called before bean post processors are called and initialization callbacks. More specifically before
@PostConstruct and afterPropertiesSet().
Contrary to the normal Content2Bean mechanism it will NOT invoke a method with the signature void init(). Instead
use @PostConstruct or implement InitializingBean.
- Since:
- 1.2
Nested classes/interfaces inherited from interface info.magnolia.content2bean.Content2BeanTransformer |
info.magnolia.content2bean.Content2BeanTransformer.Factory |
Constructor Summary |
SpringContent2BeanTransformer(org.springframework.beans.factory.config.AutowireCapableBeanFactory autowireCapableBeanFactory)
|
Methods inherited from class info.magnolia.content2bean.impl.Content2BeanTransformerImpl |
accept, convertPropertyValue, getChildren, getTypeMapping, resolveType, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringContent2BeanTransformer
public SpringContent2BeanTransformer(org.springframework.beans.factory.config.AutowireCapableBeanFactory autowireCapableBeanFactory)
setDefaultClass
public void setDefaultClass(Class<?> defaultClass)
setTopLevelBeanName
public void setTopLevelBeanName(String topLevelBeanName)
onResolveType
protected info.magnolia.content2bean.TypeDescriptor onResolveType(info.magnolia.content2bean.TransformationState state,
info.magnolia.content2bean.TypeDescriptor resolvedType)
- Overrides:
onResolveType
in class info.magnolia.content2bean.impl.Content2BeanTransformerImpl
newBeanInstance
public Object newBeanInstance(info.magnolia.content2bean.TransformationState state,
Map properties)
throws info.magnolia.content2bean.Content2BeanException
- Specified by:
newBeanInstance
in interface info.magnolia.content2bean.Content2BeanTransformer
- Overrides:
newBeanInstance
in class info.magnolia.content2bean.impl.Content2BeanTransformerImpl
- Throws:
info.magnolia.content2bean.Content2BeanException
internalInitBean
protected Object internalInitBean(info.magnolia.content2bean.TransformationState state,
Map properties)
throws info.magnolia.content2bean.Content2BeanException
- Specified by:
internalInitBean
in class ProxyCapableContent2BeanTransformer
- Throws:
info.magnolia.content2bean.Content2BeanException
resolveBeanName
protected String resolveBeanName(info.magnolia.content2bean.TransformationState state,
Object bean)
Copyright © 2009-2011 Magnolia International Ltd.. All Rights Reserved.