info.magnolia.content2bean
Interface Content2BeanTransformer

All Known Implementing Classes:
CacheConfigurationTransformer, CollectionPropertyHidingTransformer, CompositeExecutorTransformer, CompositeFilterTransformer, Content2BeanTransformerImpl, Content2BeanUtil.DefaultClassTransformer, IPSecurityManagerImpl.IPSecurityManagerTransformer, VoterSetTransformer

public interface Content2BeanTransformer

Contract for transformation from content to java beans.

Version:
$Id: Content2BeanTransformer.java 41137 2011-01-06 18:19:25Z gjoseph $
Author:
philipp

Nested Class Summary
static class Content2BeanTransformer.Factory
          Creates singleton instance of content2bean transformer.
 
Method Summary
 Object convertPropertyValue(Class<?> propertyType, Object value)
          Transforms the simple basic jcr property value objects to more complex properties.
 Collection<Content> getChildren(Content node)
          Returns the children of the node to be transformed.
 TypeMapping getTypeMapping()
          The mapping to use.
 void initBean(TransformationState state, Map values)
          Called after all properties are set.
 Object newBeanInstance(TransformationState state, Map values)
          Instantiates the bean.
 TransformationState newState()
          Create a state object to share the state between the processor and transformer.
 TypeDescriptor resolveType(TransformationState state)
          Resolves the class to use for the current node.
 void setProperty(TransformationState state, PropertyTypeDescriptor descriptor, Map<String,Object> values)
          Set this property on that bean.
 

Method Detail

newState

TransformationState newState()
Create a state object to share the state between the processor and transformer.


resolveType

TypeDescriptor resolveType(TransformationState state)
                           throws ClassNotFoundException
Resolves the class to use for the current node.

Throws:
ClassNotFoundException

getChildren

Collection<Content> getChildren(Content node)
Returns the children of the node to be transformed. Those are normally the direct children but might differ.


newBeanInstance

Object newBeanInstance(TransformationState state,
                       Map values)
                       throws Content2BeanException
Instantiates the bean.

Throws:
Content2BeanException

initBean

void initBean(TransformationState state,
              Map values)
              throws Content2BeanException
Called after all properties are set.

Throws:
Content2BeanException

setProperty

void setProperty(TransformationState state,
                 PropertyTypeDescriptor descriptor,
                 Map<String,Object> values)
Set this property on that bean. Allows excluding of properties.


convertPropertyValue

Object convertPropertyValue(Class<?> propertyType,
                            Object value)
                            throws Content2BeanException
Transforms the simple basic jcr property value objects to more complex properties.

Throws:
Content2BeanException

getTypeMapping

TypeMapping getTypeMapping()
The mapping to use.



Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.