Package com.inet.report
Interface ReportGenerator
-
- All Known Implementing Classes:
Engine
,EngineBundle
public interface ReportGenerator
Helper interface to use the same code for Engine and EngineBundle- Since:
- 14.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
execute()
SeeEngine.execute()
for details.int
getPageCount()
SeeEngine.getPageCount()
for details.byte[]
getPageData(int page)
SeeEngine.getPageData(int)
for details.PromptField
getPromptField(java.lang.String name)
SeeEngine.getPromptField(String)
for details.EngineStatistics
getStatistics()
SeeEngine.getStatistics()
for details.void
setClientLocale(java.util.Locale locale)
SeeEngine.setClientLocale(Locale)
for details.void
setDocumentOutput(DocumentOutput documentOutput)
Set the output location for the rendered data.void
setPrompt(java.lang.String prompt, int i)
SeeEngine.setPrompt(String, int)
for details.void
setPrompt(java.lang.String name, java.lang.String prompt)
SeeEngine.setPrompt(String, String)
for details.void
setUserProperties(java.util.Properties props)
SeeEngine.setUserProperties(Properties)
for details.void
stop(java.lang.String message)
SeeEngine.stop(String)
for details.void
stopAfterPage(int maxPageNo)
SeeEngine.stopAfterPage(int)
for details.
-
-
-
Method Detail
-
setDocumentOutput
void setDocumentOutput(DocumentOutput documentOutput)
Set the output location for the rendered data. By default the memory (heap) is used. It is also possible to store the data into the report cache or stream it directly to an OutputStream. This must be set before call of execute().- Parameters:
documentOutput
- The location for the data. This can be DocumentOutputStream or CachedOutput.- Since:
- 16.2
-
setUserProperties
void setUserProperties(java.util.Properties props) throws ReportException
SeeEngine.setUserProperties(Properties)
for details.- Parameters:
props
- The data to be set in a Properties object.- Throws:
ReportException
- if Engine is not initialized or finished.- Since:
- 14.1
-
setClientLocale
void setClientLocale(@Nonnull java.util.Locale locale) throws ReportException
SeeEngine.setClientLocale(Locale)
for details.- Parameters:
locale
- The locale to be used by the client- Throws:
ReportException
- if Engine is not initialized or finished.- Since:
- 14.1
-
stopAfterPage
void stopAfterPage(int maxPageNo)
SeeEngine.stopAfterPage(int)
for details.- Parameters:
maxPageNo
- The last page that should be rendered. 0 means "unlimited".- Since:
- 14.1
-
setPrompt
void setPrompt(java.lang.String name, java.lang.String prompt) throws ReportException
SeeEngine.setPrompt(String, String)
for details.- Parameters:
name
- the name of the parameter fieldprompt
- value for parameter field as String- Throws:
ReportException
- if Engine is not initialized or finished.- Since:
- 14.1
-
getPromptField
PromptField getPromptField(java.lang.String name) throws ReportException
SeeEngine.getPromptField(String)
for details.- Parameters:
name
- name of the prompt to fetch- Returns:
- PromptField by the given name in this Report, or null if none exists
- Throws:
ReportException
- if Engine is not initialized or finished.- Since:
- 14.1
-
setPrompt
void setPrompt(java.lang.String prompt, int i) throws ReportException
SeeEngine.setPrompt(String, int)
for details.- Parameters:
prompt
- value for parameter field ii
- index in the parameter list- Throws:
ReportException
- if Engine is not initialized or finished.- Since:
- 14.1
-
execute
void execute() throws ReportException
SeeEngine.execute()
for details.- Throws:
ReportException
- if Engine is not initialized or finished.- Since:
- 14.1
- See Also:
getPageData(int)
-
getPageCount
int getPageCount() throws ReportException
SeeEngine.getPageCount()
for details.- Returns:
- number of pages or chunks
- Throws:
ReportException
- If rendering the report encounters a problem- Since:
- 14.1
-
getPageData
byte[] getPageData(int page) throws ReportException
SeeEngine.getPageData(int)
for details.- Parameters:
page
- The number of the page. The first page is 1, the second is 2, ... . If the page number is bigger than the page count then null will be returned.- Returns:
- the binary data for the Java Viewer or the bytes of the exported file (page).
- Throws:
java.lang.IllegalArgumentException
- if the page number is zero or negative.ReportException
- If rendering the page encounters a problem- Since:
- 14.1
-
getStatistics
@Nonnull EngineStatistics getStatistics()
SeeEngine.getStatistics()
for details.- Returns:
- the statistic
- Since:
- 14.1
-
stop
void stop(java.lang.String message)
SeeEngine.stop(String)
for details.- Parameters:
message
- a message for the debug log.- Since:
- 14.1
-
-