org.eclipse.birt.report.model.api
Class ReportDesignHandle

java.lang.Object
  extended by org.eclipse.birt.report.model.api.DesignElementHandle
      extended by org.eclipse.birt.report.model.api.ModuleHandle
          extended by org.eclipse.birt.report.model.api.ReportDesignHandle
All Implemented Interfaces:
IModuleModel, org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel, org.eclipse.birt.report.model.elements.interfaces.IReportDesignModel

public class ReportDesignHandle
extends ModuleHandle
implements org.eclipse.birt.report.model.elements.interfaces.IReportDesignModel

Represents the overall report design. The report design defines a set of properties that describe the design as a whole like author, base and comments etc.

Besides properties, it also contains a variety of elements that make up the report. These include:

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.
Body A list of the visual report content. Content is made up of one or more sections. A section is a report item that fills the width of the page. It can contain Text, Grid, List, Table, etc. elements
Scratch Pad Temporary place to move report items while restructuring a report.
Translations The list of externalized messages specifically for this report.
Images A list of images embedded in this report.

Module allow to use the components defined in Library.

                      // Include one library
                      
                      ReportDesignHandle designHandle = ...;
                      designHandle.includeLibrary( "libA.rptlibrary", "LibA" );
                      LibraryHandle libraryHandle = designHandle.getLibrary("LibA");
                       
                      // Create one label based on the one in library
                     
                      LabelHandle labelHandle = (LabelHandle) libraryHandle.findElement("companyNameLabel");
                      LabelHandle myLabelHandle = (LabelHandle) designHandle.getElementFactory().newElementFrom( labelHandle, "myLabel" );
                     
                      // Add the new label into design file
                     
                      designHandle.getBody().add(myLabelHandle);
                   
 

See Also:
ReportDesign

Field Summary
 
Fields inherited from class org.eclipse.birt.report.model.api.ModuleHandle
isInitialized
 
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
module
 
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IReportDesignModel
ACL_EXPRESSION_PROP, AFTER_FACTORY_METHOD, AFTER_RENDER_METHOD, BEFORE_FACTORY_METHOD, BEFORE_RENDER_METHOD, BIDI_ORIENTATION_PROP, BODY_SLOT, CASCADE_ACL_PROP, CHARSET, CHEAT_SHEET_PROP, CSSES_PROP, CUBE_SLOT, ENABLE_ACL_PROP, ICON_FILE_PROP, LAYOUT_PREFERENCE_PROP, REFRESH_RATE_PROP, SCRATCH_PAD_SLOT, SLOT_COUNT, STYLE_SLOT, TEMPLATE_PARAMETER_DEFINITION_SLOT, THUMBNAIL_PROP
 
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
ReportDesignHandle(org.eclipse.birt.report.model.elements.ReportDesign design)
          Constructs a handle with the given design.
 
