📄 pagesearcher.java
字号:
//// ____.// __/\ ______| |__/\. _______// __ .____| | \ | +----+ \// _______| /--| | | - \ _ | : - \_________// \\______: :---| : : | : | \________>// |__\---\_____________:______: :____|____:_____\// /_____|//// . . . i n j a h i a w e t r u s t . . .////////package org.jahia.services.search;import org.jahia.params.*; // ParamBeanimport org.jahia.registries.*; // JahiaRegistriesimport org.jahia.exceptions.*;import org.jahia.data.search.JahiaSearchResult;/** * Handle pages search. * The result for this searcher is an instance of JahiaSearchResult and is a vector of matching pages. * * @author Khue Nguyen <a href="mailto:khue@jahia.org">khue@jahia.org</a> */public class PageSearcher extends JahiaSearcher { private static final String CLASS_NAME = PageSearcher.class.getName(); //-------------------------------------------------------------------------- /** * Constructor * */ public PageSearcher() { } //-------------------------------------------------------------------------- /** * Perform the search for a given query as String. * The expected result is a JahiaSearchResult object containing a vector of matching pages. * * @param String query, a valid query. * @param ParamBean jParams, the param bean. * @return JahiaSearchResult result, the expected result as an instance of JahiaSearchResult object */ public JahiaSearchResult search(String query, ParamBean jParams) throws JahiaException { JahiaSearchResult result = null; // Must set the query first. setQuery(query); // Perform the search. ServicesRegistry sReg = ServicesRegistry.getInstance(); result = sReg.getJahiaSearchService().search(this,jParams); // Store the result. setResult(result); return result; } //-------------------------------------------------------------------------- /** * Return the searcher name which value is JahiaSearcher.PAGE_SEARCHER. * * The search service must return a result of JahiaSearchResult type for this searcher. * * @return String name, the searcher name. */ public String getName() { return this.PAGE_SEARCHER; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -