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


public interface BookDefinitionControl

A custom control interface used to interact with BookDefinitions.


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

Method Detail

getBookView

com.bea.netuix.application.view.BookView getBookView(com.bea.netuix.application.identifier.BookDefinitionId id,
                                                     com.bea.portal.tools.common.ResourceContext context)
                                                     throws com.bea.portal.tools.common.exceptions.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
com.bea.portal.tools.common.exceptions.ToolsException

getBookView

com.bea.netuix.application.view.BookView getBookView(String definitionLabel,
                                                     String webAppName,
                                                     com.bea.portal.tools.common.ResourceContext context)
                                                     throws com.bea.portal.tools.common.exceptions.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
com.bea.portal.tools.common.exceptions.ToolsException

addNavigable

void addNavigable(com.bea.netuix.application.identifier.NavigableDefinitionId navigableToAddId,
                  int position,
                  com.bea.netuix.application.identifier.BookDefinitionId parentBookId,
                  com.bea.portal.tools.common.ResourceContext context)
                  throws com.bea.portal.tools.common.exceptions.ToolsException,
                         com.bea.netuix.application.exception.NotEntitledException,
                         com.bea.netuix.application.exception.ObjectNotFoundException,
                         com.bea.netuix.application.exception.MissingDataException,
                         com.bea.netuix.application.exception.DuplicateObjectException,
                         com.bea.netuix.application.exception.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
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException
com.bea.netuix.application.exception.ObjectNotFoundException
com.bea.netuix.application.exception.MissingDataException
com.bea.netuix.application.exception.DuplicateObjectException
com.bea.netuix.application.exception.IllegalDependencyException

moveNavigable

void moveNavigable(com.bea.netuix.application.identifier.NavigableDefinitionId navigableToMoveId,
                   int position,
                   com.bea.netuix.application.identifier.BookDefinitionId parentBookId,
                   com.bea.portal.tools.common.ResourceContext context)
                   throws com.bea.portal.tools.common.exceptions.ToolsException,
                          com.bea.netuix.application.exception.NotEntitledException,
                          com.bea.netuix.application.exception.ObjectNotFoundException,
                          com.bea.netuix.application.exception.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
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException
com.bea.netuix.application.exception.ObjectNotFoundException
com.bea.netuix.application.exception.IllegalDependencyException

removeNavigable

void removeNavigable(com.bea.netuix.application.identifier.NavigableDefinitionId navigableToRemoveId,
                     com.bea.netuix.application.identifier.BookDefinitionId parentBookId,
                     com.bea.portal.tools.common.ResourceContext context)
                     throws com.bea.portal.tools.common.exceptions.ToolsException,
                            com.bea.netuix.application.exception.NotEntitledException,
                            com.bea.netuix.application.exception.ObjectNotFoundException,
                            com.bea.netuix.application.exception.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
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException
com.bea.netuix.application.exception.ObjectNotFoundException
com.bea.netuix.application.exception.MissingDataException

setDefaultNavigable

void setDefaultNavigable(com.bea.netuix.application.identifier.NavigableDefinitionId navigableId,
                         com.bea.netuix.application.identifier.BookDefinitionId bookId,
                         com.bea.portal.tools.common.ResourceContext context)
                         throws com.bea.portal.tools.common.exceptions.ToolsException,
                                com.bea.netuix.application.exception.NotEntitledException,
                                com.bea.netuix.application.exception.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
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException
com.bea.netuix.application.exception.ObjectNotFoundException

updateThemeAndMenu

com.bea.netuix.application.identifier.BookDefinitionId updateThemeAndMenu(com.bea.netuix.application.identifier.MenuDefinitionId menuId,
                                                                          com.bea.netuix.application.identifier.ThemeDefinitionId themeId,
                                                                          com.bea.netuix.application.identifier.BookDefinitionId bookId,
                                                                          com.bea.portal.tools.common.ResourceContext context)
                                                                          throws com.bea.portal.tools.common.exceptions.ToolsException,
                                                                                 com.bea.netuix.application.exception.NotEntitledException,
                                                                                 com.bea.netuix.application.exception.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
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException
com.bea.netuix.application.exception.ObjectNotFoundException

getBookDefinitions

com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.definition.BookDefinition> getBookDefinitions(int pageSize,
                                                                                                                               com.bea.netuix.application.search.BookSearchCriteria criteria,
                                                                                                                               com.bea.portal.tools.common.ResourceContext context)
                                                                                                                               throws com.bea.portal.tools.common.exceptions.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
com.bea.portal.tools.common.exceptions.ToolsException

getBookDefinition

com.bea.netuix.application.definition.BookDefinition getBookDefinition(com.bea.netuix.application.identifier.BookDefinitionId id,
                                                                       com.bea.portal.tools.common.ResourceContext context)
                                                                       throws com.bea.portal.tools.common.exceptions.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
com.bea.portal.tools.common.exceptions.ToolsException

getBookDefinition

com.bea.netuix.application.definition.BookDefinition getBookDefinition(String definitionLabel,
                                                                       String webAppName,
                                                                       com.bea.portal.tools.common.ResourceContext context)
                                                                       throws com.bea.portal.tools.common.exceptions.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
com.bea.portal.tools.common.exceptions.ToolsException
See Also
BookDefinition

deleteBookDefinition

void deleteBookDefinition(com.bea.netuix.application.identifier.BookDefinitionId id,
                          boolean cascadeDelete,
                          com.bea.portal.tools.common.ResourceContext context)
                          throws com.bea.portal.tools.common.exceptions.ToolsException,
                                 com.bea.netuix.application.exception.ObjectInUseException,
                                 com.bea.netuix.application.exception.NotEntitledException,
                                 com.bea.netuix.application.exception.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
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.ObjectInUseException
com.bea.netuix.application.exception.NotEntitledException
com.bea.netuix.application.exception.ObjectNotFoundException

createBookDefinition

com.bea.netuix.application.definition.BookDefinition createBookDefinition(String title,
                                                                          String description,
                                                                          com.bea.netuix.application.identifier.MenuDefinitionId menuDefinitionId,
                                                                          boolean isPublic,
                                                                          String webApp,
                                                                          com.bea.portal.tools.common.ResourceContext context)
                                                                          throws com.bea.portal.tools.common.exceptions.ToolsException,
                                                                                 com.bea.netuix.application.exception.NotEntitledException,
                                                                                 com.bea.netuix.application.exception.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
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException
com.bea.netuix.application.exception.MissingDataException

setTitleAndDescription

void setTitleAndDescription(String title,
                            String description,
                            com.bea.netuix.application.identifier.BookDefinitionId id,
                            com.bea.portal.tools.common.ResourceContext context)
                            throws com.bea.portal.tools.common.exceptions.ToolsException,
                                   com.bea.netuix.application.exception.MissingDataException,
                                   com.bea.netuix.application.exception.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
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.MissingDataException
com.bea.netuix.application.exception.ObjectNotFoundException

getBookViewFromBookFile

com.bea.netuix.application.view.BookView getBookViewFromBookFile(String path,
                                                                 com.bea.portal.tools.common.ResourceContext context)
                                                                 throws IOException,
                                                                        com.bea.netuix.application.transform.disassembler.XmlDisassemblerException,
                                                                        FileNotFoundException,
                                                                        com.bea.portal.tools.common.exceptions.ToolsException
Parameters
path - the .book or .pinc file.
context - the resource context
Returns
Throws
IOException
com.bea.netuix.application.transform.disassembler.XmlDisassemblerException
FileNotFoundException
com.bea.portal.tools.common.exceptions.ToolsException


Copyright © 2006 BEA Systems, Inc. All Rights Reserved