Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.report.model.api
Class LibraryHandle

    java.lang.Object
      org.eclipse.birt.report.model.api.DesignElementHandle
          org.eclipse.birt.report.model.api.ModuleHandle
              org.eclipse.birt.report.model.api.LibraryHandle

All Implemented Interfaces:
  IModuleModel, org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel, org.eclipse.birt.report.model.elements.interfaces.ILibraryModel

    public class LibraryHandle

extends ModuleHandle
implements org.eclipse.birt.report.model.elements.interfaces.ILibraryModel

Represents the handle of library element. The library contains the resuable element components.

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.

There are two cases that this library handle represents:

- the library file that user opens directly
  In this case, user can take operations as same as design file.
- the library file that is included in one design file
  User can not take operations, because the included library file is read-only. Any operation on the library file of this type will throw runtime exception.

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.ILibraryModel
`CUBE_SLOT, SLOT_COUNT, THEMES_SLOT`

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, 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
`LibraryHandle(org.eclipse.birt.report.model.elements.Library library)` Constructs one library handle with the given library element.

Method Summary
`SlotHandle` | `getCubes()` Gets the slot handle to work with all cube elements within the report.
`org.eclipse.birt.report.model.core.DesignElement` | `getElement()` Returns the element to which this handle is attached.
`ModuleHandle` | `getHostHandle()` Returns the host handle which includes the library.
`java.lang.String` | `getNamespace()` Returns the library namespace, which identifies one library unqiuely in one design file.
`java.lang.String` | `getRelativeFileName()` If this library is included by a module, return the relative file name that is defined in the host's xml file.
`SlotHandle` | `getStyles()` Deprecated. uses the theme instead
`SlotHandle` | `getThemes()` Returns a slot handle to work with the themes within the library.
`void` | `importCssStyles(CssStyleSheetHandle stylesheet, java.util.List selectedStyles)` Import css file to theme.
`void` | `importCssStyles(CssStyleSheetHandle stylesheet, java.util.List selectedStyles, java.lang.String themeName)` Imports the selected styles in a `CssStyleSheetHandle` to the given theme of the library.
`boolean` | `isDirectionRTL()` Examines whether the resolved direction of this design element is Right to Left or not.

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, getElementByID, getErrorList, getFileEncoding, getFileName, getFlattenParameters, getHelpGuide, getIncludeResource, getInitialize, getLibraries, getLibraries, getLibrary, getLineNo, getLineNoByID, getMasterPages, getMessage, getMessage, getMessage, getMessageKeys, getParameters, getParametersAndParameterGroups, getResourceFolder, 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, 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, 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

### LibraryHandle

    public LibraryHandle(org.eclipse.birt.report.model.elements.Library library)

  Constructs one library handle with the given library element.

  Parameters:
    `library` - library element

Method Detail

### getHostHandle

    public ModuleHandle getHostHandle()

  Returns the host handle which includes the library.

  Returns:
    the host handle which include this library.

### getElement

    public org.eclipse.birt.report.model.core.DesignElement getElement()

  Description copied from class: `DesignElementHandle`
  Returns the element to which this handle is attached.

  Overrides:
    `getElement` in class `ModuleHandle`
  Returns:
    The attached element. Will be null if the handle is not attached.

### getNamespace

    public java.lang.String getNamespace()

  Returns the library namespace, which identifies one library unqiuely in one design file.

  Returns:
    the library namespace

### getThemes

    public SlotHandle getThemes()

  Returns a slot handle to work with the themes within the library. Note that the order of the data sets within the slot is unimportant.

  Returns:
    A handle for working with the themes.

### getStyles

    public SlotHandle getStyles()

  Deprecated. uses the theme instead

  Returns a slot handle to work with the styles within the library.

  Overrides:
    `getStyles` in class `ModuleHandle`
  Returns:
    A handle for working with the styles. Or `null` if the library has no values for the theme property

### importCssStyles

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

  Import css file to theme.

  Specified by:
    `importCssStyles` in class `ModuleHandle`
  Parameters:
    `stylesheet` - the style sheet handle that contains all the selected styles
    `selectedStyles` - the selected style list

### importCssStyles

    public void importCssStyles(CssStyleSheetHandle stylesheet,
                                java.util.List selectedStyles,
                                java.lang.String themeName)

  Imports the selected styles in a `CssStyleSheetHandle` to the given theme of the library. 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.

  Parameters:
    `stylesheet` - the style sheet handle that contains all the selected styles
    `selectedStyles` - the selected style list
    `themeName` - the name of the theme to put styles

### 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

### getRelativeFileName

    public java.lang.String getRelativeFileName()

  If this library is included by a module, return the relative file name that is defined in the host's xml file.

  Returns:
    the relative file name that is defined in the host's xml file

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.