|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ModuleHandle
public abstract class ModuleHandle
Abstract module handle which provides the common functionalities of report design and library.
Content Item | Description |
---|---|
Code Modules | Global scripts that apply to the report as a whole. |
Parameters | A list of Parameter elements that describe the data that the user can enter when running the report. |
Data Sources | The connections used by the report. |
Data Sets | Data sets defined in the design. |
Color Palette | A set of custom color names as part of the design. |
Styles | User-defined styles used to format elements in the report. Each style must have a unique name within the set of styles for this report. |
Page Setup | The layout of the master pages within the report. |
Components | Reusable report items defined in this design. Report items can extend these items. Defines a "private library" for this design. |
Translations | The list of externalized messages specifically for this report. |
Images | A list of images embedded in this report. |
Field Summary | |
---|---|
protected boolean |
isInitialized
The flag indicates that whether the initialization is finished. |
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle |
---|
module |
Fields inherited from interface org.eclipse.birt.report.model.api.core.IModuleModel |
---|
AUTHOR_PROP, BASE_PROP, COLOR_PALETTE_PROP, COMPONENT_SLOT, CONFIG_VARS_PROP, CREATED_BY_PROP, DATA_SET_SLOT, DATA_SOURCE_SLOT, DESCRIPTION_ID_PROP, DESCRIPTION_PROP, HELP_GUIDE_PROP, IMAGES_PROP, INCLUDE_RESOURCE_PROP, INCLUDE_SCRIPTS_PROP, INITIALIZE_METHOD, LIBRARIES_PROP, PAGE_SLOT, PARAMETER_SLOT, PROPERTY_BINDINGS_PROP, SCRIPTLIBS_PROP, SUBJECT_PROP, THEME_PROP, TITLE_ID_PROP, TITLE_PROP, UNITS_PROP |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel |
---|
COMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP |
Constructor Summary | |
---|---|
ModuleHandle(org.eclipse.birt.report.model.core.Module module)
Constructs one module handle with the given module element. |
Method Summary | |
---|---|
void |
addAttributeListener(IAttributeListener listener)
Adds one attribute listener. |
void |
addConfigVariable(ConfigVariable configVar)
Adds a new config variable. |
void |
addDisposeListener(IDisposeListener listener)
Adds one dispose listener. |
void |
addImage(EmbeddedImage image)
Adds a new embedded image. |
void |
addIncludeScript(IncludeScript includeScript)
Adds include script. |
void |
addResourceChangeListener(IResourceChangeListener listener)
Adds one resource change listener. |
void |
addScriptLib(ScriptLib scriptLib)
Add script lib |
void |
addTranslation(java.lang.String resourceKey,
java.lang.String locale,
java.lang.String text)
Adds a new translation to the design. |
void |
addValidationListener(IValidationListener listener)
Adds the validation listener, which implements IValidationListener . |
void |
checkReport()
Checks this whole report. |
void |
close()
Closes the design. |
java.util.Iterator |
configVariablesIterator()
Returns the iterator over all config variables. |
IDesignElement |
copy()
Deeply clones the current design element which is wrapped by the handle. |
java.util.Iterator |
customColorsIterator()
Returns the iterator over all structures of color palette. |
void |
drop()
Drops this element from the design. |
void |
dropAllScriptLibs()
Removes all script libs. |
void |
dropAndClear()
Drops this element from the design. |
void |
dropConfigVariable(java.lang.String name)
Deprecated. |
void |
dropImage(java.util.List images)
Drops an embedded image handle list from the design. |
void |
dropImage(java.lang.String name)
Deprecated. |
void |
dropIncludeScript(IncludeScript includeScript)
Removes the given included script. |
void |
dropLibrary(LibraryHandle library)
Drops the given library from the included libraries of this design file. |
void |
dropLibraryAndBreakExtends(LibraryHandle library)
Drops the given library from the design and break all the parent/child relationships. |
void |
dropScriptLib(ScriptLib scriptLib)
Removes special script lib. |
void |
dropScriptLib(ScriptLibHandle scriptLibHandle)
Removes special script lib handle. |
void |
dropTranslation(java.lang.String resourceKey,
java.lang.String locale)
Drops a translation from the design. |
CascadingParameterGroupHandle |
findCascadingParameterGroup(java.lang.String groupName)
Returns a cascading parameter group handle with the given group name |
CustomColor |
findColor(java.lang.String name)
Finds the custom color with the given name. |
ConfigVariable |
findConfigVariable(java.lang.String name)
Finds the config variable with the given name. |
CubeHandle |
findCube(java.lang.String name)
Finds a cube element by name in this module and the included modules. |
DataSetHandle |
findDataSet(java.lang.String name)
Finds a data set by name in this module and the included modules. |
DataSourceHandle |
findDataSource(java.lang.String name)
Finds a data source by name in this module and the included modules. |
DesignElementHandle |
findElement(java.lang.String name)
Finds a named element in the name space in this module and the included moduled. |
EmbeddedImage |
findImage(java.lang.String name)
Finds the image with the given name. |
JointDataSetHandle |
findJointDataSet(java.lang.String name)
Finds a joint data set by name in this module and the included modules. |
LevelHandle |
findLevel(java.lang.String name)
Finds a cube element by name in this module and the included modules. |
LibraryHandle |
findLibrary(java.lang.String fileName)
Returns the library handle with the given file name. |
MasterPageHandle |
findMasterPage(java.lang.String name)
Finds a master page by name in this module and the included modules. |
SharedStyleHandle |
findNativeStyle(java.lang.String name)
Finds a style by its name in this module. |
ParameterHandle |
findParameter(java.lang.String name)
Finds a parameter by name in this module and the included modules. |
java.net.URL |
findResource(java.lang.String fileName,
int fileType)
Returns the URL object if the file with fileName
exists. |
ScriptLib |
findScriptLib(java.lang.String name)
Gets script lib though name |
SharedStyleHandle |
findStyle(java.lang.String name)
Finds a style by its name in this module and the included modules. |
TemplateDataSetHandle |
findTemplateDataSet(java.lang.String name)
Finds a template data set by name in this module and the included modules. |
ThemeHandle |
findTheme(java.lang.String name)
Finds a theme by its name in this module and the included modules. |
java.util.List |
getAllCubes()
Returns all cube handles that this modules and the included modules contain. |
java.util.List |
getAllDataSets()
Returns all data set handles that this modules and the included modules contain. |
java.util.List |
getAllDataSources()
Returns all data source handles that this modules and the included modules contain. |
java.util.List |
getAllImages()
Returns the list of embedded images, including the one from libraries. |
java.util.List |
getAllIncludeScripts()
Gets all included scripts. |
java.util.List |
getAllLibraries()
Returns the libraries this report design includes directly or indirectly. |
java.util.List |
getAllPages()
Returns all page handles that this modules and the included modules contain. |
java.util.List |
getAllParameters()
Returns all parameter handles that this modules. |
java.util.List |
getAllScriptLibs()
Returns all script libs. |
java.util.List |
getAllStyles()
Returns all style element handles that this modules and the included modules contain. |
java.lang.String |
getAuthor()
Returns the name of the author of the design report. |
CommandStack |
getCommandStack()
Returns the command stack that manages undo/redo operations for the design. |
SlotHandle |
getComponents()
Returns a slot handle to work with the top-level components within the report. |
java.lang.String |
getCreatedBy()
Returns the name of the tool that created the design. |
abstract SlotHandle |
getCubes()
Gets the slot handle to work with all cube elements within the report. |
SlotHandle |
getDataSets()
Returns a slot handle to work with the data sets within the report. |
SlotHandle |
getDataSources()
Returns a slot handle to work with the data sources within the report. |
java.lang.String |
getDefaultUnits()
Returns the default units for the design. |
java.lang.String |
getDescription()
Returns the static description for the module. |
java.lang.String |
getDescriptionKey()
Returns the resource key of the static description of the module. |
java.lang.String |
getDisplayDescription()
Returns the localized description for the module. |
org.eclipse.birt.report.model.core.DesignElement |
getElement()
Returns the element to which this handle is attached. |
DesignElementHandle |
getElementByID(long id)
Finds the handle to an element by a given element ID. |
java.util.List |
getErrorList()
Returns a list containing errors during parsing the design file. |
java.lang.String |
getFileEncoding()
Returns the encoding of the design/library file. |
java.lang.String |
getFileName()
Returns the file name of the design. |
java.util.List |
getFlattenParameters()
Returns the flatten Parameters/ParameterGroups of the design. |
java.lang.String |
getHelpGuide()
Returns an external file that provides help information for the report. |
java.lang.String |
getIncludeResource()
Get the base name of the customer-defined resource bundle. |
java.lang.String |
getInitialize()
Returns the script called when the report starts executing. |
java.util.List |
getLibraries()
Returns the libraries this report design includes directly. |
protected java.util.List |
getLibraries(int level)
Returns included libaries this report design includes directly or indirectly within the given depth. |
LibraryHandle |
getLibrary(java.lang.String namespace)
Returns the library handle with the given namespace. |
int |
getLineNo(java.lang.Object obj)
looks up line number of the element\property\struceture, in xml source with given xPaht. |
int |
getLineNoByID(long id)
Deprecated. new method see getLineNo(Object) |
SlotHandle |
getMasterPages()
Returns a slot handle to work with the master pages within the report. |
java.lang.String |
getMessage(java.lang.String resourceKey)
Finds user-defined messages for the current thread's locale. |
java.lang.String |
getMessage(java.lang.String resourceKey,
java.util.Locale locale)
Finds user-defined messages for the given locale. |
java.lang.String |
getMessage(java.lang.String resourceKey,
com.ibm.icu.util.ULocale locale)
Finds user-defined messages for the given locale. |
java.util.List |
getMessageKeys()
Return a list of user-defined message keys. |
SlotHandle |
getParameters()
Returns a slot handle to work with the top-level parameters and parameter groups within the report. |
java.util.List |
getParametersAndParameterGroups()
Returns parameters and parameter groups on the module. |
java.lang.String |
getResourceFolder()
Gets the resource folder set in this module. |
SlotHandle |
getStyles()
Returns a slot handle to work with the styles within the report. |
java.lang.String |
getSubject()
Gets the subject of the module. |
java.lang.String |
getSymbolicName()
Gets symbolic name of this module if defined. |
java.net.URL |
getSystemId()
Returns the system id of the module. |
ThemeHandle |
getTheme()
Returns the refresh rate when viewing the report. |
TranslationHandle |
getTranslation(java.lang.String resourceKey,
java.lang.String locale)
Gets a handle to deal with a translation. |
java.lang.String[] |
getTranslationKeys()
Returns a string array containing all the resource keys of user-defined translations for the report. |
java.util.List |
getTranslations()
Gets a list of translation defined on the report. |
java.lang.String |
getVersion()
Returns the version for the opened design file. |
java.util.List |
getVisibleCubes()
Returns cube handles that are visible to this modules. |
java.util.List |
getVisibleDataSets()
Returns data set handles that are visible to this modules. |
java.util.List |
getVisibleDataSources()
Returns data source handles that are visible to this modules. |
java.util.List |
getVisibleImages()
Returns the embedded images which are defined on the module itself. |
java.util.List |
getVisibleThemes(int level)
Returns theme handles according the input level. |
java.util.List |
getWarningList()
Returns a list containing warnings during parsing the design file. |
java.util.Iterator |
imagesIterator()
Returns the iterator over all embedded images of this module instance. |
abstract void |
importCssStyles(CssStyleSheetHandle stylesheet,
java.util.List selectedStyles)
Imports the selected styles in a CssStyleSheetHandle to the
module. |
java.util.Iterator |
includeLibrariesIterator()
Returns the iterator over all included libraries. |
void |
includeLibrary(java.lang.String libraryFileName,
java.lang.String namespace)
Includes one library with the given library file name. |
java.util.Iterator |
includeScriptsIterator()
Returns the iterator over all included scripts. |
void |
initializeModule(java.util.Map properties)
Initializes the report design when it is just created. |
boolean |
isInclude(LibraryHandle library)
Checks whether there is an included library in this module, which has the same absolute path as that of the given library. |
boolean |
isReadOnly()
Returns whether this module is read-only. |
boolean |
needsSave()
Determines if the design has changed since it was last read from, or written to, the file. |
void |
onSave()
Calls to inform a save is successful. |
CssStyleSheetHandle |
openCssStyleSheet(java.io.InputStream is)
Gets the result style sheet with given file name of an external CSS2 resource. |
CssStyleSheetHandle |
openCssStyleSheet(java.lang.String fileName)
Gets the result style sheet with given file name of an external CSS2 resource. |
void |
reloadLibraries()
Reloads all libraries this module included. |
void |
reloadLibrary(LibraryHandle libraryToReload)
Reloads the library with the given library file path. |
void |
reloadLibrary(java.lang.String reloadPath)
Reloads the library with the given library file path. |
boolean |
removeAttributeListener(IAttributeListener listener)
Removes one attribute listener. |
boolean |
removeDisposeListener(IDisposeListener listener)
Removes one dispose listener. |
boolean |
removeResourceChangeListener(IResourceChangeListener listener)
Removes one resource change listener. |
boolean |
removeValidationListener(IValidationListener listener)
Removes a given validation listener. |
void |
rename(DesignElementHandle elementHandle)
Checks the element name in name space of this report. |
void |
rename(DesignElementHandle containerHandle,
DesignElementHandle elementHandle)
Checks element name is unique in container. |
void |
rename(EmbeddedImage image)
Checks the name of the embedded image in this report. |
void |
replaceConfigVariable(ConfigVariable oldVar,
ConfigVariable newVar)
Replaces the old config variable with the new one. |
void |
replaceImage(EmbeddedImage oldVar,
EmbeddedImage newVar)
Replaces the old embedded image with the new one. |
void |
save()
Saves the module to an existing file name. |
void |
saveAs(java.lang.String newName)
Saves the design to the file name provided. |
java.util.Iterator |
scriptLibsIterator()
Returns the iterator over all script libs. |
void |
serialize(java.io.OutputStream out)
Writes the report design to the given output stream. |
void |
setAuthor(java.lang.String author)
Sets the name of the author of the design report. |
void |
setCreatedBy(java.lang.String toolName)
Returns the name of the tool that created the design. |
void |
setDefaultUnits(java.lang.String units)
Sets the default units for the design. |
void |
setDescription(java.lang.String description)
Sets the description of the module. |
void |
setDescriptionKey(java.lang.String resourceKey)
Sets the resource key of the static description of the module. |
void |
setFileName(java.lang.String newName)
Sets the design file name. |
void |
setHelpGuide(java.lang.String helpGuide)
Sets an external file that provides help information for the report. |
void |
setIncludeResource(java.lang.String baseName)
Set the base name of the customer-defined resource bundle. |
void |
setInitialize(java.lang.String value)
Sets the script called when the report starts executing. |
void |
setResourceFolder(java.lang.String resourceFolder)
Sets the resource folder for this module. |
void |
setSubject(java.lang.String subject)
Sets the subject of the module. |
void |
setSymbolicName(java.lang.String symbolicName)
Sets symbolic name of this module. |
void |
setTheme(ThemeHandle theme)
Sets the theme to a report. |
void |
setThemeName(java.lang.String themeName)
Sets the theme to a report. |
void |
shifIncludeScripts(int sourceIndex,
int destIndex)
Shifts included script from source position to destination position. |
void |
shiftLibrary(LibraryHandle library,
int toPosn)
Shifts the library to new position. |
void |
shiftScriptLibs(int sourceIndex,
int destIndex)
Shifts jar file from source position to destination position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean isInitialized
Constructor Detail |
---|
public ModuleHandle(org.eclipse.birt.report.model.core.Module module)
module
- moduleMethod Detail |
---|
public void addConfigVariable(ConfigVariable configVar) throws SemanticException
configVar
- the config variable
SemanticException
- if the name is empty or the same name exists.public void addImage(EmbeddedImage image) throws SemanticException
image
- the image to add
SemanticException
- if the name is empty, type is invalid, or the same name
exists.public void rename(EmbeddedImage image)
image
- the embedded image whose name is need to checkpublic void addTranslation(java.lang.String resourceKey, java.lang.String locale, java.lang.String text) throws CustomMsgException
resourceKey
- resource key for the messagelocale
- the string value of a locale for the translation. Locale
should be in java-defined format( en, en-US, zh_CN, etc.)text
- translated text for the locale
CustomMsgException
- if the resource key is duplicate or missing, or locale is not
a valid format.getTranslation(String, String)
public void addValidationListener(IValidationListener listener)
IValidationListener
. A listener receives notifications each
time an element is validated.
listener
- the validation listener.public void checkReport()
ValidationEvent
will be
sent, which contains all error information of this check.
public void close()
DisposeEvent
to all the dispose listeners registered in the
module.
public java.util.Iterator configVariablesIterator()
ConfigVariableHandle
.
Note: The configure variable in library file will be hidden if the one with the same name appears in design file.
ConfigVariableHandle
public java.util.Iterator customColorsIterator()
CustomColorHandle
CustomColorHandle
public void dropConfigVariable(java.lang.String name) throws SemanticException
name
- config variable name
SemanticException
- if no config variable is found.public void dropImage(java.util.List images) throws SemanticException
EmbeddedImageHandle
.
images
- the image handle list to remove
SemanticException
- if any image in the list is not found.public void dropImage(java.lang.String name) throws SemanticException
name
- the image name
SemanticException
- if the image is not found.public void dropTranslation(java.lang.String resourceKey, java.lang.String locale) throws CustomMsgException
resourceKey
- resource key of the message in which this translation saves.locale
- the string value of the locale for a translation. Locale
should be in java-defined format( en, en-US, zh_CN, etc.)
CustomMsgException
- if resourceKey
is null
.getTranslation(String, String)
public DataSetHandle findDataSet(java.lang.String name)
name
- name of the data set
null
if the data set is
not foundpublic JointDataSetHandle findJointDataSet(java.lang.String name)
name
- name of the joint data set
null
if the data
set is not foundpublic TemplateDataSetHandle findTemplateDataSet(java.lang.String name)
name
- name of the data set
null
if the
data set is not foundpublic DataSourceHandle findDataSource(java.lang.String name)
name
- name of the data source
null
if the data
source is not foundpublic DesignElementHandle findElement(java.lang.String name)
name
- the name of the element to find
null
if the element was
not found.public CubeHandle findCube(java.lang.String name)
name
- the element name
public LevelHandle findLevel(java.lang.String name)
name
- the element name, name must be Dimension name + "/" + level
name.
public EmbeddedImage findImage(java.lang.String name)
name
- the image name
null
, if
not found.public ConfigVariable findConfigVariable(java.lang.String name)
name
- the variable name
null
, if not found.public CustomColor findColor(java.lang.String name)
name
- the color name
null
if
it's not found.public MasterPageHandle findMasterPage(java.lang.String name)
name
- the name of the master page
null
if the page is
not foundpublic ParameterHandle findParameter(java.lang.String name)
name
- the name of the parameter
null
if the parameter
is not foundpublic SharedStyleHandle findNativeStyle(java.lang.String name)
name
- name of the style
null
if the style is not
foundpublic final SharedStyleHandle findStyle(java.lang.String name)
name
- name of the style
null
if the style is not
foundpublic ThemeHandle findTheme(java.lang.String name)
name
- name of the style
null
if the style is not
foundpublic java.lang.String getAuthor()
public java.lang.String getSubject()
public void setSubject(java.lang.String subject) throws SemanticException
subject
- the subject of the module.
SemanticException
public CommandStack getCommandStack()
CommandStack
public SlotHandle getComponents()
public java.lang.String getCreatedBy()
public SlotHandle getDataSets()
public abstract SlotHandle getCubes()
public SlotHandle getDataSources()
public java.lang.String getDefaultUnits()
DimensionValue
public void setDefaultUnits(java.lang.String units) throws SemanticException
For a report design, it allows the following constants that defined in
:
DesignChoiceConstants
UNITS_IN
UNITS_CM
UNITS_MM
UNITS_PT
units
- the default units for the design.
SemanticException
- if the input unit is not one of allowed.DimensionValue
public org.eclipse.birt.report.model.core.DesignElement getElement()
DesignElementHandle
getElement
in class DesignElementHandle
public DesignElementHandle getElementByID(long id)
null
if the ID is not valid, or if this session does not use IDs.
id
- ID of the element to find
null
if the element was
not found or this session does not use IDs.public java.util.List getErrorList()
ErrorDetail
.ErrorDetail
public java.lang.String getFileName()
public java.util.List getFlattenParameters()
public java.lang.String getHelpGuide()
public java.lang.String getInitialize()
public SlotHandle getMasterPages()
public java.lang.String getMessage(java.lang.String resourceKey)
resourceKey
- Resource key of the user-defined message.
null
if resoueceKey is blank.getMessage(String, Locale)
public java.lang.String getMessage(java.lang.String resourceKey, java.util.Locale locale)
First we look up in the report itself, then look into the referenced message file. Each search uses a reduced form of Java locale-driven search algorithm: Language&Country, language, default.
resourceKey
- Resource key of the user defined message.locale
- locale of message, if the input locale
is
null
, the locale for the current thread will be used
instead.
null
if resoueceKey is blank.public java.lang.String getMessage(java.lang.String resourceKey, com.ibm.icu.util.ULocale locale)
First we look up in the report itself, then look into the referenced message file. Each search uses a reduced form of Java locale-driven search algorithm: Language&Country, language, default.
resourceKey
- Resource key of the user defined message.locale
- locale of message, if the input locale
is
null
, the locale for the current thread will be used
instead.
null
if resoueceKey is blank.public java.util.List getMessageKeys()
public SlotHandle getParameters()
public CascadingParameterGroupHandle findCascadingParameterGroup(java.lang.String groupName)
groupName
- name of the cascading parameter group.
null
if the cascading group with the given name is not found.public SlotHandle getStyles()
public TranslationHandle getTranslation(java.lang.String resourceKey, java.lang.String locale)
resourceKey
- the resource keylocale
- the locale information
TranslationHandle
. Or return
null
if the translation is not found in the design.TranslationHandle
public java.lang.String[] getTranslationKeys()
null
if there is no messages defined in the design.public java.util.List getTranslations()
TranslationHandle
.
null
if the design has no any translations.TranslationHandle
public java.util.List getWarningList()
ErrorDetail
.ErrorDetail
public java.util.Iterator imagesIterator()
EmbeddedImageHandle
EmbeddedImageHandle
public java.util.List getAllImages()
EmbeddedImageHandle
EmbeddedImageHandle
public boolean needsSave()
true
if the design has changed since the last load
or save; false
if it has not changed.public void onSave()
serialize
.
public boolean removeValidationListener(IValidationListener listener)
listener
- the listener to de-register
true
if listener
is sucessfully
removed. Otherwise false
.public void rename(DesignElementHandle elementHandle)
elementHandle
- the element handle whose name is need to check.public void rename(DesignElementHandle containerHandle, DesignElementHandle elementHandle)
containerHandle
- container of elementelementHandle
- element handlepublic void replaceConfigVariable(ConfigVariable oldVar, ConfigVariable newVar) throws SemanticException
oldVar
- the old config variablenewVar
- the new config variable
SemanticException
- if the old config variable is not found or the name of new
one is empty.public void replaceImage(EmbeddedImage oldVar, EmbeddedImage newVar) throws SemanticException
oldVar
- the old embedded imagenewVar
- the new embedded image
SemanticException
- if the old image is not found or the name of new one is
empty.public void save() throws java.io.IOException
java.io.IOException
- if the file cannot be saved on the storagesaveAs(String)
public void saveAs(java.lang.String newName) throws java.io.IOException
save( )
will save to this
new name.
newName
- the new file name
java.io.IOException
- if the file cannot be savedsave()
public void serialize(java.io.OutputStream out) throws java.io.IOException
onSave
if the save succeeds.
out
- the output stream to which the design is written.
java.io.IOException
- if the file cannot be written to the output stream
successfully.public void setAuthor(java.lang.String author)
author
- the name of the author.public void setCreatedBy(java.lang.String toolName)
toolName
- the name of the toolpublic void setFileName(java.lang.String newName)
AttributeEvent
to all the attribute listeners registered
in the module.
newName
- the new file name. It may contain the relative/absolute path
information. This name must include the file name with the
filename extension.public void setHelpGuide(java.lang.String helpGuide)
helpGuide
- the name of an external filepublic void setInitialize(java.lang.String value)
value
- the script to set.public java.util.List getAllStyles()
public java.util.List getVisibleThemes(int level)
level
- an int
value, which should be the one defined in
IVisibleLevelControl
.
public java.util.List getParametersAndParameterGroups()
public java.util.List getAllDataSources()
public java.util.List getVisibleDataSources()
public java.util.List getAllDataSets()
public java.util.List getVisibleDataSets()
public java.util.List getAllCubes()
public java.util.List getVisibleCubes()
public java.util.List getVisibleImages()
public java.util.List getAllPages()
public java.util.List getAllParameters()
public java.util.List getAllLibraries()
LibraryHandle
.
protected java.util.List getLibraries(int level)
level
- the given depth
public java.util.List getLibraries()
LibraryHandle
.
public LibraryHandle getLibrary(java.lang.String namespace)
namespace
- the library namespace
public LibraryHandle findLibrary(java.lang.String fileName)
fileName
- the library file name. The filename can include directory
information, either relative or absolute directory. And the
file should be on the local disk.
public void shiftLibrary(LibraryHandle library, int toPosn) throws SemanticException
library
- the library to shifttoPosn
- the new position
SemanticException
- if error is encountered when shiftingpublic boolean isReadOnly()
public java.util.Iterator includeLibrariesIterator()
IncludeLibraryHandle
IncludedLibraryHandle
public void includeLibrary(java.lang.String libraryFileName, java.lang.String namespace) throws DesignFileException, SemanticException
libraryFileName
- library file namenamespace
- library namespace
DesignFileException
- if the library file is not found, or has fatal error.
SemanticException
- if error is encountered when handling IncludeLibrary
structure list.public void dropLibrary(LibraryHandle library) throws SemanticException
library
- the library to drop
SemanticException
- if error is encountered when handling IncludeLibrary
structure list. Or it maybe because that the given
library is not found in the design. Or that the library has
descedents in the current modulepublic void reloadLibrary(LibraryHandle libraryToReload) throws SemanticException, DesignFileException
Call this method cautiously ONLY on the condition that the library file is REALLY changed outside. After reload successfully, the command stack is cleared.
libraryToReload
- the library instance
SemanticException
- if error is encountered when handling IncludeLibrary
structure list. Or it maybe because that the given
library is not found in the design. Or that the library has
descedents in the current module
DesignFileException
- if the library file is not found, or has fatal error.public void reloadLibraries() throws SemanticException, DesignFileException
Call this method cautiously ONLY on the condition that the library file
is REALLY changed outside. After reload successfully, the command stack
is cleared.
reloadLibrary(LibraryHandle)
SemanticException
DesignFileException
public void reloadLibrary(java.lang.String reloadPath) throws SemanticException, DesignFileException
Call this method cautiously ONLY on the condition that the library file is REALLY changed outside. After reload successfully, the command stack is cleared.
reloadPath
- this is supposed to be an absolute path, not in url form.
SemanticException
- if error is encountered when handling IncludeLibrary
structure list. Or it maybe because that the given
library is not found in the design. Or that the library has
descedents in the current module
DesignFileException
- if the library file is not found, or has fatal error.public void dropLibraryAndBreakExtends(LibraryHandle library) throws SemanticException
library
- the given library to drop
SemanticException
- if errors occured when drop the library.It may be because
that the library is not found in the design or that some
elements can not be localized properly.public void addAttributeListener(IAttributeListener listener)
listener
- the attribute listener to addpublic boolean removeAttributeListener(IAttributeListener listener)
listener
- the attribute listener to remove
true
if listener
is successfully
removed. Otherwise false
.public void addDisposeListener(IDisposeListener listener)
listener
- the dispose listener to addpublic void addResourceChangeListener(IResourceChangeListener listener)
listener
- the resource change listener to addpublic boolean removeDisposeListener(IDisposeListener listener)
listener
- the dispose listener to remove
true
if listener
is successfully
removed. Otherwise false
.public boolean removeResourceChangeListener(IResourceChangeListener listener)
listener
- the resource change listener to remove
true
if listener
is successfully
removed. Otherwise false
.public void drop() throws SemanticException
DesignElementHandle
Note: If this element is referencable, the property referring it will be unresolved.
drop
in class DesignElementHandle
SemanticException
- if this element has no container or the element cannot be
dropped.SlotHandle
,
DesignElementHandle.dropAndClear()
public void dropAndClear() throws SemanticException
DesignElementHandle
Note: If this element is referencable, the property referring it will be set null.
dropAndClear
in class DesignElementHandle
SemanticException
- if this element has no container or the element cannot be
dropped.SlotHandle
,
DesignElementHandle.drop()
public java.lang.String getIncludeResource()
public void setIncludeResource(java.lang.String baseName)
baseName
- common base name of the customer-defined resource bundle.public java.net.URL findResource(java.lang.String fileName, int fileType)
URL
object if the file with fileName
exists. This method takes the following search steps:
IResourceLocator
) in session. And Now just deal with
relative file name.
fileName
as absolute file name; fileName
as relative file name and basing "base" property of report
design; IResourceLocator
) in session
fileName
- file name to searchfileType
- file type. The value should be one of:
IResourceLocator.IMAGE
IResourceLocator.LIBRARY
IResourceLocator.MESSAGEFILE
IResourceLocator.IMAGE
.
URL
object if the file with fileName
is found, or null otherwise.public CssStyleSheetHandle openCssStyleSheet(java.lang.String fileName) throws StyleSheetException
fileName
- the file name of the external CSS resource
CssStyleSheetHandle
if the external resource is
successfully loaded
StyleSheetException
- thrown if the resource is not found, or there are syntax
errors in the resourcepublic CssStyleSheetHandle openCssStyleSheet(java.io.InputStream is) throws StyleSheetException
is
- the input stream of the resource
CssStyleSheetHandle
if the external resource is
successfully loaded
StyleSheetException
- thrown if the resource is not found, or there are syntax
errors in the resourcepublic abstract void importCssStyles(CssStyleSheetHandle stylesheet, java.util.List selectedStyles)
CssStyleSheetHandle
to the
module. Each in the list is instance of SharedStyleHandle
.If any style selected has a duplicate name with that of one style
already existing in the report design, this method will rename it and
then add it to the design.
stylesheet
- the style sheet handle that contains all the selected stylesselectedStyles
- the selected style listpublic void setThemeName(java.lang.String themeName) throws SemanticException
themeName
- the name of the theme
SemanticException
public ThemeHandle getTheme()
public void setTheme(ThemeHandle theme) throws SemanticException
theme
- the theme instance
SemanticException
public boolean isInclude(LibraryHandle library)
library
- the library to check
public java.lang.String getDescription()
public java.lang.String getDisplayDescription()
public void setDescription(java.lang.String description) throws SemanticException
description
- the new description for the module
SemanticException
- if the property is locked.public java.lang.String getDescriptionKey()
public void setDescriptionKey(java.lang.String resourceKey) throws SemanticException
resourceKey
- the resource key of the static description
SemanticException
- if the resource key property is locked.public void initializeModule(java.util.Map properties) throws SemanticException
Set the value to the properties on repot design element which need the initialize valuel. All initialize operations will not go into the command stack and can not be undo redo.
properties
- the property name value pairs.Those properties in the map are
which need to be initialized.
SemanticException
- SemamticException will throw out when the give properties map
contians invlid property name or property value.public java.lang.String getFileEncoding()
public java.lang.String getSymbolicName()
public void setSymbolicName(java.lang.String symbolicName) throws SemanticException
symbolicName
-
SemanticException
public java.net.URL getSystemId()
public void dropScriptLib(ScriptLib scriptLib) throws SemanticException
scriptLib
- script lib
SemanticException
public void dropIncludeScript(IncludeScript includeScript) throws SemanticException
includeScript
- the included script
SemanticException
public void dropScriptLib(ScriptLibHandle scriptLibHandle) throws SemanticException
scriptLibHandle
- script lib handle
SemanticException
public void dropAllScriptLibs() throws SemanticException
SemanticException
public java.util.Iterator scriptLibsIterator()
ScriptLibHandle
.
ScriptLibHandle
public java.util.List getAllScriptLibs()
ScriptLibHandle
public ScriptLib findScriptLib(java.lang.String name)
name
- name of script lib
public void shiftScriptLibs(int sourceIndex, int destIndex) throws SemanticException
newPosn
with the value 1, the sequence becomes B, A, C.
sourceIndex
- source position. The range is sourceIndex >= 0 &&
sourceIndex < list.size()
destIndex
- destination position.The range is destIndex >= 0 &&
destIndex < list.size()
SemanticException
public void shifIncludeScripts(int sourceIndex, int destIndex) throws SemanticException
newPosn
with the value 1, the sequence
becomes B, A, C.
sourceIndex
- source position. The range is sourceIndex >= 0 &&
sourceIndex < list.size()
destIndex
- destination position.The range is destIndex >= 0 &&
destIndex < list.size()
SemanticException
public void addScriptLib(ScriptLib scriptLib) throws SemanticException
scriptLib
- script lib
SemanticException
public void addIncludeScript(IncludeScript includeScript) throws SemanticException
includeScript
- the include script
SemanticException
public void setResourceFolder(java.lang.String resourceFolder)
resourceFolder
- the folder to setpublic java.lang.String getResourceFolder()
public int getLineNoByID(long id)
getLineNo(Object)
id
- The id of the element to find.
public int getLineNo(java.lang.Object obj)
obj
- The xPath of the element\property\structure, it should be
unique in an report file.
public java.lang.String getVersion()
null
. Only the opened/saved
report/library have the version information.
Whenever the report/library is save, the version becomes
DesignSchemaConstants.REPORT_VERSION
. That is, the saved
report/library always have the latest version.
public java.util.Iterator includeScriptsIterator()
IncludeScriptHandle
IncludeScriptHandle
public java.util.List getAllIncludeScripts()
IncludeScriptHandle
.public IDesignElement copy()
DesignElementHandle
copy
in class DesignElementHandle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |