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 | 
|---|---|
boolean | 
callFilterDBResult(java.lang.Class clazz,
                  java.util.Map<java.lang.String,java.lang.Object> context)
This convenient method is a simplfied version of  
callFilterDBResult(PublicationCriteria). | 
boolean | 
callFilterDBResult(PublicationCriteria pubCriteria)
Returns true if the method  
filterDBResult(Publication, Map) must be called during a DB query search. | 
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. 
 | 
boolean | 
filterDBResult(Publication pub,
              java.util.Map<java.lang.String,java.lang.Object> context)
This method should be overriden to filter DB results. 
 | 
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)
PluginComponentinit in interface PluginComponentplugin - 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 boolean filterDBResult(Publication pub, java.util.Map<java.lang.String,java.lang.Object> context)
pub - a DB Publicationcontext - the context used during the querypublic boolean callFilterDBResult(PublicationCriteria pubCriteria)
filterDBResult(Publication, Map) must be called during a DB query search.pubCriteria - the criteria of the query.filterDBResult(Publication, Map) must be called during a DB query search.public boolean callFilterDBResult(java.lang.Class clazz,
                                  java.util.Map<java.lang.String,java.lang.Object> context)
callFilterDBResult(PublicationCriteria).clazz - the classcontext - a context map.filterDBResult(Publication, Map) must be called during a DB query search.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.Comparableobj - the Object to be compared.Comparable.compareTo(java.lang.Object)public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - 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.jspf".qh - the QueryHandler to checkCopyright © 2001-2018 Jalios SA. All Rights Reserved.