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 ))
  • Method Details

    • search

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

      public static SearchActionOutput search(SearchActionInput input)
    • preparePages

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

      protected static List<LabelValueDetails> preparePages(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, jakarta.servlet.http.HttpServletRequest request, String defaultValue)
    • getParamAttribute

      protected static String getParamAttribute(String name, SearchActionInput input, String defaultValue)
    • getParamAttributeUnsafe

      protected static String getParamAttributeUnsafe(String name, jakarta.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:
    • getParamAttributeUnsafe

      protected static String getParamAttributeUnsafe(String name, SearchActionInput input, String defaultValue)
    • addInputParamsSQL

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

      public static String addInputParamsSQL(SearchActionInput input)
    • addInputParamsSQL

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

      public static int addInputParamsSQL(SearchActionInput input, PreparedStatement ps, int psIndex) throws SQLException
      Throws:
      SQLException
    • hasInputParams

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

      public static boolean hasInputParams(SearchActionInput input)
    • getInputParamMode

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

      public static String getInputParamMode(String name, SearchActionInput input)
    • getTextToFind

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

      public static String getTextToFind(SearchActionInput input)
    • shouldDoQuickSnippet

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

      public static boolean shouldDoQuickSnippet(SearchDetails doc, boolean fastSnippet)
    • 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: