Package org.codelibs.fess.helper
Class ViewHelper
- java.lang.Object
-
- org.codelibs.fess.helper.ViewHelper
-
public class ViewHelper extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classViewHelper.ActionHookstatic classViewHelper.TextFragment
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ViewHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFacetQueryView(FacetQueryView facetQueryView)voidaddInitFacetParam(String key, String value)voidaddInitGeoParam(String key, String value)voidaddInlineMimeType(String mimeType)protected StringappendHTMLSearchWord(Map<String,Object> document, String url)protected StringappendPDFSearchWord(Map<String,Object> document, String url)protected StringappendQueryParameter(Map<String,Object> document, String url)org.lastaflute.web.response.StreamResponseasContentResponse(Map<String,Object> doc)StringcreateCacheContent(Map<String,Object> doc, String[] queries)HighlightInfocreateHighlightInfo()StringcreateHighlightText(org.codelibs.fesen.search.fetch.subphase.highlight.HighlightField highlightField)ViewHelper.TextFragment[]createTextFragmentsByHighlight(org.codelibs.fesen.search.fetch.subphase.highlight.HighlightField[] fields)ViewHelper.TextFragment[]createTextFragmentsByQuery()protected StringescapeHighlight(String text)ViewHelper.ActionHookgetActionHook()FacetResponsegetCachedFacetResponse(String query)StringgetClientIp(javax.servlet.http.HttpServletRequest request)StringgetContentDescription(Map<String,Object> document)StringgetContentTitle(Map<String,Object> document)List<FacetQueryView>getFacetQueryViewList()Map<String,String>getInitFacetParamMap()Map<String,String>getInitGeoParamMap()StringgetPagePath(String page)protected org.dbflute.optional.OptionalThing<Set<String>>getQuerySet()ObjectgetSitePath(Map<String,Object> docMap)StringgetUrlLink(Map<String,Object> document)voidinit()booleanisUseSession()protected StringremoveHighlightTag(String str)protected StringreplaceHighlightQueries(String cache, String[] queries)voidsetActionHook(ViewHelper.ActionHook actionHook)voidsetCacheTemplateName(String cacheTemplateName)voidsetEncodeUrlLink(boolean encodeUrlLink)voidsetFacetCacheDuration(long facetCacheDuration)voidsetOriginalHighlightTagPost(String originalHighlightTagPost)voidsetOriginalHighlightTagPre(String originalHighlightTagPre)voidsetUrlLinkEncoding(String urlLinkEncoding)voidsetUseSession(boolean useSession)protected StringupdateFileProtocol(String url)protected voidupdateHighlightInfo(HighlightInfo highlightInfo, int width)protected org.lastaflute.web.response.StreamResponsewriteContent(String configId, String url, org.codelibs.fess.crawler.client.CrawlerClient client)protected voidwriteContentType(org.lastaflute.web.response.StreamResponse response, org.codelibs.fess.crawler.entity.ResponseData responseData)protected voidwriteFileName(org.lastaflute.web.response.StreamResponse response, org.codelibs.fess.crawler.entity.ResponseData responseData)protected voidwriteNoCache(org.lastaflute.web.response.StreamResponse response, org.codelibs.fess.crawler.entity.ResponseData responseData)
-
-
-
Field Detail
-
SCREEN_WIDTH
protected static final String SCREEN_WIDTH
- See Also:
- Constant Field Values
-
TABLET_WIDTH
protected static final int TABLET_WIDTH
- See Also:
- Constant Field Values
-
CONTENT_DISPOSITION
protected static final String CONTENT_DISPOSITION
- See Also:
- Constant Field Values
-
HL_CACHE
protected static final String HL_CACHE
- See Also:
- Constant Field Values
-
QUERIES
protected static final String QUERIES
- See Also:
- Constant Field Values
-
CACHE_MSG
protected static final String CACHE_MSG
- See Also:
- Constant Field Values
-
LOCAL_PATH_PATTERN
protected static final Pattern LOCAL_PATH_PATTERN
-
SHARED_FOLDER_PATTERN
protected static final Pattern SHARED_FOLDER_PATTERN
-
ELLIPSIS
protected static final String ELLIPSIS
- See Also:
- Constant Field Values
-
encodeUrlLink
protected boolean encodeUrlLink
-
urlLinkEncoding
protected String urlLinkEncoding
-
highlightedFields
protected String[] highlightedFields
-
originalHighlightTagPre
protected String originalHighlightTagPre
-
originalHighlightTagPost
protected String originalHighlightTagPost
-
highlightTagPre
protected String highlightTagPre
-
highlightTagPost
protected String highlightTagPost
-
useSession
protected boolean useSession
-
facetQueryViewList
protected final List<FacetQueryView> facetQueryViewList
-
cacheTemplateName
protected String cacheTemplateName
-
escapedHighlightPre
protected String escapedHighlightPre
-
escapedHighlightPost
protected String escapedHighlightPost
-
actionHook
protected ViewHelper.ActionHook actionHook
-
facetCache
protected com.google.common.cache.Cache<String,FacetResponse> facetCache
-
facetCacheDuration
protected long facetCacheDuration
-
textFragmentPrefixLength
protected int textFragmentPrefixLength
-
textFragmentSuffixLength
protected int textFragmentSuffixLength
-
textFragmentSize
protected int textFragmentSize
-
-
Method Detail
-
init
@PostConstruct public void init()
-
createHighlightInfo
public HighlightInfo createHighlightInfo()
-
updateHighlightInfo
protected void updateHighlightInfo(HighlightInfo highlightInfo, int width)
-
appendQueryParameter
protected String appendQueryParameter(Map<String,Object> document, String url)
-
appendHTMLSearchWord
protected String appendHTMLSearchWord(Map<String,Object> document, String url)
-
asContentResponse
public org.lastaflute.web.response.StreamResponse asContentResponse(Map<String,Object> doc)
-
writeContent
protected org.lastaflute.web.response.StreamResponse writeContent(String configId, String url, org.codelibs.fess.crawler.client.CrawlerClient client)
-
writeNoCache
protected void writeNoCache(org.lastaflute.web.response.StreamResponse response, org.codelibs.fess.crawler.entity.ResponseData responseData)
-
writeFileName
protected void writeFileName(org.lastaflute.web.response.StreamResponse response, org.codelibs.fess.crawler.entity.ResponseData responseData)
-
writeContentType
protected void writeContentType(org.lastaflute.web.response.StreamResponse response, org.codelibs.fess.crawler.entity.ResponseData responseData)
-
getClientIp
public String getClientIp(javax.servlet.http.HttpServletRequest request)
-
getCachedFacetResponse
public FacetResponse getCachedFacetResponse(String query)
-
createHighlightText
public String createHighlightText(org.codelibs.fesen.search.fetch.subphase.highlight.HighlightField highlightField)
-
createTextFragmentsByHighlight
public ViewHelper.TextFragment[] createTextFragmentsByHighlight(org.codelibs.fesen.search.fetch.subphase.highlight.HighlightField[] fields)
-
createTextFragmentsByQuery
public ViewHelper.TextFragment[] createTextFragmentsByQuery()
-
isUseSession
public boolean isUseSession()
-
setUseSession
public void setUseSession(boolean useSession)
-
addFacetQueryView
public void addFacetQueryView(FacetQueryView facetQueryView)
-
getFacetQueryViewList
public List<FacetQueryView> getFacetQueryViewList()
-
addInlineMimeType
public void addInlineMimeType(String mimeType)
-
getActionHook
public ViewHelper.ActionHook getActionHook()
-
setActionHook
public void setActionHook(ViewHelper.ActionHook actionHook)
-
setEncodeUrlLink
public void setEncodeUrlLink(boolean encodeUrlLink)
-
setUrlLinkEncoding
public void setUrlLinkEncoding(String urlLinkEncoding)
-
setOriginalHighlightTagPre
public void setOriginalHighlightTagPre(String originalHighlightTagPre)
-
setOriginalHighlightTagPost
public void setOriginalHighlightTagPost(String originalHighlightTagPost)
-
setCacheTemplateName
public void setCacheTemplateName(String cacheTemplateName)
-
setFacetCacheDuration
public void setFacetCacheDuration(long facetCacheDuration)
-
-