|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.context.JcmsContext com.jalios.jcms.context.JcmsJspContext com.jalios.jcms.handler.JcmsFormHandler com.jalios.jcms.handler.AbstractQueryHandler<Publication> com.jalios.jcms.handler.QueryHandler
public class QueryHandler
Holder class and form handler of all parameters to be used for a query.
There is two main use cases :
search.jsp
or refine.jsp
).QueryHandler
is instanciated with the request property which initializes the
bean exactly like a JcmsJspContext
instance, with all contextual informations (specially the logged member).
Therefore the query will be performed using access right of the loggedMember
accessing the JSP.
<jsp:useBean id="myQueryHandler" scope="page" class="com.jalios.jcms.handler.QueryHandler"> <jsp:setProperty name="myQueryHandler" property="request" value="<%= request %>"/> <jsp:setProperty name="myQueryHandler" property="*" /> </jsp:useBean> <% Set resultSet = myQueryHandler.getResultSet(); %>
loggedMember
to use to perform the query.
QueryHandler myQH = new QueryHandler(); myQH.setLoggedMember( someMember ); // optionnal Member to be used for access right check myQH.setTypes(new String[] { Article.class.getName() } ); myQH.setText("hello"); Set helloArticleSet = myQH.getResultSet(); ...
If you need to perform a custom query in a jsp, use the jsp tag <jalios:query ... /> which delegates to this class and performs all the processing needed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jalios.jcms.handler.AbstractQueryHandler |
---|
AbstractQueryHandler.HiddenParamQhPrinter, AbstractQueryHandler.QueryHandlerPrinter, AbstractQueryHandler.QueryStringQhPrinter |
Field Summary | |
---|---|
static String |
REVISION
|
static String |
TEXT_MODE_ADVANCED
The mode value to use to perform a text search with advanced search syntax (wildcard, field, etc). Value : "advanced" . |
static String |
TEXT_MODE_ALL_WORDS
The mode value to use to perform a text search matching all the words of the search string. Value : "all" . |
static String |
TEXT_MODE_ANY_WORD
The mode value to use to perform a text search matching at least one of the words of the search string. Value : "any" . |
static String |
TEXT_MODE_EXACT
The mode value to use to perform a text search matching the exact phrase specified in the search string. Value : "exact" . |
Fields inherited from class com.jalios.jcms.handler.JcmsFormHandler |
---|
contextMap, editFieldSet, noRedirect, noSendRedirect, popupEdition, redirect, redirectOnClosePopup, workspaceForced |
Fields inherited from class com.jalios.jcms.context.JcmsJspContext |
---|
AJAX_REQUEST_ATTRIBUTES, BODY_HEADER, CSS_HEADER, cssboMap, cssfoMap, CUSTOM_HEADER, editIcon, HTTPEQUIV_HEADER, httpequivMap, HTTPNAME_HEADER, httpnameMap, initEditIcon, JAVASCRIPT_CODE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, jsboSet, jsfoSet, out, pageContext, SHOW_EDIT_ICON, STYLE_HEADER |
Fields inherited from class com.jalios.jcms.context.JcmsContext |
---|
browser, caddy, channel, inFO, initDone, initWorkspace, isAdmin, isAjaxRequest, isDBMember, isDebug, isLogged, loggedMember, request, response, userCountry, userLang, userLocale, workspace |
Fields inherited from interface com.jalios.util.JaliosConstants |
---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR |
Constructor Summary | |
---|---|
QueryHandler()
Default constructor, builds a new QueryHandler with default value. |
|
QueryHandler(QueryHandler original)
Create a QueryHandler by copying all fields of the specified original QueryHandler, omitting all information linked to the current request. |
|
QueryHandler(String queryString)
Constructs a new QueryHandler by parsing the specified query string. |
|
QueryHandler(String queryString,
javax.servlet.http.HttpServletRequest request)
Constructs a new QueryHandler by parsing the
specified query string and using informations available
from the specified request (logged member, user language, etc). |
|
QueryHandler(String text,
String mode,
boolean catName,
boolean exactCat,
boolean searchInPub,
boolean searchInFile,
String[] cids,
String[] cidsOff,
String[] mids,
String[] midsOff,
String[] gids,
String[] gidsOff,
Date beginDate,
int beginDay,
int beginMonth,
int beginYear,
Date endDate,
int endDay,
int endMonth,
int endYear,
String dateType,
int dateSince,
String[] types,
String[] typesOff,
boolean exactType,
String[] ratings,
String[] pstatus,
boolean checkPstatus,
String[] langs,
boolean replaceFileDoc)
Constructs a new QueryHandler , settings all the specified values. |
Method Summary | |
---|---|
void |
addHighlightAttributes(javax.servlet.http.HttpServletRequest request)
Add highlight attributes to the given request. |
void |
clearHighlightAttributes(javax.servlet.http.HttpServletRequest request)
Remove highlight attributes of the given request. |
String |
getAbility()
Retrieves the current the portal element's ability defined for this QueryHandler. |
Set<String> |
getAllCidSet()
Returns all the cids contains in this query and all historized queries |
Date[] |
getBeginAndEndDates()
Compute begin and end date of a query from QueryHandler values. |
Date |
getBeginDate()
|
int |
getBeginDay()
|
int |
getBeginMonth()
|
int |
getBeginYear()
|
Set<Category> |
getCategorySet(String inputName)
|
String |
getCatMode()
|
boolean |
getCatName()
|
boolean |
getCheckPstatus()
|
String[] |
getCids()
|
String[] |
getCidsOff()
|
HashSet<Class<? extends Publication>> |
getClassOffSet()
Return a set of classes corresponding to the 'typesOff' attributes |
HashSet<Class<? extends Publication>> |
getClassSet()
Return a set of classes corresponding to the 'types' attributes |
static List<String> |
getContentTypesFromDocumentKind(String kind)
Retrieve the content type to use for the specified document kind |
int |
getDateSinceInt()
|
String |
getDateType()
|
String |
getDescription()
Returns a description of the query in the language defined by userLang of this handler. |
String |
getDescription(String lang)
Returns a description of the query in the specified language. |
String[] |
getDocumentKinds()
Retrieve the kind of document defined for this QueryHandler |
static Map<String,String> |
getDocumentKindsGroupMap(String userLang)
Retrieve a map of all document kind group defined in properties. |
static Map<String,String> |
getDocumentKindsMap(String userLang,
String kindGroup)
Retrieve a map of all document kind for the specified kind group. |
Date |
getEndDate()
|
int |
getEndDay()
|
int |
getEndMonth()
|
int |
getEndYear()
|
boolean |
getExactCat()
|
boolean |
getExactType()
|
String[] |
getGids()
|
String[] |
getGidsOff()
|
Member |
getHighlightedMember()
|
String |
getHist()
|
int |
getHistLevel()
|
List<String> |
getHistoryList()
Not set : - before the query method has been called. |
int[] |
getIntPstatus()
Retrieves the current pstatus values to be searched by this query. |
int[] |
getIntRatings()
Retrieves the current rating values to be searched by this query. |
String[] |
getLangs()
|
protected org.apache.log4j.Logger |
getLogger()
|
String[] |
getMids()
|
String[] |
getMidsOff()
|
String |
getMode()
Retrieve the string representation of the current text mode being to perform the text search. |
protected String[] |
getMostRecentTextAndModeInHistory()
|
protected static void |
getMostRecentTextInHistoryVisitor(String[] textAndMode,
QueryHandler qh)
Internal recursive method used to look for most recent text. |
boolean |
getPagerAll()
|
int |
getPageSize()
|
String[] |
getPortalIds()
|
String[] |
getPstatus()
Retrieves the pstatus values to be searched by this query. |
String[] |
getRatings()
Retrieves the current rating values to be searched by this query. |
Workspace |
getRefinedWorkspace()
Get the Workspace for this request. |
boolean |
getReplaceFileDoc()
|
QueryResultSet |
getResultSet()
Return results of a query done using this QueryHandler . |
boolean |
getReverse()
|
String[] |
getSearchedFields()
Retrieves the lucene fields in which the text search is being performed for publications. |
boolean |
getSearchInDB()
|
boolean |
getSearchInFiles()
|
boolean |
getSearchInPub()
|
String |
getSort()
|
int |
getStart()
|
String |
getText()
Retrieve the current text being searched in this query. |
boolean |
getTextSearch()
Checks if this query is mainly a text search. |
String[] |
getTypes()
|
static Class<? extends Publication> |
getTypesCommonSuperClass(QueryHandler... queryHandlers)
Retrieve the common super class of types specified in the QueryHandler. |
String[] |
getTypesOff()
|
String[] |
getUnresolvedLangs()
|
boolean |
isExpanded(Category cat,
String inputName)
|
boolean |
isHybridSearch()
Returns true if this is an hybrid search (i.e. |
boolean |
isModeAdvanced()
Checks if the current text mode is to perform the search using advanced search syntaxt. |
boolean |
isModeAll()
Checks if the current text mode is to find all words of the search string. |
boolean |
isModeAny()
Checks if the current text mode is to find at least one word of the search string. |
boolean |
isModeExact()
Checks if the current text mode is to find the exact phrase specified in the search string. |
protected void |
parseQueryStringParam(String key,
String[] values)
Method to be implemented by subclass to decode parameter from queryString. |
protected String |
printParams(AbstractQueryHandler.QueryHandlerPrinter printer)
Print current QueryHandler params using specified QueryHandlerPrinter. |
void |
setAbility(String ability)
Sets the portal element's ability to match when PortalElement are found. |
void |
setBeginDate(Date v)
|
void |
setBeginDateW3c(String dateW3c)
Set the begin date to be used in this query. |
void |
setBeginDay(int v)
|
void |
setBeginMonth(int v)
|
void |
setBeginYear(int v)
|
void |
setCatMode(String v)
Define the mode to use when dealing with categories. |
void |
setCatName(boolean v)
|
void |
setCheckPstatus(boolean v)
|
void |
setCids(String[] v)
|
void |
setCidsOff(String[] v)
|
void |
setDateSince(String v)
|
void |
setDateType(String v)
|
void |
setDocumentKinds(String[] kinds)
Set the kind of document to match for this QueryHandler |
void |
setEndDate(Date v)
|
void |
setEndDateW3c(String dateW3c)
Set the end date to be used in this query. |
void |
setEndDay(int v)
|
void |
setEndMonth(int v)
|
void |
setEndYear(int v)
|
void |
setExactCat(boolean v)
|
void |
setExactType(boolean v)
|
void |
setGids(String[] v)
|
void |
setGidsOff(String[] v)
|
void |
setHist(String v)
|
void |
setHistLevel(int v)
|
void |
setHistoryList(List<String> historyList)
Set the list of descriptions of the query and the query recursively in "hist" request param. |
void |
setIgnoreDefaultTypes(boolean ignoreDefaultTypes)
|
void |
setLangs(String[] v)
Set the value of langs (resolved 'user' lang with getUserLang()). |
void |
setMids(String[] v)
|
void |
setMidsOff(String[] v)
|
void |
setMode(String m)
Define the text mode to use to perform the text search. |
void |
setPagerAll(boolean pagerAll)
|
void |
setPageSize(int pageSize)
|
void |
setPortalIds(String[] v)
|
void |
setPstatus(String[] pstatus)
Sets the pstatus values to be searched by this query. |
void |
setRatings(String[] ratings)
Sets the rating values to be searched by this query. |
void |
setReplaceFileDoc(boolean v)
|
void |
setReverse(boolean v)
|
void |
setSearchedFields(String[] searchedFields)
Defines the (lucene) publications fields in which to perform the text search. |
void |
setSearchInDB(boolean v)
|
void |
setSearchInFiles(boolean v)
|
void |
setSearchInPub(boolean v)
|
void |
setSort(String sort)
|
void |
setStart(int start)
|
void |
setText(String text)
Sets the text to search in this query. Default value is null . |
void |
setTextSearch(boolean textSearch)
Indicate whether the search being performed through this query is a mainly a text search prior to other things. Default value is false . |
void |
setTypes(String[] types)
|
void |
setTypesOff(String[] typesOff)
|
void |
setWrkspc(String v)
|
String |
toString()
|
Methods inherited from class com.jalios.jcms.handler.AbstractQueryHandler |
---|
getAttribute, getAttributeMap, getDataSet, getHiddenParams, getQueryString, init, parseQueryString, removeAttribute, setAttribute, setDataSet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public static final String TEXT_MODE_ALL_WORDS
"all"
.
setMode(String)
,
Constant Field Valuespublic static final String TEXT_MODE_ANY_WORD
"any"
.
setMode(String)
,
Constant Field Valuespublic static final String TEXT_MODE_EXACT
"exact"
.
setMode(String)
,
Constant Field Valuespublic static final String TEXT_MODE_ADVANCED
"advanced"
.
setMode(String)
,
Constant Field ValuesConstructor Detail |
---|
public QueryHandler()
QueryHandler
with default value.
This constructor is required to use this class as a java bean.
public QueryHandler(String text, String mode, boolean catName, boolean exactCat, boolean searchInPub, boolean searchInFile, String[] cids, String[] cidsOff, String[] mids, String[] midsOff, String[] gids, String[] gidsOff, Date beginDate, int beginDay, int beginMonth, int beginYear, Date endDate, int endDay, int endMonth, int endYear, String dateType, int dateSince, String[] types, String[] typesOff, boolean exactType, String[] ratings, String[] pstatus, boolean checkPstatus, String[] langs, boolean replaceFileDoc)
QueryHandler
, settings all the specified values.
This constructors, while not deprecated, should not be used. Prefer the default constructor, followed by calls to the propers setters.
text
- the text to be search, see setText(String)
mode
- the text search mode to use, see setMode(String)
catName
- whether to perform text search in categories, see setCatName(boolean)
exactCat
- whether to find publication only when they have one of
the category to setCatName(boolean)
searchInPub
- whether to perform text search in publication, see setSearchInPub(boolean)
searchInFile
- whether to perform text search in files, see setSearchInFiles(boolean)
cids
- an array of Category's ids that publication must match to be found, see setCids(String[])
cidsOff
- an array of Category's ids that publication must NOT match to be found, see setCidsOff(String[])
mids
- an array of Member's ids defining the authors the publication must match to be found, see setMids(String[])
midsOff
- an array of Member's ids defining the authors the publication must NOT match to be found, see setMidsOff(String[])
gids
- an array of Group's ids defining the group that the author of the publication must belong to in order for a publication to be found, see setGids(String[])
gidsOff
- an array of Group's ids defining the group that the author of the publication must NOT belong to in order for a publication to be found, see setGidsOff(String[])
beginDate
- beginDay
- beginMonth
- beginYear
- endDate
- endDay
- endMonth
- endYear
- dateType
- dateSince
- types
- typesOff
- exactType
- ratings
- pstatus
- checkPstatus
- langs
- replaceFileDoc
- public QueryHandler(String queryString)
QueryHandler
by parsing the specified query string.
See QueryHandler(String, HttpServletRequest)
for a list of the
decoded parameters.
queryString
- a query String consisting of parameters (key=value) to be set in this handler.
"text=welcome&cids=j_42&cids=j_78"
public QueryHandler(String queryString, javax.servlet.http.HttpServletRequest request)
QueryHandler
by parsing the
specified query string and using informations available
from the specified request (logged member, user language, etc).
The following parameters (and only those listed here) will be automatically decoded from the specified query string. Other parameters should be set using apropriate setters.
"text"
: setText(String)
"mode"
: setMode(String)
"catName"
: setCatName(boolean)
"exactCat"
: setExactCat(boolean)
"searchInPub"
: setSearchInPub(boolean)
"searchInFiles"
: setSearchInFiles(boolean)
"catMode"
: setCatMode(String)
"cids"
: setCids(String[])
"cidsOff"
: setCidsOff(String[])
"mids"
: setMids(String[])
"midsOff"
: setMidsOff(String[])
"gids"
: setGids(String[])
"gidsOff"
: setGidsOff(String[])
"portalIds"
: setPortalIds(String[])
"dateType"
: setDateType(String)
"dateSince"
: setDateSince(String)
"beginDay"
: setBeginDay(int)
"beginMonth"
: setBeginMonth(int)
"beginYear"
: setBeginYear(int)
"beginDateW3c"
: setBeginDateW3c(String)
"endDay"
: setEndDay(int)
"endMonth"
: setEndMonth(int)
"endYear"
: setEndYear(int)
"endDateW3c"
: setEndDateW3c(String)
"hist"
: setHist(String)
"sort"
: setSort(String)
"types"
: setTypes(String[])
"typesOff"
: setTypesOff(String[])
"exactType"
: setExactType(boolean)
"ratings"
: setRatings(String[])
"pstatus"
: setPstatus(String[])
"langs"
: setLangs(String[])
"replaceFileDoc"
: setReplaceFileDoc(boolean)
"wrkspc"
: setWrkspc(String)
"searchedFields"
: setSearchedFields(String[])
"ability"
: setAbility(String)
queryString
- a query String consisting of parameters (key=value) to be set in this handler.
"text=welcome&cids=j_42&cids=j_78"
request
- the HttpServletRequest
to use to
retrieve loggedMember
, userLang
,
userLocale
that will be used by this handler,
ignored if null.public QueryHandler(QueryHandler original)
As of current implementation the following parameters are copied :
AbstractQueryHandler.setDataSet(Set)
JcmsContext.setLoggedMember(Member)
JcmsFormHandler.setWorkspace(Workspace)
setCheckPstatus(boolean)
AbstractQueryHandler.getAttributeMap()
original
- the original QueryHandler from which to retrieve parametersMethod Detail |
---|
protected org.apache.log4j.Logger getLogger()
getLogger
in class AbstractQueryHandler<Publication>
protected void parseQueryStringParam(String key, String[] values)
AbstractQueryHandler
parseQueryStringParam
in class AbstractQueryHandler<Publication>
key
- the parameter name, never null nor empty.values
- the parameter values, NEVER NULL NOR EMPTY.
You can safely invoke paramValues[0]
protected String printParams(AbstractQueryHandler.QueryHandlerPrinter printer)
printParams
in class AbstractQueryHandler<Publication>
printer
- a QueryHandlerPrinter to use
public String toString()
toString
in class Object
public QueryResultSet getResultSet()
QueryHandler
.
Warning: This method process the query each time it is invoked, therefore do not call it multiple times if you don't need it.
QueryResultSet
containing all results of this query,
it is a HashSet
and therefore it is NOT sorted.
use either getAsSortedSet()
or
getAsSortedSet(Comparator)
to obtain a sorted Set.public Set<Category> getCategorySet(String inputName)
public boolean isExpanded(Category cat, String inputName)
public void setIgnoreDefaultTypes(boolean ignoreDefaultTypes)
ignoreDefaultTypes
- if true, getTypes() and getTypesOff() won't check the properties for default query types and types off.public Workspace getRefinedWorkspace()
public void setWrkspc(String v)
public Set<String> getAllCidSet()
public String getDescription()
public String getDescription(String lang)
lang
- the ISO-639 code of the language in which to retrieve the query description
public Date[] getBeginAndEndDates()
Date
, the first is the begin date, the second the end Date.public Member getHighlightedMember()
public HashSet<Class<? extends Publication>> getClassSet()
public HashSet<Class<? extends Publication>> getClassOffSet()
protected static void getMostRecentTextInHistoryVisitor(String[] textAndMode, QueryHandler qh)
textAndMode
- MUST be an allocated array of String[2] that will be
filled with the text and mode if available.protected String[] getMostRecentTextAndModeInHistory()
public void addHighlightAttributes(javax.servlet.http.HttpServletRequest request)
request
- the current requestpublic void clearHighlightAttributes(javax.servlet.http.HttpServletRequest request)
request
- the current requestpublic void setMode(String m)
m
- a string representing the mode to use, from one of those values :
The specified string will be kept only if choosen from thoses values.public String getMode()
setMode(String)
public boolean isModeAll()
getMode()
equals TEXT_MODE_ALL_WORDS
, false otherwise.public boolean isModeAny()
getMode()
equals TEXT_MODE_ANY_WORD
, false otherwise.public boolean isModeExact()
getMode()
equals TEXT_MODE_EXACT
, false otherwise.public boolean isModeAdvanced()
getMode()
equals TEXT_MODE_ADVANCED
, false otherwise.public void setText(String text)
null
.
The specified text will be search in publications/categories/archives/files
depending on other parameters of this query, see setSearchInPub(boolean)
,
setCatName(boolean)
.
The specified text will be search in various way depending on the search
mode, see setMode(String)
for more information.
text
- a String to be searchedpublic String getText()
public void setTextSearch(boolean textSearch)
false
.
The changing behavior occurs when setting the text to null or an
empty string : if set to true
, the query will returns
an empty result set, if set to false
the query will be
performed with other parameters.
textSearch
- true
to indicate that this query is a
text search, false
otherwise.public boolean getTextSearch()
setTextSearch(boolean)
public boolean getCatName()
public void setCatName(boolean v)
public boolean getExactCat()
public void setExactCat(boolean v)
public boolean getSearchInPub()
public void setSearchInPub(boolean v)
public boolean getSearchInFiles()
public void setSearchInFiles(boolean v)
public boolean getSearchInDB()
public void setSearchInDB(boolean v)
public String[] getCids()
public void setCids(String[] v)
public String[] getCidsOff()
public void setCidsOff(String[] v)
public String[] getMids()
public void setMids(String[] v)
public String[] getMidsOff()
public void setMidsOff(String[] v)
public String[] getGids()
public void setGids(String[] v)
public String[] getGidsOff()
public void setGidsOff(String[] v)
public String[] getPortalIds()
public void setPortalIds(String[] v)
public Date getBeginDate()
public void setBeginDate(Date v)
public void setBeginDateW3c(String dateW3c)
dateW3c
- a date formatted using W3C format, see
DateUtil.parseW3cDate(String)
for more information on this format.setBeginDate(Date)
public Date getEndDate()
public void setEndDate(Date v)
public void setEndDateW3c(String dateW3c)
dateW3c
- a date formatted using W3C format, see
DateUtil.parseW3cDate(String)
for more information on this format.setEndDate(Date)
public int getBeginDay()
public void setBeginDay(int v)
public int getBeginMonth()
public void setBeginMonth(int v)
public int getBeginYear()
public void setBeginYear(int v)
public int getEndDay()
public void setEndDay(int v)
public int getEndMonth()
public void setEndMonth(int v)
public int getEndYear()
public void setEndYear(int v)
public String getDateType()
public void setDateType(String v)
public void setCatMode(String v)
v
- public String getCatMode()
public int getDateSinceInt()
public void setDateSince(String v)
public String getHist()
public void setHist(String v)
public int getHistLevel()
public void setHistLevel(int v)
public String getSort()
public void setSort(String sort)
public boolean getReverse()
public void setReverse(boolean v)
public String[] getTypes()
public void setTypes(String[] types)
public String[] getTypesOff()
public void setTypesOff(String[] typesOff)
public boolean getExactType()
public void setExactType(boolean v)
public String[] getRatings()
This method returns the original value defined with the setter setRatings(String[])
,
use getIntRatings()
to retrieve the resolved rating values as an int array.
getIntRatings()
public void setRatings(String[] ratings)
ratings
- an array of String, each string representing a rating value (int) to be searched forpublic int[] getIntRatings()
public String[] getPstatus()
This method returns the original value defined with the setter setPstatus(String[])
,
use getIntPstatus()
to retrieve the resolved pstatus values as an int array.
getIntPstatus()
public void setPstatus(String[] pstatus)
pstatus
- an array of String, each string representing a pstatus value (int) to be searched for
empty values in the array are ignored, if given array is null, pstatus search is reset.public int[] getIntPstatus()
public boolean getCheckPstatus()
public void setCheckPstatus(boolean v)
public String[] getLangs()
public void setLangs(String[] v)
v
- Value to assign to langs.public boolean getReplaceFileDoc()
public void setReplaceFileDoc(boolean v)
public String[] getUnresolvedLangs()
public String[] getSearchedFields()
public void setSearchedFields(String[] searchedFields)
searchedFields
- an array of lucene field name in which to do the
text search. if null or empty will use default behavior.public void setAbility(String ability)
ability
- an ability choosen from values returned by
PortalElement.getAllAbilities()
, or
"noabilities"
for portlet without any ability, or
"hasabilities"
for portlet with any ability.public String getAbility()
public int getStart()
public void setStart(int start)
public int getPageSize()
public void setPageSize(int pageSize)
public boolean getPagerAll()
public void setPagerAll(boolean pagerAll)
public List<String> getHistoryList()
public void setHistoryList(List<String> historyList)
historyList
- public void setDocumentKinds(String[] kinds)
kinds
- an array of document kind (e.g "pdf", "image", "spreadsheet", ...)public String[] getDocumentKinds()
public static Map<String,String> getDocumentKindsGroupMap(String userLang)
userLang
- the ISO-639 language code in which to retrieve labels
public static Map<String,String> getDocumentKindsMap(String userLang, String kindGroup)
userLang
- the ISO-639 language code in which to retrieve labelskindGroup
- document kind group as retrieve in key of map returned by getDocumentKindsGroupMap(String)
public static List<String> getContentTypesFromDocumentKind(String kind)
kind
- a document kind, as retrieved by getDocumentKindsMap(String, String)
public boolean isHybridSearch()
public static Class<? extends Publication> getTypesCommonSuperClass(QueryHandler... queryHandlers)
Eg :
assertEquals(Publication.class, QueryHandler.getTypesCommonSuperClass((QueryHandler[]) null)); assertEquals(Article.class, QueryHandler.getTypesCommonSuperClass(new QueryHandler("types=Article"))); assertEquals(Content.class, QueryHandler.getTypesCommonSuperClass(new QueryHandler("types=Article&types=SmallNews"))); assertEquals(AbstractPortletSkinable.class, QueryHandler.getTypesCommonSuperClass(new QueryHandler("types=PortletJsp&types=PortletQueryForeachDetail"))); assertEquals(Publication.class, QueryHandler.getTypesCommonSuperClass(new QueryHandler("types=Article&types=PortletJsp")));
queryHandlers
- one or several QueryHandler which will be used to extract the common super class of the specified types parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |