info.magnolia.content2bean
Interface Content2BeanTransformer

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

public interface Content2BeanTransformer

Used to create beans

Version:
$Id: Content2BeanTransformer.java 32667 2010-03-13 00:37:06Z gjoseph $
Author:
philipp

Nested Class Summary
static class Content2BeanTransformer.Factory
          Get your instance here
 
Method Summary
 java.lang.Object convertPropertyValue(java.lang.Class<?> propertyType, java.lang.Object value)
          Transforms the simple basic jcr property value objects to more complex properties
 java.util.Collection<Content> getChildren(Content node)
          Returns the children of the node to be transformed.
 TypeMapping getTypeMapping()
          The mapping to use
 void initBean(TransformationState state, java.util.Map values)
          Called after all properties are set
 java.lang.Object newBeanInstance(TransformationState state, java.util.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, java.util.Map<java.lang.String,java.lang.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 java.lang.ClassNotFoundException
Resolves the class to use for the current node

Throws:
java.lang.ClassNotFoundException

getChildren

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


newBeanInstance

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

Throws:
Content2BeanException

initBean

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

Throws:
Content2BeanException

setProperty

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


convertPropertyValue

java.lang.Object convertPropertyValue(java.lang.Class<?> propertyType,
                                      java.lang.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-2010 Magnolia International Ltd.. All Rights Reserved.