info.magnolia.jcr.node2bean.impl
Class CollectionPropertyHidingTransformer

java.lang.Object
  extended by info.magnolia.jcr.node2bean.impl.Node2BeanTransformerImpl
      extended by info.magnolia.jcr.node2bean.impl.CollectionPropertyHidingTransformer
All Implemented Interfaces:
Node2BeanTransformer
Direct Known Subclasses:
CompositeFilterTransformer, VoterSetTransformer

public class CollectionPropertyHidingTransformer
extends Node2BeanTransformerImpl

A transformer which "hides" a collection node. Extend or pass the type and node name in the constructor.


Constructor Summary
CollectionPropertyHidingTransformer(Class<?> beanClass, String collectionName)
           
 
Method Summary
 TypeDescriptor getPropertyType()
           
protected  TypeDescriptor onResolveType(TypeMapping typeMapping, TransformationState state, TypeDescriptor resolvedType, ComponentProvider componentProvider)
          Called once the type should have been resolved.
 void setProperty(TypeMapping mapping, TransformationState state, PropertyTypeDescriptor descriptor, Map<String,Object> values)
          Set this property on that bean.
 
Methods inherited from class info.magnolia.jcr.node2bean.impl.Node2BeanTransformerImpl
convertPropertyValue, createCollectionFromMap, getChildren, initBean, isBeanEnabled, newBeanInstance, newState, resolveType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionPropertyHidingTransformer

public CollectionPropertyHidingTransformer(Class<?> beanClass,
                                           String collectionName)
Parameters:
beanClass - class which collection will be hidden
collectionName - name of collection to hide
Method Detail

onResolveType

protected TypeDescriptor onResolveType(TypeMapping typeMapping,
                                       TransformationState state,
                                       TypeDescriptor resolvedType,
                                       ComponentProvider componentProvider)
Description copied from class: Node2BeanTransformerImpl
Called once the type should have been resolved. The resolvedType might be null if no type has been resolved. Every subclass should override this method.

Overrides:
onResolveType in class Node2BeanTransformerImpl

setProperty

public void setProperty(TypeMapping mapping,
                        TransformationState state,
                        PropertyTypeDescriptor descriptor,
                        Map<String,Object> values)
                 throws javax.jcr.RepositoryException
Description copied from interface: Node2BeanTransformer
Set this property on that bean. Allows excluding of properties.

Specified by:
setProperty in interface Node2BeanTransformer
Overrides:
setProperty in class Node2BeanTransformerImpl
Throws:
javax.jcr.RepositoryException

getPropertyType

public TypeDescriptor getPropertyType()


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