Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.portal.tools.portal.controls
Interface BookDefinitionControl

    public interface BookDefinitionControl

A custom control interface used to interact with BookDefinitions.

Method Summary
`void` | `addNavigable(NavigableDefinitionId navigableToAddId, int position, BookDefinitionId parentBookId, ResourceContext context)` Adds a child page or book (a navigable) to the specified book.
`BookDefinition` | `createBookDefinition(String title, String description, MenuDefinitionId menuDefinitionId, boolean isPublic, String webApp, ResourceContext context)` Creates a new `BookDefinition` based off the supplied parameters.
`void` | `deleteBookDefinition(BookDefinitionId id, boolean cascadeDelete, ResourceContext context)` Deletes the specified `BookDefinition`.
`BookDefinition` | `getBookDefinition(BookDefinitionId id, ResourceContext context)` Returns the `BookDefinition` of the specified book definition id.
`BookDefinition` | `getBookDefinition(String definitionLabel, String webAppName, ResourceContext context)` Getter for returning a single `BookDefinition` object given a supplied book definition label.
`SortableFilterablePagedResult<BookDefinition>` | `getBookDefinitions(int pageSize, BookSearchCriteria criteria, ResourceContext context)` Returns a list of all the book definitions scoped to the web app.
`BookView` | `getBookView(BookDefinitionId id, ResourceContext context)` Returns the `BookView` of the specified book.
`BookView` | `getBookView(String definitionLabel, String webAppName, ResourceContext context)` Returns the `BookView` of the specified book.
`BookView` | `getBookViewFromBookFile(String path, ResourceContext context)`
`void` | `moveNavigable(NavigableDefinitionId navigableToMoveId, int position, BookDefinitionId parentBookId, ResourceContext context)` Moves a child book or page (a navigable) within the specified book.
`void` | `removeNavigable(NavigableDefinitionId navigableToRemoveId, BookDefinitionId parentBookId, ResourceContext context)` Removes a child book or page (a navigable) from the specified book.
`void` | `setDefaultNavigable(NavigableDefinitionId navigableId, BookDefinitionId bookId, ResourceContext context)` Sets the default navigable for a book.
`void` | `setTitleAndDescription(String title, String description, BookDefinitionId id, ResourceContext context)` Set the title and / or description for the specified book.
`BookDefinitionId` | `updateThemeAndMenu(MenuDefinitionId menuId, ThemeDefinitionId themeId, BookDefinitionId bookId, ResourceContext context)` Updates the appearance of a book.

Method Detail

### getBookView

    BookView getBookView(BookDefinitionId id,
                         ResourceContext context)
                         throws ToolsException

  Returns the `BookView` of the specified book. BookView's include the object's children unlike instances and definitions.

  Parameters
    `id` - the ID of the book to retrieve the view for.
    `context` - the resource context.
  Returns
    a BookView object. (immutable "deep" view of a book)
  Throws
    `ToolsException`

### getBookView

    BookView getBookView(String definitionLabel,
                         String webAppName,
                         ResourceContext context)
                         throws ToolsException

  Returns the `BookView` of the specified book. BookView's include the object's children unlike instances and definitions.

  Parameters
    `definitionLabel` - the unique book definition identifier.
    `webAppName` - the webapp this book is scoped to.
    `context` - the resource context.
  Returns
    a BookView object. (immutable "deep" view of a book)
  Throws
    `ToolsException`

### addNavigable

    void addNavigable(NavigableDefinitionId navigableToAddId,
                      int position,
                      BookDefinitionId parentBookId,
                      ResourceContext context)
                      throws ToolsException,
                             NotEntitledException,
                             ObjectNotFoundException,
                             MissingDataException,
                             DuplicateObjectException,
                             IllegalDependencyException

  Adds a child page or book (a navigable) to the specified book.

  Parameters
    `navigableToAddId` - the id of the page or book to add
    `position` - the position of the child within the book
    `parentBookId` - the ID of the book to add the navigable to
    `context` - the resource context.
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`
    `MissingDataException`
    `DuplicateObjectException`
    `IllegalDependencyException`

### moveNavigable

    void moveNavigable(NavigableDefinitionId navigableToMoveId,
                       int position,
                       BookDefinitionId parentBookId,
                       ResourceContext context)
                       throws ToolsException,
                              NotEntitledException,
                              ObjectNotFoundException,
                              IllegalDependencyException

  Moves a child book or page (a navigable) within the specified book.

  Parameters
    `navigableToMoveId` - the id of the page or book to move
    `position` - the new position of the child within the book
    `parentBookId` - the ID of the book to move the navigable in
    `context` - the resource context.
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`
    `IllegalDependencyException`

### removeNavigable

    void removeNavigable(NavigableDefinitionId navigableToRemoveId,
                         BookDefinitionId parentBookId,
                         ResourceContext context)
                         throws ToolsException,
                                NotEntitledException,
                                ObjectNotFoundException,
                                MissingDataException

  Removes a child book or page (a navigable) from the specified book.

  Parameters
    `navigableToRemoveId` - the id of the page or book to remove
    `parentBookId` - the ID of the book to remove the navigable from
    `context` - the resource context.
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`
    `MissingDataException`

### setDefaultNavigable

    void setDefaultNavigable(NavigableDefinitionId navigableId,
                             BookDefinitionId bookId,
                             ResourceContext context)
                             throws ToolsException,
                                    NotEntitledException,
                                    ObjectNotFoundException

  Sets the default navigable for a book. The page or book specified will be the first one rendered when the parent book is displayed.

  Parameters
    `navigableId` - the id of the page or book that will be the default
    `bookId` - the id of the book to set the default navigable for.
    `context` - the resource context
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`