Method Summary
 void addCss(CssStyleSheetHandle sheetHandle)
          Includes one css with the given css file name.
 void addCss(IncludedCssStyleSheet cssStruct)
          Includes one CSS structure with the given IncludedCssStyleSheet.
 void addCss(java.lang.String fileName)
          Includes one css with the given css file name.
 void cacheValues()
          Caches values for all elements, styles, etc.
 boolean canAddCssStyleSheet(CssStyleSheetHandle sheetHandle)
          Check style sheet can be added or not.
 boolean canAddCssStyleSheet(java.lang.String fileName)
          Check style sheet can be added or not.
 boolean canDropCssStyleSheet(CssStyleSheetHandle sheetHandle)
          Check style sheet can be droped or not.
 boolean canRenameCss(IncludedCssStyleSheetHandle handle, java.lang.String newFileName)
          Checks css can be renamed or not.
 boolean cascadeACL()
          Returns true (the default), the design's ACL is automatically propagated to all its directly contained child elements and are added to their ACLs.
 void deleteThumbnail()
          Deletes the thumbnail image in the design.
 void dropCss(CssStyleSheetHandle sheetHandle)
          Drops the given css style sheet of this design file.
 CssStyleSheetHandle findCssStyleSheetHandleByFileName(java.lang.String fileName)
          Gets CssStyleSheetHandle by file name.
 IncludedCssStyleSheetHandle findIncludedCssStyleSheetHandleByFileName(java.lang.String fileName)
          Gets IncludedCssStyleSheetHandle by file name.
 java.lang.String getACLExpression()
          Returns the ACL expression associated with the design instance.
 java.lang.String getAfterFactory()
          Returns the script called at the end of the Factory after closing the report document (if any).
 java.lang.String getAfterRender()
          Returns the script called after starting a presentation time action.
 java.util.List getAllBookmarks()
          Gets all bookmarks defined in this module.
 java.util.List getAllCssStyleSheets()
          Gets all css styles sheet
 java.util.List<IncludedCssStyleSheetHandle> getAllExternalIncludedCsses()
          Gets the list of the included css style sheets that set the external URI.
 java.util.List getAllTocs()
          Gets all TOCs defined in this module.
 java.lang.String getBase()
          Returns the base directory to use when computing relative links from this report.
 java.lang.String getBeforeFactory()
          Returns the script called at the start of the Factory after the initialize( ) method and before opening the report document (if any).
 java.lang.String getBeforeRender()
          Returns the script called before starting a presentation time action.
 java.lang.String getBidiOrientation()
          Gets Bidi orientation value.
 SlotHandle getBody()
          Returns a slot handle to work with the sections in the report's Body slot.
 java.lang.String getCheatSheet()
          Gets the design cheat sheet file path.
 SlotHandle getCubes()
          Gets the slot handle to work with all cube elements within the report.
 java.lang.String getDisplayName()
          Gets the display name.
 java.lang.String getDisplayNameKey()
          Gets the resource key of the display name.
 java.lang.String getIconFile()
          Gets the design icon/thumbnail file path.
 java.lang.String getLayoutPreference()
          Gets the layout preference of this report design.
 int getRefreshRate()
          Returns the refresh rate when viewing the report.
 java.util.List getReportItemsBasedonTempalates()
          Gets report items which holds a template definition, that is, report item in body slot and page slot.
 SlotHandle getScratchPad()
          Returns a slot handle to work with the scratched elements within the report, which are no longer needed or are in the process of rearranged.
 SlotHandle getStyles()
          Returns a slot handle to work with the styles within the report.
 byte[] getThumbnail()
          Gets the thumbnail image encoded in ISO-8859-1.
 void importCssStyles(CssStyleSheetHandle stylesheet, java.util.List selectedStyles)
          (non-Javadoc)
 java.util.Iterator includeCssesIterator()
          Returns the iterator over all included css style sheets.
 java.util.Iterator includeLibraryScriptsIterator()
          Returns the list of all the included script file of the libraries.
 boolean isDirectionRTL()
          Examines whether the resolved direction of this design element is Right to Left or not.
 boolean isEnableACL()
          Returns true if the ACL feature is enable; otherwise false.
 void reloadCss(CssStyleSheetHandle sheetHandle)
          Reloads the css with the given css file path.
 void renameCss(IncludedCssStyleSheetHandle handle, java.lang.String newFileName)
          Renames both IncludedCssStyleSheet and CSSStyleSheet to newFileName.
 void setACLExpression(java.lang.String expr)
          Sets the ACL expression associated with the design instance.
 void setAfterFactory(java.lang.String value)
          Sets the script called at the end of the Factory after closing the report document (if any).
 void setAfterRender(java.lang.String value)
          Sets the script called after starting a presentation time action.
 void setBase(java.lang.String base)
          Sets the base directory to use when computing relative links from this report.
 void setBeforeFactory(java.lang.String value)
          Sets the script called at the start of the Factory after the initialize( ) method and before opening the report document (if any).
 void setBeforeRender(java.lang.String value)
          Sets the script called before starting a presentation time action.
 void setBidiOrientation(java.lang.String bidiOrientation)
          Sets Bidi orientation value.
 void setCascadeACL(boolean cascadeACL)
          Sets the flag to control whether to cascade ACL
 void setCheatSheet(java.lang.String cheatSheet)
          Sets the design cheat sheet file path.
 void setDisplayName(java.lang.String displayName)
          Sets the display name.
 void setDisplayNameKey(java.lang.String displayNameKey)
          Sets the resource key of the display name.
 void setEnableACL(boolean enableACL)
          Sets the flag to control whether to enable ACL.
 void setIconFile(java.lang.String iconFile)
          Sets the design icon/thumbnail file path.
 void setLayoutPreference(java.lang.String layout)
          Sets the layout preference of this report design.
 void setRefreshRate(int rate)
          Sets the refresh rate when viewing the report.
 void setThumbnail(byte[] data)
          Sets the thumbnail image encoded in ISO-8859-1.
 
