info.magnolia.content2bean.impl
Class Content2BeanProcessorImpl

java.lang.Object
  extended by info.magnolia.content2bean.impl.Content2BeanProcessorImpl
All Implemented Interfaces:
Content2BeanProcessor

public class Content2BeanProcessorImpl
extends java.lang.Object
implements Content2BeanProcessor

Contains the logic for traversing the hierarchy and do the calls to the transformer

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface info.magnolia.content2bean.Content2BeanProcessor
Content2BeanProcessor.Factory
 
Constructor Summary
Content2BeanProcessorImpl()
           
 
Method Summary
 boolean isForceCreation()
           
protected  Content2BeanTransformer resolveTransformer(TypeDescriptor type, Content2BeanTransformer transformer)
           
 void setForceCreation(boolean handleExceptions)
           
protected  void setProperties(java.util.Map<java.lang.String,java.lang.Object> values, Content2BeanTransformer transformer, TransformationState state)
          Populates the values to the bean
 java.lang.Object setProperties(java.lang.Object bean, Content node, boolean recursive, Content2BeanTransformer transformer)
          Similar to toBean() but uses a passed bean as the root bean
 java.lang.Object toBean(Content node, boolean recursive, Content2BeanTransformer transformer)
          Transforms the node to a bean using the passed transformer
protected  java.lang.Object toBean(Content node, boolean recursive, Content2BeanTransformer transformer, TransformationState state)
           
protected  java.util.Map<java.lang.String,java.lang.Object> toMap(Content node, boolean recursive, Content2BeanTransformer transformer, TransformationState state)
          toBean() is used to build children
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Content2BeanProcessorImpl

public Content2BeanProcessorImpl()
Method Detail

toBean

public java.lang.Object toBean(Content node,
                               boolean recursive,
                               Content2BeanTransformer transformer)
                        throws Content2BeanException
Description copied from interface: Content2BeanProcessor
Transforms the node to a bean using the passed transformer

Specified by:
toBean in interface Content2BeanProcessor
Throws:
Content2BeanException

toBean

protected java.lang.Object toBean(Content node,
                                  boolean recursive,
                                  Content2BeanTransformer transformer,
                                  TransformationState state)
                           throws Content2BeanException
Throws:
Content2BeanException

setProperties

public java.lang.Object setProperties(java.lang.Object bean,
                                      Content node,
                                      boolean recursive,
                                      Content2BeanTransformer transformer)
                               throws Content2BeanException
Description copied from interface: Content2BeanProcessor
Similar to toBean() but uses a passed bean as the root bean

Specified by:
setProperties in interface Content2BeanProcessor
Throws:
Content2BeanException

toMap

protected java.util.Map<java.lang.String,java.lang.Object> toMap(Content node,
                                                                 boolean recursive,
                                                                 Content2BeanTransformer transformer,
                                                                 TransformationState state)
                                                          throws Content2BeanException
toBean() is used to build children

Throws:
Content2BeanException

setProperties

protected void setProperties(java.util.Map<java.lang.String,java.lang.Object> values,
                             Content2BeanTransformer transformer,
                             TransformationState state)
                      throws Content2BeanException
Populates the values to the bean

Throws:
Content2BeanException

resolveTransformer

protected Content2BeanTransformer resolveTransformer(TypeDescriptor type,
                                                     Content2BeanTransformer transformer)

isForceCreation

public boolean isForceCreation()

setForceCreation

public void setForceCreation(boolean handleExceptions)


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