|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts2.dispatcher.StrutsResultSupport org.apache.struts2.views.xdocreport.AbstractXDocReportResult
public abstract class AbstractXDocReportResult
Abstract class for manage Struts2 Result with XDocReport to generate odt, docx report by using odt, docx document and convert it to another format like PDF/XHTML.
Field Summary | |
---|---|
protected static String |
ACTION_KEY
|
static String |
LAST_MODIFIED
|
Fields inherited from class org.apache.struts2.dispatcher.StrutsResultSupport |
---|
DEFAULT_PARAM |
Fields inherited from interface org.apache.struts2.StrutsStatics |
---|
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_ACTION_TAG_INVOCATION, STRUTS_PORTLET_CONTEXT |
Constructor Summary | |
---|---|
AbstractXDocReportResult()
|
Method Summary | |
---|---|
protected IURIResolver |
createWEBURIResolver(IXDocReport report,
String converterId,
String finalLocation,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected void |
disableHTTPResponseCache(javax.servlet.http.HttpServletResponse response)
Disable cache HTTP hearder. |
protected void |
doExecute(String finalLocation,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected void |
doProcessReport(IXDocReport report,
IContext context,
String finalLocation,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected void |
doProcessReportWithConverter(IXDocReport report,
IContext context,
Options options,
String finalLocation,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected String |
getContentDisposition(String fileName)
|
protected String |
getContentDisposition(String sourceFileName,
MimeMapping mimeMapping,
javax.servlet.http.HttpServletRequest request)
|
String |
getConverter()
Returns the converter to use (according the JAR which is added in the classpath, values are PDF_ITEXT|XHTML_XWPF). |
protected String |
getConverter(com.opensymphony.xwork2.ActionInvocation invocation)
|
String |
getDownload()
Returns true if report must be downloaded (generate Content-Disposition:"attachment; filename... in the HTTP Header) and false otherwise. |
String[] |
getExpressions()
|
String[] |
getFieldsAsList()
|
protected FieldsMetadata |
getFieldsMetadata(IXDocReport report,
String location,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected String |
getLocation(String finalLocation,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected Options |
getOptionsConverter(IXDocReport report,
String finalLocation,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected IXDocReport |
getReport(XDocReportRegistry registry,
String location,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected String |
getReportId(String finalLocation)
|
protected File |
getSourceFile(String finalLocation,
LocationType locationType,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected InputStream |
getSourceStream(String finalLocation,
LocationType locationType,
File sourceFile,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected InputStream |
getSourceStreamFromClasspath(String path)
|
String |
getTemplateEngine()
Get Template engine to use (according the JAR which is added in the classpath, values are Velocity|Freemarker). |
protected String |
getTemplateEngine(com.opensymphony.xwork2.ActionInvocation invocation)
|
String |
getTrackLastModified()
Returns true if docx, odt file which is used to load must be tracked to observe the document change and false otherwise. |
protected String |
getValue(String value,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected XDocReportInitializerAware |
getXDocReportInitializerAware(Object action)
|
protected boolean |
isDisableHTTPResponseCache()
|
protected boolean |
isDownload(com.opensymphony.xwork2.ActionInvocation invocation)
|
protected boolean |
isGenerateContentDisposition(String reportId,
MimeMapping mimeMapping,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected boolean |
isTrackLastModified(com.opensymphony.xwork2.ActionInvocation invocation)
|
protected abstract void |
populateContext(IXDocReport report,
IContext context,
String finalLocation,
com.opensymphony.xwork2.ActionInvocation invocation)
|
protected void |
prepareHTTPResponse(String reportId,
String entryName,
com.opensymphony.xwork2.ActionInvocation invocation,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
prepareHTTPResponse(String reportId,
String finalLocation,
MimeMapping mimeMapping,
com.opensymphony.xwork2.ActionInvocation invocation,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
prepareOptions(Options options,
IXDocReport report,
String converterId,
String finalLocation,
com.opensymphony.xwork2.ActionInvocation invocation)
|
void |
setConverter(String converter)
Set the converter to use (according the JAR which is added in the classpath, values are static value PDF_ITEXT|XHTML_XWPF ). |
void |
setDownload(String download)
Set to true if report must be downloaded (generate Content-Disposition:"attachment; filename... in the HTTP Header) and false otherwise. |
void |
setExpression(String expression)
|
void |
setFieldAsList(String fieldAsList)
|
void |
setTemplateEngine(String templateEngine)
Set Template engine to use (according the JAR which is added in the classpath, values are Velocity|Freemarker). |
void |
setTrackLastModified(String trackLastModified)
Set to true if docx, odt file which is used to load must be tracked to observe the document change. |
Methods inherited from class org.apache.struts2.dispatcher.StrutsResultSupport |
---|
conditionalParse, execute, getLastFinalLocation, getLocation, setEncode, setLocation, setParse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String ACTION_KEY
public static final String LAST_MODIFIED
Constructor Detail |
---|
public AbstractXDocReportResult()
Method Detail |
---|
public void setTemplateEngine(String templateEngine)
templateEngine
- public String getTemplateEngine()
public void setConverter(String converter)
converter
- public String getConverter()
public void setExpression(String expression)
expression
- public String[] getExpressions()
public void setTrackLastModified(String trackLastModified)
trackLastModified
- public String getTrackLastModified()
public void setDownload(String download)
download
- public String getDownload()
public void setFieldAsList(String fieldAsList)
public String[] getFieldsAsList()
protected void doExecute(String finalLocation, com.opensymphony.xwork2.ActionInvocation invocation) throws Exception
doExecute
in class org.apache.struts2.dispatcher.StrutsResultSupport
Exception
protected IXDocReport getReport(XDocReportRegistry registry, String location, com.opensymphony.xwork2.ActionInvocation invocation) throws javax.servlet.ServletException, IOException
registry
- finalLocation
- invocation
-
javax.servlet.ServletException
IOException
protected boolean isTrackLastModified(com.opensymphony.xwork2.ActionInvocation invocation)
protected boolean isDownload(com.opensymphony.xwork2.ActionInvocation invocation)
protected String getLocation(String finalLocation, com.opensymphony.xwork2.ActionInvocation invocation)
protected String getTemplateEngine(com.opensymphony.xwork2.ActionInvocation invocation)
protected String getValue(String value, com.opensymphony.xwork2.ActionInvocation invocation)
protected String getReportId(String finalLocation)
protected InputStream getSourceStream(String finalLocation, LocationType locationType, File sourceFile, com.opensymphony.xwork2.ActionInvocation invocation) throws IOException
IOException
protected File getSourceFile(String finalLocation, LocationType locationType, com.opensymphony.xwork2.ActionInvocation invocation)
protected InputStream getSourceStreamFromClasspath(String path)
protected FieldsMetadata getFieldsMetadata(IXDocReport report, String location, com.opensymphony.xwork2.ActionInvocation invocation)
protected void doProcessReport(IXDocReport report, IContext context, String finalLocation, com.opensymphony.xwork2.ActionInvocation invocation) throws XDocReportException, IOException
report
- context
- options
- finalLocation
- invocation
-
IOException
XDocReportException
protected void doProcessReportWithConverter(IXDocReport report, IContext context, Options options, String finalLocation, com.opensymphony.xwork2.ActionInvocation invocation) throws XDocConverterException, XDocReportException, IOException
report
- context
- finalLocation
- invocation
-
IOException
XDocReportException
XDocConverterException
protected Options getOptionsConverter(IXDocReport report, String finalLocation, com.opensymphony.xwork2.ActionInvocation invocation)
report
- request
-
protected String getConverter(com.opensymphony.xwork2.ActionInvocation invocation)
protected void prepareOptions(Options options, IXDocReport report, String converterId, String finalLocation, com.opensymphony.xwork2.ActionInvocation invocation)
protected IURIResolver createWEBURIResolver(IXDocReport report, String converterId, String finalLocation, com.opensymphony.xwork2.ActionInvocation invocation)
protected void prepareHTTPResponse(String reportId, String finalLocation, MimeMapping mimeMapping, com.opensymphony.xwork2.ActionInvocation invocation, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected boolean isGenerateContentDisposition(String reportId, MimeMapping mimeMapping, com.opensymphony.xwork2.ActionInvocation invocation)
protected void prepareHTTPResponse(String reportId, String entryName, com.opensymphony.xwork2.ActionInvocation invocation, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected boolean isDisableHTTPResponseCache()
protected String getContentDisposition(String sourceFileName, MimeMapping mimeMapping, javax.servlet.http.HttpServletRequest request)
protected String getContentDisposition(String fileName)
protected void disableHTTPResponseCache(javax.servlet.http.HttpServletResponse response)
response
- protected XDocReportInitializerAware getXDocReportInitializerAware(Object action)
protected abstract void populateContext(IXDocReport report, IContext context, String finalLocation, com.opensymphony.xwork2.ActionInvocation invocation) throws Exception
report
- finalLocation
- invocation
-
XDocReportException
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |