JIDE 3.5.15

com.jidesoft.filter
Interface FilterFactory

All Known Subinterfaces:
FilterFactoryWithEditProperty

public interface FilterFactory

FilterFactory is an interface responsible for creating filters through user interface. It can describe a filter using string through getConditionString(java.util.Locale) method. It can also describe the data it expected using getExpectedDataTypes(). Both methods make it possible for a user interface to present some appropriate input controls to users. Once the data needed by the filter is completed, then createFilter(Object...) can be used to create the filter.


Method Summary
 Filter createFilter(Object... objects)
          Creates the filter.
 String getConditionString(Locale locale)
          Gets the filter condition string.
 Class[] getExpectedDataTypes()
          Gets the expected data types in order to create the filter.
 String getName()
          Gets the FilterFactory name.
 

Method Detail

createFilter

Filter createFilter(Object... objects)
Creates the filter.

Parameters:
objects - the data needed by the filter in order to create it. For example, EqualFilter will need a value to compare the equality. BetweenFilter will need two values to form a range so that it can tell if the input value is falls into the range.
Returns:
the Filter.

getConditionString

String getConditionString(Locale locale)
Gets the filter condition string. It is a localized string that will show to the users to tell them the purpose of the filter.

Parameters:
locale - the Locale
Returns:
the filter condition string.

getName

String getName()
Gets the FilterFactory name. This name is used in FilterFactoryManager.findFilterFactoryByName(Class, String) method.

Returns:
the FilterFactory name.

getExpectedDataTypes

Class[] getExpectedDataTypes()
Gets the expected data types in order to create the filter. For example, for EqualFilter for int, it will return { int.class }. For BetweenFilter for Date, it will return { Date.class, Date.class } as it needs two Dates.

Returns:
the expected data types in order to create the filter.

JIDE 3.5.15