Package com.isomorphic.js
Class KeepPropertiesBeanFilter
java.lang.Object
com.isomorphic.js.KeepPropertiesBeanFilter
- All Implemented Interfaces:
IBeanFilter
,com.isomorphic.js.IContextBeanFilter
public class KeepPropertiesBeanFilter extends Object implements com.isomorphic.js.IContextBeanFilter
A simple IBeanFilter for use with the JSONFilter that filters beans based on a simple property list.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionKeepPropertiesBeanFilter
(Collection propsToKeep) List of properties to keep. -
Method Summary
-
Constructor Details
-
KeepPropertiesBeanFilter
List of properties to keep. Any properties occurring in the bean that are not listed here will be discarded by this filter.
-
-
Method Details
-
filter
This method is called to filter a bean (IBeanFilter Interface). Returns the bean as filtered through the propsToKeep list.- Specified by:
filter
in interfaceIBeanFilter
- Parameters:
obj
- the bean to convert- Returns:
- the converted bean as a Map
- Throws:
Exception
-