|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.api.util.ElementExportUtil
Represents the utility class to help export element and structure to library file. The element or structure to export must comply with the following rule:
IllegalArgumentException
.
Constructor Summary | |
ElementExportUtil()
|
Method Summary | |
static void |
exportDesign(ReportDesignHandle designToExport,
LibraryHandle targetLibraryHandle,
boolean canOverride,
boolean genDefaultName)
Exports one design to library. |
static void |
exportDesign(ReportDesignHandle designToExport,
java.lang.String libraryFileName,
boolean canOverride,
boolean genDefaultName)
Export the report design to a library file specified by the file name. |
static void |
exportElement(DesignElementHandle elementToExport,
LibraryHandle targetLibraryHandle,
boolean canOverride)
Exports the given element into one library. |
static void |
exportElement(DesignElementHandle elementToExport,
java.lang.String libraryFileName,
boolean canOverride)
Exports the given element into one library file. |
static void |
exportElements(java.util.List elementsToExport,
java.lang.String libraryFileName,
boolean canOverride)
Exports the given element list into one library file. |
static void |
exportStructure(StructureHandle structToExport,
LibraryHandle targetLibraryHandle,
boolean canOverride)
Exports the given structure into one library. |
static void |
exportStructure(StructureHandle structToExport,
java.lang.String libraryFileName,
boolean canOverride)
Exports the given structure into one library. |
static void |
exportStructures(java.util.List structsToExport,
java.lang.String libraryFileName,
boolean canOverride)
Exports the given structure into one library. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ElementExportUtil()
Method Detail |
public static void exportElement(DesignElementHandle elementToExport, java.lang.String libraryFileName, boolean canOverride) throws DesignFileException, SemanticException, java.io.IOException
elementToExport
- handle of the element to export.libraryFileName
- file name of the target librarycanOverride
- indicates whether the element with the same name in target
library will be overriden.
DesignFileException
- if error encountered when open library file with the given
file name.
SemanticException
- if error encountered when element name is duplicate in the
target library.
java.io.IOException
- if error encountered when writing file.
java.lang.IllegalArgumentException
- if the element to export is not in design file, or the
element doesn't has name.public static void exportElements(java.util.List elementsToExport, java.lang.String libraryFileName, boolean canOverride) throws DesignFileException, SemanticException, java.io.IOException
elementsToExport
- list of the element to export, each of which is the instance
of DesignElementHandle
.libraryFileName
- file name of the target librarycanOverride
- indicates whether the element with the same name in target
library will be overriden.
DesignFileException
- if error encountered when open library file with the given
file name.
SemanticException
- if error encountered when element name is duplicate in the
target library.
java.io.IOException
- if error encountered when writing file.
java.lang.IllegalArgumentException
- if the element to export is not in design file.public static void exportElement(DesignElementHandle elementToExport, LibraryHandle targetLibraryHandle, boolean canOverride) throws SemanticException
elementToExport
- handle of the element to export.targetLibraryHandle
- handle of target librarycanOverride
- indicates whether the element with the same name in target
library will be overriden.
SemanticException
- if error encountered when element name is duplicate in the
target library.
java.lang.IllegalArgumentException
- if the element to export is not in design file.public static void exportStructure(StructureHandle structToExport, java.lang.String libraryFileName, boolean canOverride) throws DesignFileException, SemanticException, java.io.IOException
EmbeddedImage
,CustomColor
and
ConfigVariable
. If the library file is not found, new
library file will be created and saved as the given file name.
structToExport
- handle of the structure to export.libraryFileName
- file name of the target librarycanOverride
- indicates whether the structure with the same name in target
library will be overriden.
DesignFileException
- if error encountered when open library file with the given
file name.
SemanticException
- if error encountered when adding new structure to library or
value setting.
java.io.IOException
- if error encountered when writing file.
java.lang.IllegalArgumentException
- if the element to export is not in design file.public static void exportStructures(java.util.List structsToExport, java.lang.String libraryFileName, boolean canOverride) throws DesignFileException, SemanticException, java.io.IOException
EmbeddedImage
,CustomColor
and
ConfigVariable
. If the library file is not found, new
library file will be created and saved as the given file name.
structsToExport
- list of the structure to export, each of which is the instance
of StructureHandle
.libraryFileName
- file name of the target librarycanOverride
- indicates whether the structure with the same name in target
library will be overriden.
DesignFileException
- if error encountered when open library file with the given
file name.
SemanticException
- if error encountered when adding new structure to library or
value setting.
java.io.IOException
- if error encountered when writing file.
java.lang.IllegalArgumentException
- if the element to export is not in design file.public static void exportStructure(StructureHandle structToExport, LibraryHandle targetLibraryHandle, boolean canOverride) throws SemanticException
EmbeddedImage
,CustomColor
and
ConfigVariable
.
structToExport
- handle of the structure to export.targetLibraryHandle
- handle of target librarycanOverride
- indicates whether the structure with the same name in target
library will be overriden.
SemanticException
- if error encountered when adding new structure to library or
value setting.public static void exportDesign(ReportDesignHandle designToExport, java.lang.String libraryFileName, boolean canOverride, boolean genDefaultName) throws DesignFileException, SemanticException, java.io.IOException
designToExport
- the design which need to be exportedlibraryFileName
- target library file namecanOverride
- indicates whether the element with the same name in target
library will be overriden.genDefaultName
- if true, a default name will be generated if an element
doesn't has a name. if false, an exception will be throwed
indicate that the element to export must has a name
DesignFileException
- if the library file has fatal errors which can not be opened.
SemanticException
- if error encountered when element name is duplicated in the
target library.
java.io.IOException
- if error encountered when writing file.public static void exportDesign(ReportDesignHandle designToExport, LibraryHandle targetLibraryHandle, boolean canOverride, boolean genDefaultName) throws SemanticException
designToExport
- handle of the report design to exporttargetLibraryHandle
- handle of target librarycanOverride
- indicates whether the element with the same name in target
library will be overriden.genDefaultName
- if true, a default name will be generated if an element
doesn't has a name. if false, an exception will be throwed
indicate that the element to export must has a name
SemanticException
- if error encountered when element name is duplicate in the
target library.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |