Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 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 PortletDefinitionControl

    @ControlInterface
    public interface PortletDefinitionControl

A custom control interface used to interact with portlet definition.

Method Summary
`PortletDefinition` | `clonePortletDefinition(PortletDefinitionId id, ResourceContext context)` Clones and creates new Portlet Definition based on the provided portlet definition id.
`void` | `deletePortletDefinition(PortletDefinitionId id, boolean cascade, ResourceContext context)` Removes portlet definitions based on the provided list of portlet definition Ids with optional cascading.
`PortletDefinition` | `getPortletDefinition(PortletDefinitionId id, ResourceContext context)` Returns a single `PortletDefinition` based on the provided portlet definition ID.
`SortableFilterablePagedResult<PortletDefinition>` | `getPortletDefinitions(int pageSize, WebAppSearchCriteria criteria, ResourceContext context)` Returns every portlet definition for the provided webapp.
`PortletView` | `getPortletView(PortletDefinitionId id, ResourceContext context)` Returns a `PortletView` based on the provided portlet definition ID.
`void` | `setForkRender(boolean multithread, PortletDefinitionId id, ResourceContext context)` Convienience method for setting the Thread behavior for the provided portlet.
`void` | `updateCache(boolean isCacheable, int cacheTime, PortletDefinitionId id, ResourceContext context)` Updates the portlet definition cache setting.
`void` | `updateTheme(ThemeDefinitionId themeId, PortletDefinitionId portletId, ResourceContext context)` Updates a portlet definition theme based on the provided portlet definition Id.
`void` | `updateTitleAndDescription(String title, String description, PortletDefinitionId id, ResourceContext context)` Updates the portlet definition title and description.

Method Detail

### deletePortletDefinition

    void deletePortletDefinition(PortletDefinitionId id,
                                 boolean cascade,
                                 ResourceContext context)
                                 throws ObjectInUseException,
                                        ToolsException,
                                        NotEntitledException,
                                        ObjectNotFoundException

  Removes portlet definitions based on the provided list of portlet definition Ids with optional cascading. This method attempts to clean up all related security policies on the deleted Portlet. 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 portlet definition to delete
    `cascade` -
    `context` - the resource context
  Throws
    `ObjectInUseException`
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`

### clonePortletDefinition

    PortletDefinition clonePortletDefinition(PortletDefinitionId id,
                                             ResourceContext context)
                                             throws ToolsException,
                                                    NotEntitledException,
                                                    ObjectNotFoundException

  Clones and creates new Portlet Definition based on the provided portlet definition id. Note: Use the PortletDefinitionAction.copyPortletDefinition() action to clone a portlet and set its title and description.

  Parameters
    `id` - the portlet definition to clone
    `context` - the resource context
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`

### updateTheme

    void updateTheme(ThemeDefinitionId themeId,
                     PortletDefinitionId portletId,
                     ResourceContext context)
                     throws NotEntitledException,
                            ToolsException,
                            ObjectNotFoundException

  Updates a portlet definition theme based on the provided portlet definition Id.

  Parameters
    `themeId` - the new theme, or null for no theme
    `portletId` - the portlet to change the theme on
    `context` - the resource context
  Throws
    `NotEntitledException`
    `ToolsException`
    `ObjectNotFoundException`

### updateCache

    void updateCache(boolean isCacheable,
                     int cacheTime,
                     PortletDefinitionId id,
                     ResourceContext context)
                     throws NotEntitledException,
                            ToolsException,
                            ObjectNotFoundException

  Updates the portlet definition cache setting.

  Parameters
    `isCacheable` -
    `cacheTime` -
    `id` - the portlet definition id to specify cache settings on
    `context` - the resource context
  Throws
    `NotEntitledException`
    `ToolsException`
    `ObjectNotFoundException`

### updateTitleAndDescription

    void updateTitleAndDescription(String title,
                                   String description,
                                   PortletDefinitionId id,
                                   ResourceContext context)
                                   throws NotEntitledException,
                                          ToolsException,
                                          ObjectNotFoundException

  Updates the portlet definition title and description.

  Parameters
    `title` -
    `description` -
    `id` - the portlet definition id to specify the title and description
    `context` - the resource context
  Throws
    `NotEntitledException`
    `ToolsException`
    `ObjectNotFoundException`

### setForkRender

    void setForkRender(boolean multithread,
                       PortletDefinitionId id,
                       ResourceContext context)
                       throws ToolsException,
                              NotEntitledException,
                              ObjectNotFoundException

  Convienience method for setting the Thread behavior for the provided portlet. This can also be done by calling `updatePortletDefinition`.

  Parameters
    `multithread` -
    `id` - the ID of the portlet to set forked rendering behavior on
    `context` - the resource context
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`

### getPortletDefinition

    PortletDefinition getPortletDefinition(PortletDefinitionId id,
                                           ResourceContext context)
                                           throws ToolsException

  Returns a single `PortletDefinition` based on the provided portlet definition ID.

  Parameters
    `id` - the ID of the portlet to get the definition of
    `context` - the resource context
  Throws
    `ToolsException`

### getPortletDefinitions

    SortableFilterablePagedResult<PortletDefinition> getPortletDefinitions(int pageSize,
                                                                           WebAppSearchCriteria criteria,
                                                                           ResourceContext context)
                                                                           throws ToolsException

  Returns every portlet definition for the provided webapp.

  Parameters
    `pageSize` - the number of portlet definitions returned in each page
    `criteria` - the criteria for the search, including web app name
    `context` - the resource context
  Throws
    `ToolsException`

### getPortletView

    PortletView getPortletView(PortletDefinitionId id,
                               ResourceContext context)
                               throws ToolsException

  Returns a `PortletView` based on the provided portlet definition ID.

  Parameters
    `id` - the id of the portlet definition to get a view of.
    `context` - the resource context
  Throws
    `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 © 2008 BEA Systems, Inc. All Rights Reserved