Methods inherited from class org.eclipse.birt.report.model.api.ModuleHandle
addAttributeListener, addConfigVariable, addDisposeListener, addImage, addIncludeScript, addResourceChangeListener, addScriptLib, addTranslation, addValidationListener, checkReport, close, configVariablesIterator, copy, customColorsIterator, drop, dropAllScriptLibs, dropAndClear, dropConfigVariable, dropImage, dropImage, dropIncludeScript, dropLibrary, dropLibraryAndBreakExtends, dropScriptLib, dropScriptLib, dropTranslation, findCascadingParameterGroup, findColor, findConfigVariable, findCube, findDataSet, findDataSource, findElement, findImage, findJointDataSet, findLevel, findLibrary, findMasterPage, findNativeStyle, findParameter, findResource, findScriptLib, findStyle, findTemplateDataSet, findTheme, getAllCubes, getAllDataSets, getAllDataSources, getAllImages, getAllIncludeScripts, getAllLibraries, getAllPages, getAllParameters, getAllScriptLibs, getAllStyles, getAuthor, getCommandStack, getComponents, getCreatedBy, getDataSets, getDataSources, getDefaultUnits, getDescription, getDescriptionKey, getDisplayDescription, getElement, getElementByID, getErrorList, getFileEncoding, getFileName, getFlattenParameters, getHelpGuide, getIncludeResource, getInitialize, getLibraries, getLibraries, getLibrary, getLineNo, getLineNoByID, getMasterPages, getMessage, getMessage, getMessage, getMessageKeys, getParameters, getParametersAndParameterGroups, getResourceFolder, getSubject, getSymbolicName, getSystemId, getTheme, getTranslation, getTranslationKeys, getTranslations, getVersion, getVisibleCubes, getVisibleDataSets, getVisibleDataSources, getVisibleImages, getVisibleThemes, getWarningList, imagesIterator, includeLibrariesIterator, includeLibrary, includeScriptsIterator, initializeModule, isInclude, isReadOnly, needsSave, onSave, openCssStyleSheet, openCssStyleSheet, reloadLibraries, reloadLibrary, reloadLibrary, removeAttributeListener, removeDisposeListener, removeResourceChangeListener, removeValidationListener, rename, rename, rename, replaceConfigVariable, replaceImage, save, saveAs, scriptLibsIterator, serialize, setAuthor, setCreatedBy, setDefaultUnits, setDescription, setDescriptionKey, setFileName, setHelpGuide, setIncludeResource, setInitialize, setResourceFolder, setSubject, setSymbolicName, setTheme, setThemeName, shifIncludeScripts, shiftLibrary, shiftScriptLibs
 
Methods inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
add, add, addElement, addElement, addListener, addUserPropertyDefn, cachePropertyHandles, canContain, canContain, canContain, canContain, canDrop, canEdit, canTransformToTemplate, clearAllProperties, clearContents, clearProperty, clientsIterator, copyPropertyTo, createTemplateElement, derivedIterator, doSort, drop, drop, dropAndClear, dropAndClear, dropUserPropertyDefn, findContentSlot, getBooleanProperty, getChoices, getColorProperty, getContainer, getContainerPropertyHandle, getContainerSlotHandle, getContent, getContentCount, getContents, getDefn, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getEventHandlerClass, getExtends, getExternalizedValue, getExternalizedValue, getExternalizedValue, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getMethods, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getProperty, getPropertyBinding, getPropertyBindings, getPropertyDefn, getPropertyHandle, getPropertyIterator, getQualifiedName, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, initializeSlotHandles, isInTemplateParameter, isTemplateParameterValue, isValid, localize, move, move, moveTo, moveTo, moveTo, moveTo, paste, paste, paste, paste, removeListener, revertToReportItem, revertToTemplate, semanticCheck, setEncryption, setEventHandlerClass, setExtends, setExtendsElement, setExtendsName, setFloatProperty, setIntProperty, setName, setNumberProperty, setProperties, setProperty, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, shift, showError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportDesignHandle

public ReportDesignHandle(org.eclipse.birt.report.model.elements.ReportDesign design)
Constructs a handle with the given design. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.

Parameters:
design - the report design
Method Detail

getAfterFactory

public java.lang.String getAfterFactory()
Returns the script called at the end of the Factory after closing the report document (if any). This is the last method called in the Factory.

