Package sk.iway.iwcm.doc
Class SearchAction
java.lang.Object
sk.iway.iwcm.doc.SearchAction
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 Summary
Modifier and TypeMethodDescriptionstatic StringaddInputParamsSQL(jakarta.servlet.http.HttpServletRequest request) Vrati SQL prikaz pre pridanie parametrov field_a, field_b...static intaddInputParamsSQL(jakarta.servlet.http.HttpServletRequest request, PreparedStatement ps, int psIndex) Prida parametre do PreparedStatementustatic Stringstatic intaddInputParamsSQL(SearchActionInput input, PreparedStatement ps, int psIndex) static booleancontainsIgnoreHtml(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 CardPayTBstatic String[]Deprecated.- use SearchTools.getCheckInputParamsstatic StringgetInputParamMode(String name, jakarta.servlet.http.HttpServletRequest request) static StringgetInputParamMode(String name, SearchActionInput input) protected static StringgetParamAttribute(String name, jakarta.servlet.http.HttpServletRequest request, String defaultValue) protected static StringgetParamAttribute(String name, SearchActionInput input, String defaultValue) protected static StringgetParamAttributeUnsafe(String name, jakarta.servlet.http.HttpServletRequest request, String defaultValue) Vrati parameter, alebo atribut bez escapovania zlych hodnot, je mozne nastavit len za pouzitia PreparedStatementprotected static StringgetParamAttributeUnsafe(String name, SearchActionInput input, String defaultValue) static StringgetTextToFind(jakarta.servlet.http.HttpServletRequest request) Vrati komplet vsetky zadane texty pouzite pre highlightstatic StringgetTextToFind(SearchActionInput input) static booleanhasInputParams(jakarta.servlet.http.HttpServletRequest request) Vrati true, ak niektory z dodatocnych parametrov nie je prazdnystatic booleanhasInputParams(SearchActionInput input) static StringhtmlToPlain(String html) Deprecated.- use SearchTools.htmlToPlainprotected static List<LabelValueDetails>preparePages(int perPage, int index, int totalResults, String paramsLink, String searchAction) protected static voidpreparePages(jakarta.servlet.http.HttpServletRequest request, int perPage, int index, int totalResults, String paramsLink, String searchAction) static StringremoveCommands(String html) Deprecated.- use SearchTools.removeCommandsstatic Stringsearch(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) static SearchActionOutputsearch(SearchActionInput input) static booleanshouldDoQuickSnippet(SearchDetails doc, boolean fastSnippet) static booleanshouldDoQuickSnippet(SearchDetails doc, jakarta.servlet.http.HttpServletRequest request) Vrati true ak je pre danu stranku lepsie pouzit rychle generovanie snippetu
-
Method Details
-
search
public static String search(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) -
search
-
preparePages
-
preparePages
protected static List<LabelValueDetails> preparePages(int perPage, int index, int totalResults, String paramsLink, String searchAction) -
htmlToPlain
Deprecated.- use SearchTools.htmlToPlainDeprecated, pouzite priamo SearchTools.htmlToPlain prevod HTML do plain textu- Parameters:
html- Description of the Parameter- Returns:
- Description of the Return Value
-
removeCommands
Deprecated.- use SearchTools.removeCommandsOdstrani z HTML kodu riadiace bloky typu !INCLUDE(...)!, !PARAM(...)!- Parameters:
html-- Returns:
-
getParamAttribute
-
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
Vrati SQL prikaz pre pridanie parametrov field_a, field_b... (ak su zadane)- Parameters:
request-- Returns:
-
addInputParamsSQL
-
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
-
getInputParamMode
public static String getInputParamMode(String name, jakarta.servlet.http.HttpServletRequest request) - Parameters:
name-request-- Returns:
-
getInputParamMode
-
getTextToFind
Vrati komplet vsetky zadane texty pouzite pre highlight- Parameters:
request-- Returns:
-
getTextToFind
-
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
-
containsIgnoreHtml
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.- use SearchTools.getCheckInputParams- Returns:
-