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
Modifier and TypeMethodDescriptionvoid
execute()
SeeEngine.execute()
for details.int
SeeEngine.getPageCount()
for details.byte[]
getPageData
(int page) SeeEngine.getPageData(int)
for details.getPromptField
(String name) SeeEngine.getPromptField(String)
for details.@Nonnull EngineStatistics
SeeEngine.getStatistics()
for details.void
setClientLocale
(@Nonnull Locale locale) SeeEngine.setClientLocale(Locale)
for details.void
setDocumentOutput
(DocumentOutput documentOutput) Set the output location for the rendered data.void
SeeEngine.setPrompt(String, int)
for details.void
SeeEngine.setPrompt(String, String)
for details.void
setUserProperties
(Properties props) SeeEngine.setUserProperties(Properties)
for details.void
SeeEngine.stop(String)
for details.void
stopAfterPage
(int maxPageNo) SeeEngine.stopAfterPage(int)
for details.
-
Method Details
-
setDocumentOutput
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
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
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
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
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
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
SeeEngine.execute()
for details.- Throws:
ReportException
- if Engine is not initialized or finished.- Since:
- 14.1
- See Also:
-
getPageCount
SeeEngine.getPageCount()
for details.- Returns:
- number of pages or chunks
- Throws:
ReportException
- If rendering the report encounters a problem- Since:
- 14.1
-
getPageData
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:
IllegalArgumentException
- if the page number is zero or negative.ReportException
- If rendering the page encounters a problem- Since:
- 14.1
-
getStatistics
SeeEngine.getStatistics()
for details.- Returns:
- the statistic
- Since:
- 14.1
-
stop
SeeEngine.stop(String)
for details.- Parameters:
message
- a message for the debug log.- Since:
- 14.1
-