Class SearchAction

java.lang.Object
sk.iway.iwcm.doc.SearchAction

public class SearchAction extends Object
full text search, ((z databazy selektuje vzdy len (perpage+1) zaznamov (perpage==pocet zaznamov na stranku) ak posledny selektnuty zaznam != null tak to je signal ze este nie sme na konci databazi a teda mozeme zviraznit linku dalej>>> zvyraznovanie slov: v data_asc hladam vyskyt prveho slova vo words, => zvyraznim aj ostatne slova ktore sa zhoduju s words else do data_asc dam prvych EMPTYOUTPUT znakov ))
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    addInputParamsSQL(javax.servlet.http.HttpServletRequest request)
    Vrati SQL prikaz pre pridanie parametrov field_a, field_b...
    static int
    addInputParamsSQL(javax.servlet.http.HttpServletRequest request, PreparedStatement ps, int psIndex)
    Prida parametre do PreparedStatementu
    static boolean
    containsIgnoreHtml(String code, String searchTerm)
    Pokusi sa vyhladat vyraz v HTML kode tak, ze HTML kod odstrani a zrusi vsetky medzery Pre hladanie CardPayTB v html kode CardPayTB
    static String[]
    Deprecated.
    - use SearchTools.getCheckInputParams
    static String
    getInputParamMode(String name, javax.servlet.http.HttpServletRequest request)
     
    protected static String
    getParamAttribute(String name, javax.servlet.http.HttpServletRequest request, String defaultValue)
     
    protected static String
    getParamAttributeUnsafe(String name, javax.servlet.http.HttpServletRequest request, String defaultValue)
    Vrati parameter, alebo atribut bez escapovania zlych hodnot, je mozne nastavit len za pouzitia PreparedStatement
    static String
    getTextToFind(javax.servlet.http.HttpServletRequest request)
    Vrati komplet vsetky zadane texty pouzite pre highlight
    static boolean
    hasInputParams(javax.servlet.http.HttpServletRequest request)
    Vrati true, ak niektory z dodatocnych parametrov nie je prazdny
    static String
    Deprecated.
    - use SearchTools.htmlToPlain
    protected static void
    preparePages(javax.servlet.http.HttpServletRequest request, int perPage, int index, int totalResults, String paramsLink, String searchAction)
     
    static String
    Deprecated.
    - use SearchTools.removeCommands
    static String
    search(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     
    static boolean
    shouldDoQuickSnippet(SearchDetails doc, javax.servlet.http.HttpServletRequest request)
    Vrati true ak je pre danu stranku lepsie pouzit rychle generovanie snippetu

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SearchAction

      public SearchAction()
  • Method Details

    • search

      public static String search(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
    • preparePages

      protected static void preparePages(javax.servlet.http.HttpServletRequest request, int perPage, int index, int totalResults, String paramsLink, String searchAction)
    • htmlToPlain

      @Deprecated public static String htmlToPlain(String html)
      Deprecated.
      - use SearchTools.htmlToPlain
      Deprecated, pouzite priamo SearchTools.htmlToPlain prevod HTML do plain textu
      Parameters:
      html - Description of the Parameter
      Returns:
      Description of the Return Value
    • removeCommands

      @Deprecated public static String removeCommands(String html)
      Deprecated.
      - use SearchTools.removeCommands
      Odstrani z HTML kodu riadiace bloky typu !INCLUDE(...)!, !PARAM(...)!
      Parameters:
      html -
      Returns:
    • getParamAttribute

      protected static String getParamAttribute(String name, javax.servlet.http.HttpServletRequest request, String defaultValue)
    • getParamAttributeUnsafe

      protected static String getParamAttributeUnsafe(String name, javax.servlet.http.HttpServletRequest request, String defaultValue)
      Vrati parameter, alebo atribut bez escapovania zlych hodnot, je mozne nastavit len za pouzitia PreparedStatement
      Parameters:
      name -
      request -
      defaultValue -
      Returns:
    • addInputParamsSQL

      public static String addInputParamsSQL(javax.servlet.http.HttpServletRequest request)
      Vrati SQL prikaz pre pridanie parametrov field_a, field_b... (ak su zadane)
      Parameters:
      request -
      Returns:
    • addInputParamsSQL

      public static int addInputParamsSQL(javax.servlet.http.HttpServletRequest request, PreparedStatement ps, int psIndex) throws SQLException
      Prida parametre do PreparedStatementu
      Parameters:
      request -
      ps -
      Returns:
      Throws:
      SQLException
    • hasInputParams

      public static boolean hasInputParams(javax.servlet.http.HttpServletRequest request)
      Vrati true, ak niektory z dodatocnych parametrov nie je prazdny
      Parameters:
      request -
      Returns:
    • getInputParamMode

      public static String getInputParamMode(String name, javax.servlet.http.HttpServletRequest request)
      Parameters:
      name -
      request -
      Returns:
    • getTextToFind

      public static String getTextToFind(javax.servlet.http.HttpServletRequest request)
      Vrati komplet vsetky zadane texty pouzite pre highlight
      Parameters:
      request -
      Returns:
    • shouldDoQuickSnippet

      public static boolean shouldDoQuickSnippet(SearchDetails doc, javax.servlet.http.HttpServletRequest request)
      Vrati true ak je pre danu stranku lepsie pouzit rychle generovanie snippetu
      Parameters:
      doc -
      request -
      Returns:
    • containsIgnoreHtml

      public static boolean containsIgnoreHtml(String code, String searchTerm)
      Pokusi sa vyhladat vyraz v HTML kode tak, ze HTML kod odstrani a zrusi vsetky medzery Pre hladanie CardPayTB v html kode CardPayTB
      Parameters:
      code -
      searchTerm -
      Returns:
    • getCheckInputParams

      @Deprecated public static String[] getCheckInputParams()
      Deprecated.
      - use SearchTools.getCheckInputParams
      Returns: