|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.report.io.Builder
public class Builder
Builder is used to export a report to a file or import a report from a file. A Builder can be created by calling one of the getBuilder() method. To export a report, call the write() method. To import a report, call the read() method.
| Field Summary | |
|---|---|
static int |
BURST_REPORT
This format is for saving a bursting file into archive. |
static int |
CSV
Comma separated report tables. |
static int |
EXCEL
Excel output match layout. |
static int |
EXCEL_DATA
Excel output for data editing. |
static int |
EXCEL_SHEET
Excel output with no pagination. |
static int |
GENERATED_REPORT
Generated report output. |
static int |
HTML
HTML output. |
static int |
HTML_BUNDLE
HTML_BUNDLE output, in which all the images in the HTML are exported into a ZIP file together with the html page. |
static int |
HTML_BUNDLE_NO_PAGINATION
Bundled HTML output without pagination. |
static int |
HTML_NO_PAGINATION
HTML output without pagination. |
static int |
HTML_NO_PAGINATION_EMAIL
Non-Paginated HTML for Inline Email |
static int |
PDF
Portable Document Format (PDF) output. |
static int |
POSTSCRIPT
Postscript output. |
static int |
POWERPOINT
Powerpoint output. |
static int |
REPORT
Report XML format. |
static int |
RTF
Rich Text Format (RTF) output. |
static int |
RTF_LAYOUT
Rich Text Format (RTF) output. |
static int |
SVG
SVG output. |
static int |
TEMPLATE
Report template format. |
static int |
TEXT
Pure text output. |
static int |
USER_DEFINED
All user defined export types must be identified with an ID of this value (5000) or greater. |
static int |
XML
XML output. |
| Constructor Summary | |
|---|---|
Builder(Formatter format)
Create a builder with a formatter. |
|
Builder(Parser parser)
Create a builder with a parser. |
|
| Method Summary | |
|---|---|
static URL |
getBaseURL()
Get the base url. |
static Builder |
getBuilder(int type,
InputStream input0)
Get a builder object for importing a report. |
static Builder |
getBuilder(int type,
InputStream input0,
String sourceName)
Get a builder object for importing a report. |
static Builder |
getBuilder(int type,
OutputStream output)
Get a builder object. |
static Builder |
getBuilder(int type,
OutputStream output,
Object data)
Get a builder object for exporting a report. |
static Vector |
getEmbeddedStyles()
Get the embedded style styles in the report. |
static ExportType |
getExportType(int type)
Gets the export type descriptor for the specified format type ID. |
static String |
getFileExtension(int fmt)
Get the default file extension for an export format. |
static String |
getFormatOption(int type)
Get format option string. |
static String |
getFormatString(int type)
Get format string. |
Formatter |
getFormatter()
Get the formatter created in the builder. |
Generator |
getGenerator()
Get the generator created in the builder. |
Parser |
getParser()
Get the parser created in the builder. |
static int[] |
getSupportedExportTypes()
Gets the IDs of the export formats that are supported. |
static int |
getType(String typename)
Get the format type from a string. |
void |
initCache(inetsoft.report.internal.paging.ReportCache cache,
Object repId)
Set report cache for generator. |
static boolean |
isBuildRegistry()
Check if current thread parse report to build registry. |
boolean |
isCurrentVersion()
Check current template and report file (*.srt) is current version. |
ReportSheet |
read()
Import a report from input stream. |
ReportSheet |
read(String dir)
Import a report. |
static Enumeration |
readPages(InputStream input)
Read the StylePage objects from a file saved with savePages. |
static Enumeration |
readPages(InputStream input,
ReportSheet report)
Read the StylePage objects from a file saved with savePages. |
static ReportSheet |
readReport(InputStream input)
Read a file saved using saveTemplate and restore the data. |
static ReportSheet |
readReport(InputStream input,
boolean initData,
Object controller)
Read a file saved using saveTemplate and restore the data. |
static void |
savePages(Enumeration pages,
OutputStream out)
Write a set of StylePage objects to a file. |
static void |
saveReport(ReportSheet report,
OutputStream output)
Write a report as a template with embedded data. |
static void |
setBaseURL(URL url)
Set the base URL for using relative URLs. |
static void |
setBuildRegistry(Boolean meta)
Set current thread parse report to build registry. |
static void |
setEmbeddedStyles(Vector styles)
Set the embedded styles. |
void |
write(ReportSheet sheet)
Export a report. |
void |
write(ReportSheet sheet,
Enumeration pages)
Export a report. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TEMPLATE
public static final int REPORT
public static final int CSV
public static final int RTF
public static final int RTF_LAYOUT
public static final int HTML
public static final int HTML_BUNDLE
public static final int SVG
public static final int PDF
public static final int HTML_NO_PAGINATION
public static final int TEXT
public static final int HTML_BUNDLE_NO_PAGINATION
public static final int POWERPOINT
public static final int POSTSCRIPT
public static final int XML
public static final int HTML_NO_PAGINATION_EMAIL
public static final int GENERATED_REPORT
public static final int EXCEL
public static final int EXCEL_SHEET
public static final int EXCEL_DATA
public static final int BURST_REPORT
public static final int USER_DEFINED
| Constructor Detail |
|---|
public Builder(Formatter format)
format - formatter.public Builder(Parser parser)
parser - report parser.| Method Detail |
|---|
public static Builder getBuilder(int type,
OutputStream output)
type - builder type.output - output stream.
public static Builder getBuilder(int type,
OutputStream output,
Object data)
type - builder type.output - output stream.data - builder data specific to the type of the output.
public static Builder getBuilder(int type,
InputStream input0)
type - builder type.input0 - input stream.
public static Builder getBuilder(int type,
InputStream input0,
String sourceName)
type - builder type.input0 - input stream.public static String getFileExtension(int fmt)
public static void saveReport(ReportSheet report,
OutputStream output)
throws IOException
This method can be called with a file object, which is used to store the template. The file should have a suffix of .sro. If the file parameter is ignored, the template is saved in a file in the directory specified by report.snapshot.directory property, which defaults to the current directory. The name of the file is constructed dynamically.
IOException
public static ReportSheet readReport(InputStream input)
throws IOException
IOException
public static ReportSheet readReport(InputStream input,
boolean initData,
Object controller)
throws IOException
IOException
public static void savePages(Enumeration pages,
OutputStream out)
throws IOException
IOException
public static Enumeration readPages(InputStream input)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
public static Enumeration readPages(InputStream input,
ReportSheet report)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundExceptionpublic static int getType(String typename)
public static void setBaseURL(URL url)
url - base url.public static URL getBaseURL()
public Formatter getFormatter()
public Parser getParser()
public boolean isCurrentVersion()
public Generator getGenerator()
public void write(ReportSheet sheet)
throws IOException
sheet - report to export.
IOException
public void write(ReportSheet sheet,
Enumeration pages)
throws IOException
sheet - report to export.
IOException
public ReportSheet read()
throws IOException
IOException
public ReportSheet read(String dir)
throws IOException
dir - directory the report is imported from.
IOExceptionpublic static void setEmbeddedStyles(Vector styles)
styles - vector of XTableStyle.public static Vector getEmbeddedStyles()
public static String getFormatOption(int type)
type - format type.public static String getFormatString(int type)
type - format type.public static ExportType getExportType(int type)
type - the format type ID.
null if the
format type for the specified ID is undefined.public static int[] getSupportedExportTypes()
public static void setBuildRegistry(Boolean meta)
public static boolean isBuildRegistry()
public void initCache(inetsoft.report.internal.paging.ReportCache cache,
Object repId)
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||