public abstract class QueryFilter extends java.lang.Object implements PluginComponent, java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BACKOFFICE_SEARCH
QueryHandler attribute used to indicate that we are processing a back office search.
|
static java.lang.String |
FRONTOFFICE_SEARCH
QueryHandler attribute used to indicate that we are processing a front office search.
|
protected int |
order |
static java.lang.String |
PORTLET_QUERY
QueryHandler attribute used to indicate that we are processing a portlet's query.
|
static java.lang.String |
REVISION |
Constructor and Description |
---|
QueryFilter()
Constructs a QueryFilter with order = 0
|
QueryFilter(int order)
Constructs a QueryFilter with the given order
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object obj)
Compare this object with the specified object for order.
|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
QueryHandler |
filterQueryHandler(QueryHandler qh,
java.util.Map context)
This method should be overriden to filter the value of the QueryHandler
|
QueryResultSet |
filterResultSet(QueryHandler qh,
QueryResultSet set,
java.util.Map context)
This method should be overriden to filter the result set
|
int |
getOrder()
Retrieve the order value used to sort QueryFilter.
|
boolean |
getSearchDefault()
This method may overriden if this QueryFilter is selectable from the search user interface.
|
java.lang.String |
getSearchDescription(java.lang.String lang)
This method may be overriden if this QueryFilter is selectable from the search user interface.
|
java.lang.String |
getSearchLabel(java.lang.String lang)
This method may be overriden if this QueryFilter is selectable from the search user interface.
|
java.lang.String |
getSearchParam()
This method must be overriden if this QueryFilter is selectable from the search user interface.
|
boolean |
init(Plugin plugin)
Initialize the component with the given plugin configuration
|
static boolean |
isBackOfficeSearch(QueryHandler qh)
Check if the specified QueryHandler is a back office search.
|
static boolean |
isFrontOfficeSearch(QueryHandler qh)
Check if the specified QueryHandler is a front office search.
|
static boolean |
isPortletQuery(QueryHandler qh)
Check if the specified QueryHandler is a portlet query.
|
public static final java.lang.String REVISION
public static final java.lang.String FRONTOFFICE_SEARCH
isFrontOfficeSearch(QueryHandler)
.public static final java.lang.String BACKOFFICE_SEARCH
isBackOfficeSearch(QueryHandler)
.public static final java.lang.String PORTLET_QUERY
isPortletQuery(QueryHandler)
.protected int order
public QueryFilter()
public QueryFilter(int order)
order
- the orderpublic boolean init(Plugin plugin)
PluginComponent
init
in interface PluginComponent
plugin
- the calling pluginPluginComponent.init(Plugin)
public QueryHandler filterQueryHandler(QueryHandler qh, java.util.Map context)
qh
- the QueryHandlercontext
- the context. Can be used to exchange data between custom QueryFilters.public QueryResultSet filterResultSet(QueryHandler qh, QueryResultSet set, java.util.Map context)
qh
- the QueryHandlerset
- the result setcontext
- the context. Can be used to exchange data between custom QueryFilters.public java.lang.String getSearchParam()
public java.lang.String getSearchLabel(java.lang.String lang)
lang
- the user languagepublic java.lang.String getSearchDescription(java.lang.String lang)
lang
- the user languagepublic boolean getSearchDefault()
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
obj
- the Object to be compared.Comparable.compareTo(java.lang.Object)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the Object to be compared.public int getOrder()
public static boolean isFrontOfficeSearch(QueryHandler qh)
"front/query.jsp"
.qh
- the QueryHandler to checkpublic static boolean isBackOfficeSearch(QueryHandler qh)
"work/queryWork.jsp"
.qh
- the QueryHandler to checkpublic static boolean isPortletQuery(QueryHandler qh)
"types/PortletQueryForeach/doQuery.jsp"
.qh
- the QueryHandler to checkCopyright © 2001-2010 Jalios SA. All Rights Reserved.