org.kuali.student.common.assembly.transform
Class TransformationManager

java.lang.Object
  extended by org.kuali.student.common.assembly.transform.TransformationManager

public class TransformationManager
extends Object


Field Summary
private  List<TransformFilter> filterList
           
(package private)  Logger LOG
           
private  DataBeanMapper mapper
           
private static ThreadLocal<Metadata> metadataCache
           
private  MetadataServiceImpl metadataService
           
 
Constructor Summary
TransformationManager()
           
 
Method Summary
 void addFilter(TransformFilter filter)
           
 void applyInboundFilters(String dtoName, Object value, Map<String,Object> properties, Metadata metadata)
          This method applies all inbound filters known to his transformation manager.
 void applyMetadataFilters(String dtoName, Metadata metadata, Map<String,Object> filterProperties)
           
 void applyOutboundFilters(String dtoName, Object value, Map<String,Object> properties)
          This method applies all outbound filters known to his transformation manager.
 Metadata getMetadata(String dtoName, Map<String,Object> filterProperties)
           
 Metadata getUnfilteredMetadata(String dtoName)
           
 void removeFilter(TransformFilter filter)
           
 void setFilters(List<TransformFilter> filters)
           
 void setMetadataService(MetadataServiceImpl metadataService)
           
 Object transform(Data value, Class<?> clazz)
          This is an inbound transform request which will convert incoming Data objects to the corresponding DTO object and apply inbound filter operations to both the data object and the converted DTO object.
 Object transform(Data value, Class<?> clazz, Map<String,Object> filterProperties)
          This is an inbound transform request which will convert incoming Data objects to the corresponding DTO object and apply inbound filters to both the data object and the converted DTO object.
 Data transform(Object value)
          This is an outbound transform request which will convert incoming DTO objects to a Data map and apply outbound filter operation to both the data object and the converted DTO object.
 Data transform(Object value, Map<String,Object> filterProperties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

final Logger LOG

metadataService

private MetadataServiceImpl metadataService

mapper

private DataBeanMapper mapper

filterList

private List<TransformFilter> filterList

metadataCache

private static ThreadLocal<Metadata> metadataCache
Constructor Detail

TransformationManager

public TransformationManager()
Method Detail

transform

public Data transform(Object value)
               throws Exception
This is an outbound transform request which will convert incoming DTO objects to a Data map and apply outbound filter operation to both the data object and the converted DTO object.

Parameters:
value -
Returns:
Throws:
Exception

transform

public Data transform(Object value,
                      Map<String,Object> filterProperties)
               throws Exception
Throws:
Exception

transform

public Object transform(Data value,
                        Class<?> clazz)
                 throws Exception
This is an inbound transform request which will convert incoming Data objects to the corresponding DTO object and apply inbound filter operations to both the data object and the converted DTO object.

Parameters:
value - The incoming Data value to transform to DTO object
clazz - The DTO object class represented by the Data value
Returns:
The converted DTO with both inbound Data and DTO filters applied.
Throws:
Exception

transform

public Object transform(Data value,
                        Class<?> clazz,
                        Map<String,Object> filterProperties)
                 throws Exception
This is an inbound transform request which will convert incoming Data objects to the corresponding DTO object and apply inbound filters to both the data object and the converted DTO object.

Parameters:
value - The incoming Data value to transform to DTO object
clazz - The DTO object class represented by the Data value
filterProperties - properties that can be consumed by the filters
Returns:
The converted DTO with both inbound Data and DTO filters applied.
Throws:
Exception

applyInboundFilters

public void applyInboundFilters(String dtoName,
                                Object value,
                                Map<String,Object> properties,
                                Metadata metadata)
                         throws Exception
This method applies all inbound filters known to his transformation manager.

Parameters:
dtoName - The name of the dto represented by a Data value, for Dto values, this can simply be the name of the dto class
value - The dto or data object to apply filters to
Throws:
Exception

applyOutboundFilters

public void applyOutboundFilters(String dtoName,
                                 Object value,
                                 Map<String,Object> properties)
                          throws Exception
This method applies all outbound filters known to his transformation manager.

Parameters:
dtoName - The name of the dto represented by a Data value, for Dto values, this can simply be the name of the dto class
value - The dto or data object to apply filters to
Throws:
Exception

getMetadata

public Metadata getMetadata(String dtoName,
                            Map<String,Object> filterProperties)

applyMetadataFilters

public void applyMetadataFilters(String dtoName,
                                 Metadata metadata,
                                 Map<String,Object> filterProperties)

getUnfilteredMetadata

public Metadata getUnfilteredMetadata(String dtoName)

setMetadataService

public void setMetadataService(MetadataServiceImpl metadataService)

addFilter

public void addFilter(TransformFilter filter)

setFilters

public void setFilters(List<TransformFilter> filters)

removeFilter

public void removeFilter(TransformFilter filter)


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.