### updateThemeAndMenu

    BookDefinitionId updateThemeAndMenu(MenuDefinitionId menuId,
                                        ThemeDefinitionId themeId,
                                        BookDefinitionId bookId,
                                        ResourceContext context)
                                        throws ToolsException,
                                               NotEntitledException,
                                               ObjectNotFoundException

  Updates the appearance of a book.

  Parameters
    `menuId` - the id of the menu to associate with the book. If `null`, no menu is associated with the book.
    `themeId` - the id of the theme to associate with the book. If `null`, no theme is associated with the book.
    `bookId` - the id of the book to update
    `context` - the resource context
  Returns
    the new book id of the resource
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`

### getBookDefinitions

    SortableFilterablePagedResult<BookDefinition> getBookDefinitions(int pageSize,
                                                                     BookSearchCriteria criteria,
                                                                     ResourceContext context)
                                                                     throws ToolsException

  Returns a list of all the book definitions scoped to the web app.

  Parameters
    `pageSize` - The page size for a page element inside the page iterator.
    `criteria` - the criteria to use in the search.
    `context` - the resource context.
  Returns
    a PagedResult object
  Throws
    `ToolsException`

### getBookDefinition

    BookDefinition getBookDefinition(BookDefinitionId id,
                                     ResourceContext context)
                                     throws ToolsException

  Returns the `BookDefinition` of the specified book definition id.

  Parameters
    `id` - the ID of the book to retrieve.
    `context` - the resource context.
  Returns
    a `BookDefintion` object.
  Throws
    `ToolsException`

### getBookDefinition

    BookDefinition getBookDefinition(String definitionLabel,
                                     String webAppName,
                                     ResourceContext context)
                                     throws ToolsException

  Getter for returning a single `BookDefinition` object given a supplied book definition label.

  Parameters
    `definitionLabel` - the unique book definition identifier.
    `webAppName` - the webapp this book is scoped to.
    `context` - the resource context.
  Returns
    a `BookDefinition` object fully populated and internationalized, otherwise, `null>/code> if the object does not exist.`
  Throws
    `ToolsException`
  See Also
    `BookDefinition`

### deleteBookDefinition

    void deleteBookDefinition(BookDefinitionId id,
                              boolean cascadeDelete,
                              ResourceContext context)
                              throws ToolsException,
                                     ObjectInUseException,
                                     NotEntitledException,
                                     ObjectNotFoundException

  Deletes the specified `BookDefinition`. Use the cascadeDelete parameter to either delete just the definition (false), or to delete the defintions and all instances of in any desktops (true). This method attempts to clean up all related security policies on the deleted Book. To achieve this, the current web app MUST be set in the `ResourceContext` via the setWebApp() method, otherwise a `NoWebAppFoundException` is thrown.

  Parameters
    `id` - the ID of the book to delete.
    `cascadeDelete` - if `true`, all instances in any desktops of the specified definition are also deleted. If `false`, only the definition is deleted.
    `context` - the resource context.
  Throws
    `ToolsException`
    `ObjectInUseException`
    `NotEntitledException`
    `ObjectNotFoundException`

### createBookDefinition

    BookDefinition createBookDefinition(String title,
                                        String description,
                                        MenuDefinitionId menuDefinitionId,
                                        boolean isPublic,
                                        String webApp,
                                        ResourceContext context)
                                        throws ToolsException,
                                               NotEntitledException,
                                               MissingDataException

  Creates a new `BookDefinition` based off the supplied parameters. You may specify whether the book will be public or not. Public books will be available to visitors via the visitor tools.

  Parameters
    `title` - the title of the `BookDefinition`
    `description` - the description of the `BookDefinition`
    `menuDefinitionId` - the menu to use for the `BookDefinition`. Pass in `null` for no menu.
    `isPublic` - whether or not to create the book as public.
    `webApp` - the web application this book definition will be scoped to.
    `context` - the resource context.
  Returns
    The newly created book definition.
  Throws
    `ToolsException`
    `NotEntitledException`
    `MissingDataException`

### setTitleAndDescription

    void setTitleAndDescription(String title,
                                String description,
                                BookDefinitionId id,
                                ResourceContext context)
                                throws ToolsException,
                                       MissingDataException,
                                       ObjectNotFoundException

  Set the title and / or description for the specified book.

  Parameters
    `title` - The new title for the book definiton, or `null` if the title should remain unaltered.
    `description` - the new description for the book definition, or `null` if the description should remain unaltered.
    `id` - the ID of the book to update.
    `context` - the resource context.
  Throws
    `ToolsException`
    `MissingDataException`
    `ObjectNotFoundException`

### getBookViewFromBookFile

    BookView getBookViewFromBookFile(String path,
                                     ResourceContext context)
                                     throws IOException,
                                            XmlDisassemblerException,
                                            FileNotFoundException,
                                            ToolsException

  Parameters
    `path` - the .book or .pinc file.
    `context` - the resource context
  Returns
  Throws
    `IOException`
    `XmlDisassemblerException`
    `FileNotFoundException`
    `ToolsException`

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

Copyright © 2006 BEA Systems, Inc. All Rights Reserved