Returns:
the script

getAfterRender

public java.lang.String getAfterRender()
Returns the script called after starting a presentation time action.

Returns:
the script

getBase

public java.lang.String getBase()
Returns the base directory to use when computing relative links from this report. Especially used for searching images, library and so.

Returns:
the base directory

getBeforeFactory

public java.lang.String getBeforeFactory()
Returns the script called at the start of the Factory after the initialize( ) method and before opening the report document (if any).

Returns:
the script

getBeforeRender

public java.lang.String getBeforeRender()
Returns the script called before starting a presentation time action.

Returns:
the script

getBody

public SlotHandle getBody()
Returns a slot handle to work with the sections in the report's Body slot. The order of sections within the slot determines the order in which the sections print.

Returns:
A handle for working with the report sections.

getRefreshRate

public int getRefreshRate()
Returns the refresh rate when viewing the report.

Returns:
the refresh rate

getScratchPad

public SlotHandle getScratchPad()
Returns a slot handle to work with the scratched elements within the report, which are no longer needed or are in the process of rearranged.

Returns:
A handle for working with the scratched elements.

includeLibraryScriptsIterator

public java.util.Iterator includeLibraryScriptsIterator()
Returns the list of all the included script file of the libraries. Each one is the instance of IncludeScriptHandle

Returns:
the iterator of included scripts.

setAfterFactory

public void setAfterFactory(java.lang.String value)
Sets the script called at the end of the Factory after closing the report document (if any). This is the last method called in the Factory.

Parameters:
value - the script to set.

setAfterRender

public void setAfterRender(java.lang.String value)
Sets the script called after starting a presentation time action.

Parameters:
value - the script to set.

setBase

public void setBase(java.lang.String base)
Sets the base directory to use when computing relative links from this report. Especially used for searching images, library and so.

Parameters:
base - the base directory to set

setBeforeFactory

public void setBeforeFactory(java.lang.String value)
Sets the script called at the start of the Factory after the initialize( ) method and before opening the report document (if any).

Parameters:
value - the script to set.

setBeforeRender

public void setBeforeRender(java.lang.String value)
Sets the script called before starting a presentation time action.

Parameters:
value - the script to set.

setRefreshRate

public void setRefreshRate(int rate)
Sets the refresh rate when viewing the report.

Parameters:
rate - the refresh rate

getStyles

public SlotHandle getStyles()
Returns a slot handle to work with the styles within the report. Note that the order of the styles within the slot is unimportant.

Overrides:
getStyles in class ModuleHandle
Returns:
A handle for working with the styles.

getAllCssStyleSheets

public java.util.List getAllCssStyleSheets()
Gets all css styles sheet

Returns:
each item is CssStyleSheetHandle

importCssStyles

public void importCssStyles(CssStyleSheetHandle stylesheet,
                            java.util.List selectedStyles)
(non-Javadoc)

Specified by:
importCssStyles in class ModuleHandle
Parameters:
stylesheet - the style sheet handle that contains all the selected styles
selectedStyles - the selected style list
See Also:
org.eclipse.birt.report.model.api.ModuleHandle#importCssStyles(org. eclipse.birt.report.model.api.css.CssStyleSheetHandle, java.util.List)

setDisplayNameKey

public void setDisplayNameKey(java.lang.String displayNameKey)
                       throws SemanticException
Sets the resource key of the display name.

Parameters:
displayNameKey - the resource key of the display name
Throws:
SemanticException - if the display name resource-key property is locked or not defined on this design.

getDisplayNameKey

public java.lang.String getDisplayNameKey()
Gets the resource key of the display name.

Returns:
the resource key of the display name

setDisplayName

public void setDisplayName(java.lang.String displayName)
                    throws SemanticException
Sets the display name.

Parameters:
displayName - the display name
Throws:
SemanticException - if the display name property is locked or not defined on this design.

getDisplayName

public java.lang.String getDisplayName()
Gets the display name.

Returns:
the display name

setIconFile

public void setIconFile(java.lang.String iconFile)
                 throws SemanticException
Sets the design icon/thumbnail file path.

Parameters:
iconFile - the design icon/thumbnail file path to set
Throws:
SemanticException - if the property is locked or not defined on this design.

getIconFile

public java.lang.String getIconFile()
Gets the design icon/thumbnail file path.

Returns:
the design icon/thumbnail file path

setCheatSheet

public void setCheatSheet(java.lang.String cheatSheet)
                   throws SemanticException
Sets the design cheat sheet file path.

Parameters:
cheatSheet - the design cheat sheet file path to set
Throws:
SemanticException - if the property is locked or not defined on this design.

getCheatSheet

public java.lang.String getCheatSheet()
Gets the design cheat sheet file path.

Returns:
the design cheat sheet file path

setThumbnail

public void setThumbnail(byte[] data)
                  throws SemanticException
Sets the thumbnail image encoded in ISO-8859-1.

Parameters:
data - the thumbnail image to set
Throws:
SemanticException - if the property is locked or not defined on this design.

getThumbnail

public byte[] getThumbnail()
Gets the thumbnail image encoded in ISO-8859-1.

Returns:
the thumbnail image

deleteThumbnail

public void deleteThumbnail()
                     throws SemanticException
Deletes the thumbnail image in the design.

Throws:
SemanticException - if the property is locked or not defined on this design.

getAllBookmarks

public java.util.List getAllBookmarks()
Gets all bookmarks defined in this module.

Returns:
All bookmarks defined in this module.

getAllTocs

public java.util.List getAllTocs()
Gets all TOCs defined in this module.

Returns:
All TOCs defined in this module.

getReportItemsBasedonTempalates

public java.util.List getReportItemsBasedonTempalates()
Gets report items which holds a template definition, that is, report item in body slot and page slot. Notice, nested template items is excluded.

Returns:
report items which holds a template definition, nested template items is excluded.

getCubes

public SlotHandle getCubes()
Description copied from class: ModuleHandle
Gets the slot handle to work with all cube elements within the report.

Specified by:
getCubes in class ModuleHandle
Returns:
cube slot handle

getLayoutPreference

public java.lang.String getLayoutPreference()
Gets the layout preference of this report design. It can be one of the following:

Returns:
layout preference of report design

setLayoutPreference

public void setLayoutPreference(java.lang.String layout)
                         throws SemanticException
Sets the layout preference of this report design. The input layout can be one of the following:

Parameters:
layout - the layout to set
Throws:
SemanticException - if value is invalid

includeCssesIterator

public java.util.Iterator includeCssesIterator()
Returns the iterator over all included css style sheets. Each one is the instance of IncludedCssStyleSheetHandle

Returns:
the iterator over all included css style sheets.

findIncludedCssStyleSheetHandleByFileName

public IncludedCssStyleSheetHandle findIncludedCssStyleSheetHandleByFileName(java.lang.String fileName)
Gets IncludedCssStyleSheetHandle by file name.

Parameters:
fileName - the file name
Returns:
the includedCssStyleSheet handle.

findCssStyleSheetHandleByFileName

public CssStyleSheetHandle findCssStyleSheetHandleByFileName(java.lang.String fileName)
Gets CssStyleSheetHandle by file name.

Parameters:
fileName - the file name.
Returns:
the cssStyleSheet handle.

addCss

public void addCss(CssStyleSheetHandle sheetHandle)
            throws SemanticException
Includes one css with the given css file name. The new css will be appended to the css list.

Parameters:
sheetHandle - css style sheet handle
Throws:
SemanticException - if error is encountered when handling CssStyleSheet structure list.

addCss

public void addCss(java.lang.String fileName)
            throws SemanticException
Includes one css with the given css file name. The new css will be appended to the css list.

Parameters:
fileName - css file name
Throws:
SemanticException - if error is encountered when handling CssStyleSheet structure list.

addCss

public void addCss(IncludedCssStyleSheet cssStruct)
            throws SemanticException
Includes one CSS structure with the given IncludedCssStyleSheet. The new css will be appended to the CSS list.

Parameters:
cssStruct - the CSS structure
Throws:
SemanticException - if error is encountered when handling CssStyleSheet structure list.

renameCss

public void renameCss(IncludedCssStyleSheetHandle handle,
                      java.lang.String newFileName)
               throws SemanticException
Renames both IncludedCssStyleSheet and CSSStyleSheet to newFileName.

Parameters:
handle - the includedCssStyleSheetHandle
newFileName - the new file name
Throws:
SemanticException

canRenameCss

public boolean canRenameCss(IncludedCssStyleSheetHandle handle,
                            java.lang.String newFileName)
                     throws SemanticException
Checks css can be renamed or not.

