|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opencms.jsp.CmsJspBean
org.opencms.jsp.CmsJspActionElement
org.opencms.frontend.templateone.CmsTemplateBase
org.opencms.frontend.templateone.CmsTemplateBean
org.opencms.frontend.templateone.CmsTemplateSearch
public class CmsTemplateSearch
Provides methods for the search result JSP page.
| Field Summary | |
|---|---|
static java.lang.String |
PARAM_SEARCHALL
Request parameter name for the search entire website flag. |
| Fields inherited from class org.opencms.frontend.templateone.CmsTemplateBase |
|---|
ATTRIBUTE_ORIGINAL_URI |
| Fields inherited from class org.opencms.jsp.CmsJspActionElement |
|---|
NOT_INITIALIZED |
| Constructor Summary | |
|---|---|
CmsTemplateSearch()
Empty constructor, required for every JavaBean. |
|
CmsTemplateSearch(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Constructor, with parameters. |
|
| Method Summary | |
|---|---|
java.lang.String |
buildSearchErrorMessages(org.opencms.search.CmsSearch search,
java.util.List results)
Builds the html to display error messages on the search result page. |
java.lang.String |
buildSearchHeadline()
Builds the html for the search result page headline. |
java.lang.String |
buildSearchLinks(org.opencms.search.CmsSearch search)
Builds the html for the links to previous and next search result pages. |
java.lang.String |
buildSearchResultList(java.util.List results)
Builds the html for the search result list for a single page. |
java.lang.String |
getFileIcon(java.lang.String fileName)
Returns the HTML of the file icon for the given resource name or an empty String if no icon can be found. |
java.lang.String |
getPageUri()
Returns the URI of the page calling the search result page. |
java.lang.String |
getSearchAllChecked()
Returns the "checked" attribute String if the user checked the "search all" checkbox. |
java.util.List |
getSearchResults(org.opencms.search.CmsSearch search)
Returns the list of search results depending on the search root and the form data. |
void |
includeWithPageUri(java.lang.String element)
Includes the specified template element with the page URI specified in the request parameter "uri". |
void |
init(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Initialize this bean with the current page context, request and response. |
boolean |
isSearchAll()
Returns true if the entire website should be searched. |
boolean |
isSearchAllDisplayed()
Returns true if the checkbox to search the entire website should be displayed. |
void |
setSearchAll(boolean searchAll)
Sets if the entire website should be searched. |
| Methods inherited from class org.opencms.frontend.templateone.CmsTemplateBase |
|---|
getOriginalUri, initUri, isUriChanged |
| Methods inherited from class org.opencms.jsp.CmsJspActionElement |
|---|
editable, editable, editable, editableManualClose, editableManualOpen, getContent, getContent, getMessages, getMessages, getMessages, getMessages, getNavigation, getNavigationUri, img, img, include, include, include, include, include, include, includeSilent, includeSilent, includeSilent, includeSilent, info, label, link, link, properties, properties, property, property, property, property, template, template, template, toAbsolute, user |
| Methods inherited from class org.opencms.jsp.CmsJspBean |
|---|
getCmsObject, getController, getJspContext, getMessage, getRequest, getRequestContext, getResponse, handleException, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PARAM_SEARCHALL
| Constructor Detail |
|---|
public CmsTemplateSearch()
public CmsTemplateSearch(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Use this constructor for the template.
context - the JSP page context objectreq - the JSP requestres - the JSP response| Method Detail |
|---|
public java.lang.String buildSearchErrorMessages(org.opencms.search.CmsSearch search,
java.util.List results)
If no error occurs, an empty String will be returned.
search - the search result object holding all necessary informationresults - the list of result objects to display
public java.lang.String buildSearchHeadline()
public java.lang.String buildSearchLinks(org.opencms.search.CmsSearch search)
search - the search result object holding all necessary information
public java.lang.String buildSearchResultList(java.util.List results)
results - the list of result objects to display
public java.lang.String getFileIcon(java.lang.String fileName)
fileName - the filename to check
public java.lang.String getPageUri()
public java.lang.String getSearchAllChecked()
public java.util.List getSearchResults(org.opencms.search.CmsSearch search)
Either returns the results of the entire website or of the search root.
search - the instanciated search object
public void includeWithPageUri(java.lang.String element)
throws javax.servlet.jsp.JspException
After inclusion, the request context URI is reset to the old value.
element - the element (template selector) to display from the target template
javax.servlet.jsp.JspException - if including the target fails
public void init(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
It is required to call one of the init() methods before you can use the instance of this bean.
init in class CmsTemplateBeancontext - the JSP page context objectreq - the JSP requestres - the JSP responsepublic boolean isSearchAll()
public boolean isSearchAllDisplayed()
public void setSearchAll(boolean searchAll)
searchAll - true if the entire website should be searched, otherwise false
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||