Class ViewHelper

java.lang.Object
org.codelibs.fess.helper.ViewHelper

public class ViewHelper extends Object
  • Field Details

    • SCREEN_WIDTH

      protected static final String SCREEN_WIDTH
      See Also:
    • TABLET_WIDTH

      protected static final int TABLET_WIDTH
      See Also:
    • CONTENT_DISPOSITION

      protected static final String CONTENT_DISPOSITION
      See Also:
    • HL_CACHE

      protected static final String HL_CACHE
      See Also:
    • QUERIES

      protected static final String QUERIES
      See Also:
    • CACHE_MSG

      protected static final String CACHE_MSG
      See Also:
    • 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:
    • 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
    • pageCacheMap

      protected final Map<String,String> pageCacheMap
    • initFacetParamMap

      protected final Map<String,String> initFacetParamMap
    • initGeoParamMap

      protected final Map<String,String> initGeoParamMap
    • facetQueryViewList

      protected final List<FacetQueryView> facetQueryViewList
    • cacheTemplateName

      protected String cacheTemplateName
    • escapedHighlightPre

      protected String escapedHighlightPre
    • escapedHighlightPost

      protected String escapedHighlightPost
    • highlightTerminalCharSet

      protected Set<Integer> highlightTerminalCharSet
    • actionHook

      protected ViewHelper.ActionHook actionHook
    • inlineMimeTypeSet

      protected final Set<String> inlineMimeTypeSet
    • 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
  • Constructor Details

    • ViewHelper

      public ViewHelper()
  • Method Details

    • init

      @PostConstruct public void init()
    • getContentTitle

      public String getContentTitle(Map<String,Object> document)
    • getQuerySet

      protected org.dbflute.optional.OptionalThing<Set<String>> getQuerySet()
    • getContentDescription

      public String getContentDescription(Map<String,Object> document)
    • escapeHighlight

      protected String escapeHighlight(String text)
    • removeHighlightTag

      protected String removeHighlightTag(String str)
    • createHighlightInfo

      public HighlightInfo createHighlightInfo()
    • updateHighlightInfo

      protected void updateHighlightInfo(HighlightInfo highlightInfo, int width)
    • getUrlLink

      public String getUrlLink(Map<String,Object> document)
    • updateFileProtocol

      protected String updateFileProtocol(String url)
    • appendQueryParameter

      protected String appendQueryParameter(Map<String,Object> document, String url)
    • appendHTMLSearchWord

      protected String appendHTMLSearchWord(Map<String,Object> document, String url)
    • appendPDFSearchWord

      protected String appendPDFSearchWord(Map<String,Object> document, String url)
    • getPagePath

      public String getPagePath(String page)
    • createCacheContent

      public String createCacheContent(Map<String,Object> doc, String[] queries)
    • replaceHighlightQueries

      protected String replaceHighlightQueries(String cache, String[] queries)
    • getSitePath

      public Object getSitePath(Map<String,Object> docMap)
    • 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.opensearch.search.fetch.subphase.highlight.HighlightField highlightField)
    • createTextFragmentsByHighlight

      public ViewHelper.TextFragment[] createTextFragmentsByHighlight(org.opensearch.search.fetch.subphase.highlight.HighlightField[] fields)
    • createTextFragmentsByQuery

      public ViewHelper.TextFragment[] createTextFragmentsByQuery()
    • isUseSession

      public boolean isUseSession()
    • setUseSession

      public void setUseSession(boolean useSession)
    • addInitFacetParam

      public void addInitFacetParam(String key, String value)
    • getInitFacetParamMap

      public Map<String,String> getInitFacetParamMap()
    • addInitGeoParam

      public void addInitGeoParam(String key, String value)
    • getInitGeoParamMap

      public Map<String,String> getInitGeoParamMap()
    • 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)