info.magnolia.content2bean
Interface Content2BeanTransformer

All Known Implementing Classes:
CollectionPropertyHidingTransformer, Content2BeanTransformerImpl, Content2BeanUtil.DefaultClassTransformer, Content2BeanUtil.ToMapTransformer

public interface Content2BeanTransformer

Contract for transformation from content to java beans.

Version:
$Id$
Author:
philipp

Nested Class Summary
static class Content2BeanTransformer.Factory
          Deprecated. since 4.5, we should use IoC...
 
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()
          Deprecated. since 4.5, do not use
 void initBean(TransformationState state, Map values)
          Called after all properties are set.
 Object newBeanInstance(TransformationState state, Map values, ComponentProvider componentProvider)
          Instantiates the bean.
 TransformationState newState()
          Create a state object to share the state between the processor and transformer.
 TypeDescriptor resolveType(TransformationState state)
          Deprecated. since 4.5, use resolveType(TypeMapping, TransformationState, ComponentProvider)
 TypeDescriptor resolveType(TypeMapping typeMapping, TransformationState state, ComponentProvider componentProvider)
          Resolves the class to use for the current node.
 void setProperty(TransformationState state, PropertyTypeDescriptor descriptor, Map<String,Object> values)
          Deprecated. since 4.5, use setProperty(TypeMapping, TransformationState, PropertyTypeDescriptor, java.util.Map)
 void setProperty(TypeMapping typeMapping, 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
Deprecated. since 4.5, use resolveType(TypeMapping, TransformationState, ComponentProvider)

Throws:
ClassNotFoundException

resolveType

TypeDescriptor resolveType(TypeMapping typeMapping,
                           TransformationState state,
                           ComponentProvider componentProvider)
                           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,
                       ComponentProvider componentProvider)
                       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)
Deprecated. since 4.5, use setProperty(TypeMapping, TransformationState, PropertyTypeDescriptor, java.util.Map)


setProperty

void setProperty(TypeMapping typeMapping,
                 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()
Deprecated. since 4.5, do not use

The mapping to use.



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