com.isomorphic.js
Class KeepPropertiesBeanFilter

java.lang.Object
  |
  +--com.isomorphic.js.KeepPropertiesBeanFilter
All Implemented Interfaces:
IBeanFilter

public class KeepPropertiesBeanFilter
extends java.lang.Object
implements IBeanFilter

A simple IBeanFilter for use with the JSONFilter that filters beans based on a simple property list.

See Also:
JSONFilter, IBeanFilter

Constructor Summary
KeepPropertiesBeanFilter(java.util.Collection propsToKeep)
          List of properties to keep.
 
Method Summary
 java.util.Map filter(java.lang.Object o)
          This method is called to filter a bean (IBeanFilter Interface).
 

Constructor Detail

KeepPropertiesBeanFilter

public KeepPropertiesBeanFilter(java.util.Collection propsToKeep)
List of properties to keep. Any properties occurring in the bean that are not listed here will be discarded by this filter.
Method Detail

filter

public java.util.Map filter(java.lang.Object o)
                     throws java.lang.Exception
This method is called to filter a bean (IBeanFilter Interface). Returns the bean as filtered through the propsToKeep list.
Specified by:
filter in interface IBeanFilter
Parameters:
obj - the bean to convert
Returns:
the converted bean as a Map