Parameters:
handle - the included css style sheet handle.
newFileName - the new file name.
Returns:
true can be renamed.else return false
Throws:
SemanticException

dropCss

public void dropCss(CssStyleSheetHandle sheetHandle)
             throws SemanticException
Drops the given css style sheet of this design file.

Parameters:
sheetHandle - the css to drop
Throws:
SemanticException - if error is encountered when handling CssStyleSheet structure list. Or it maybe because that the given css is not found in the design. Or that the css has descedents in the current module

canDropCssStyleSheet

public boolean canDropCssStyleSheet(CssStyleSheetHandle sheetHandle)
Check style sheet can be droped or not.

Parameters:
sheetHandle -
Returns:
true can be dropped.else return false

canAddCssStyleSheet

public boolean canAddCssStyleSheet(CssStyleSheetHandle sheetHandle)
Check style sheet can be added or not.

Parameters:
sheetHandle -
Returns:
true can be added.else return false

canAddCssStyleSheet

public boolean canAddCssStyleSheet(java.lang.String fileName)
Check style sheet can be added or not.

Parameters:
fileName -
Returns:
true can be added.else return false

reloadCss

public void reloadCss(CssStyleSheetHandle sheetHandle)
               throws SemanticException
Reloads the css with the given css file path. If the css already is included directly, reload it. If the css is not included, exception will be thrown.

Parameters:
sheetHandle - css style sheet handle.
Throws:
SemanticException - if error is encountered when handling CssStyleSheet structure list. Or it maybe because that the given css is not found in the design. Or that the css has descedents in the current module

getBidiOrientation

public java.lang.String getBidiOrientation()
Gets Bidi orientation value. The return value is defined in DesignChoiceConstants and can be one of:
  • BIDI_DIRECTION_LTR
  • BIDI_DIRECTION_RTL

Returns:
the Bidi orientation value

setBidiOrientation

public void setBidiOrientation(java.lang.String bidiOrientation)
                        throws SemanticException
Sets Bidi orientation value. The input value is defined in DesignChoiceConstants and can be one of:
  • BIDI_DIRECTION_LTR
  • BIDI_DIRECTION_RTL

Parameters:
bidiOrientation - orientation value to be set
Throws:
SemanticException

isDirectionRTL

public boolean isDirectionRTL()
Description copied from class: DesignElementHandle
Examines whether the resolved direction of this design element is Right to Left or not.

Overrides:
isDirectionRTL in class DesignElementHandle
Returns:
true if the direction is RTL, false otherwise

isEnableACL

public boolean isEnableACL()
Returns true if the ACL feature is enable; otherwise false. By default, it is false.

Returns:
the flag to control whether to enable ACL

setEnableACL

public void setEnableACL(boolean enableACL)
                  throws SemanticException
Sets the flag to control whether to enable ACL.

Parameters:
enableACL - true if to enable ACL, otherwise false
Throws:
SemanticException - if the property is locked by masks

getACLExpression

public java.lang.String getACLExpression()
Returns the ACL expression associated with the design instance.

Returns:
the expression in string

setACLExpression

public void setACLExpression(java.lang.String expr)
                      throws SemanticException
Sets the ACL expression associated with the design instance.

Parameters:
expr - the expression in string
Throws:
SemanticException - if the property is locked by masks

cascadeACL

public boolean cascadeACL()
Returns true (the default), the design's ACL is automatically propagated to all its directly contained child elements and are added to their ACLs. Otherwise false.

Returns:
the flag to control whether to cascade ACL

setCascadeACL

public void setCascadeACL(boolean cascadeACL)
                   throws SemanticException
Sets the flag to control whether to cascade ACL

Parameters:
cascadeACL - true (the default), a design's ACL is automatically propagated to all its directly contained child elements and are added to their ACLs. Otherwise false.
Throws:
SemanticException - if the property is locked by masks

getAllExternalIncludedCsses

public java.util.List<IncludedCssStyleSheetHandle> getAllExternalIncludedCsses()
Gets the list of the included css style sheets that set the external URI. The css style might be included by the design handle itself and the theme which the design refers. Each item in the list is instance of IncludedCssStyleSheetHandle.

Returns:
list of all the included css style sheet that set the external URI

cacheValues

public void cacheValues()
Caches values for all elements, styles, etc. The caller must guarantee this method runs in single thread and have no synchronization issue. Whenever the user changes element values, should recall this method.



Copyright © 2008 Actuate Corp. All rights reserved.