@Deprecated public class LogExceptionUserTemplateDelegator<T extends Writer> extends UserTemplate<T>
Modifier and Type | Field and Description |
---|---|
private UserTemplate<T> |
delegate
Deprecated.
|
private static Logger |
log
Deprecated.
|
DEFAULT_ENCODING, DEFAULT_MIMETYPE
Constructor and Description |
---|
LogExceptionUserTemplateDelegator(UserTemplate<T> delegate)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Context |
createContext()
Deprecated.
Creates a new context suitable for this template.
|
void |
error(Context context,
T writer)
Deprecated.
Render the error message for a result set.
|
void |
footer(Context context,
T writer)
Deprecated.
Render the result set footer.
|
String |
getBoldCloseTag()
Deprecated.
|
String |
getBoldOpenTag()
Deprecated.
|
(package private) UserTemplate<T> |
getDelegate()
Deprecated.
|
String |
getEncoding()
Deprecated.
Returns the text encoding
|
String |
getMimeType()
Deprecated.
Returns the text MIME
|
String |
getName()
Deprecated.
|
String |
getSeparatorTag()
Deprecated.
|
String |
getSummaryClass()
Deprecated.
Type safe accessor to get the default document summary class for this
template set.
|
Template<T> |
getTemplate(String templateName)
Deprecated.
Returns the selected template
|
private void |
handleException(Exception e)
Deprecated.
End expanded template.
|
void |
header(Context context,
T writer)
Deprecated.
Begin expanded template for
header, footer, hit, hitFooter, error, noHits, queryContext,
Thanks java, for giving me the opportunely to use copy-paste
|
void |
hit(Context context,
T writer)
Deprecated.
Render a single top level hit.
|
void |
hitFooter(Context context,
T writer)
Deprecated.
Render a footer for a single top level hit.
|
boolean |
isDefaultTemplateSet()
Deprecated.
For internal use only
TODO: get rid of this method *
|
void |
noHits(Context context,
T writer)
Deprecated.
Invoked when the result set has no hits.
|
void |
queryContext(Context context,
T writer)
Deprecated.
Override this to add custom rendering for the query context of the result.
|
void |
setHighlightTags(String start,
String end,
String sep)
Deprecated.
Sets the highligting marks for this template
|
void |
setSummaryClass(String summaryClass)
Deprecated.
Set the default summary class to use with this template.
|
void |
setTemplate(String templateName,
Template<? extends Writer> template)
Deprecated.
Sets the selected template
|
void |
setTemplateNotNull(String templateName,
Template<? extends Writer> template)
Deprecated.
Sets the selected template
|
T |
wrapWriter(Writer writer)
Deprecated.
This is called once before each result is rendered using this template.
|
dumpAndXMLQuoteUTF8, dumpBytes
getRequestedEncoding
private static Logger log
private final UserTemplate<T extends Writer> delegate
public LogExceptionUserTemplateDelegator(UserTemplate<T> delegate)
public Context createContext()
UserTemplate
createContext
in class UserTemplate<T extends Writer>
public T wrapWriter(Writer writer)
UserTemplate
wrapWriter
in class UserTemplate<T extends Writer>
public boolean isDefaultTemplateSet()
UserTemplate
isDefaultTemplateSet
in class UserTemplate<T extends Writer>
public String getSummaryClass()
GenericTemplateSet
getSummaryClass
in class GenericTemplateSet
public String getBoldOpenTag()
getBoldOpenTag
in class GenericTemplateSet
public String getBoldCloseTag()
getBoldCloseTag
in class GenericTemplateSet
public String getSeparatorTag()
getSeparatorTag
in class GenericTemplateSet
public void setSummaryClass(String summaryClass)
GenericTemplateSet
setSummaryClass
in class GenericTemplateSet
public void setHighlightTags(String start, String end, String sep)
GenericTemplateSet
setHighlightTags
in class GenericTemplateSet
start
- the highlingting start markend
- the highlingting end marksep
- the highlingting separator markpublic String getName()
getName
in class GenericTemplateSet
public String getMimeType()
GenericTemplateSet
getMimeType
in class GenericTemplateSet
public String getEncoding()
GenericTemplateSet
getEncoding
in class GenericTemplateSet
public Template<T> getTemplate(String templateName)
GenericTemplateSet
getTemplate
in class GenericTemplateSet
public void setTemplate(String templateName, Template<? extends Writer> template)
GenericTemplateSet
setTemplate
in class GenericTemplateSet
public void setTemplateNotNull(String templateName, Template<? extends Writer> template)
GenericTemplateSet
setTemplateNotNull
in class GenericTemplateSet
public void header(Context context, T writer) throws IOException
header
in class UserTemplate<T extends Writer>
context
- wrapper which will contain, among other thing, the result
set instancewriter
- the destination for rendering the resultIOException
- may be propagated from the writerpublic void footer(Context context, T writer) throws IOException
UserTemplate
The result set is available in the context object under the name "result".
footer
in class UserTemplate<T extends Writer>
context
- wrapper which will contain, among other thing, the result
set instancewriter
- the destination for rendering the resultIOException
- may be propagated from the writerpublic void hit(Context context, T writer) throws IOException
UserTemplate
The result set is available in the context object under the name "result". The hit itself as "hit", the index of the hit as "hitno", and all the fields under their normal names.
hit
in class UserTemplate<T extends Writer>
context
- wrapper which will contain, among other thing, the hit
instancewriter
- the destination for rendering the hitIOException
- may be propagated from the writerpublic void hitFooter(Context context, T writer) throws IOException
UserTemplate
The result set is available in the context object under the name "result". The hit itself as "hit", the index of the hit as "hitno", and all the fields under their normal names.
hitFooter
in class UserTemplate<T extends Writer>
context
- wrapper which will contain, among other thing, the hit
instancewriter
- the destination for rendering the hitIOException
- may be propagated from the writerpublic void error(Context context, T writer) throws IOException
UserTemplate
The result set is available in the context object under the name "result".
error
in class UserTemplate<T extends Writer>
context
- wrapper which will contain, among other thing, main error
and result set instances.writer
- the destination for rendering the hitIOException
- may be propagated from the writerpublic void noHits(Context context, T writer) throws IOException
UserTemplate
The result set is available in the context object under the name "result".
noHits
in class UserTemplate<T extends Writer>
context
- wrapper which will contain, among other thing, the result
set instancewriter
- the destination for rendering the hitIOException
- may be propagated from the writerpublic void queryContext(Context context, T writer) throws IOException
UserTemplate
The result set is available in the context object under the name "result". The query context is retrieved from the result by calling result.getQuery.getContext(false)
queryContext
in class UserTemplate<T extends Writer>
context
- wrapper which will contain, among other things, the result
set instancewriter
- the destination for rendering the hitIOException
- may be propagated from the writerprivate void handleException(Exception e) throws IOException
IOException
UserTemplate<T> getDelegate()
Copyright © 2018. All rights reserved.