org.loom.resolution
Class AutocompleteResolution
java.lang.Object
org.loom.resolution.AbstractHttpResolution
org.loom.resolution.AutocompleteResolution
- All Implemented Interfaces:
- CacheableResolution, HttpResolution, Resolution
public class AutocompleteResolution
- extends AbstractHttpResolution
Returns an unordered list of autocompleter results highlighting the
match part in every result.
Methods inherited from class org.loom.resolution.AbstractHttpResolution |
addCookie, addCookie, addCookie, addDateHeader, addHeader, addIntHeader, containsHeader, getCacheControl, getCharset, getContentType, setCacheControl, setCharset, setContentType, setDateHeader, setDateHeaderIfNotPresent, setHeader, setHeaderIfNotPresent, setIntHeader, setIntHeaderIfNotPresent, setJsonHeader, writeHeaders |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutocompleteResolution
public AutocompleteResolution(java.lang.String highlightText)
AutocompleteResolution
public AutocompleteResolution(java.util.regex.Pattern highlightPattern,
java.lang.String highlightText)
add
public AutocompleteEntry add(java.lang.String value)
- Adds a new item to the results list
addAll
public void addAll(java.lang.Iterable<java.lang.String> strings)
- Adds every String inside a Collection
resolve
public void resolve(LoomServletRequest request,
LoomServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Description copied from interface:
Resolution
- Write the response contents
- Specified by:
resolve
in interface Resolution
- Specified by:
resolve
in class AbstractHttpResolution
- Parameters:
request
- the current request objectresponse
- the current response object
- Throws:
java.io.IOException
javax.servlet.ServletException
highlight
protected java.lang.String highlight(java.lang.String text)
getHighlightText
public java.lang.String getHighlightText()
getHighlightPattern
public java.util.regex.Pattern getHighlightPattern()
isSanitizeValues
public boolean isSanitizeValues()
setSanitizeValues
public void setSanitizeValues(boolean sanitizeValues)