Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. 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 PortletInstanceControl

    @ControlInterface
    public interface PortletInstanceControl

A custom control interface used to interact with portlet instances.

Method Summary
`PortletInstanceId` | `createSuccessor(DesktopDefinitionId desktopDefinitionId, PortletInstanceId id, ResourceContext context)` Creates a successor instance and returns its instance ID.
`PortletInstanceId[]` | `getAllSuccessors(PortletInstanceId id, ResourceContext context)` Returns a list of all successor instances including successors of successors.
`PortletInstance` | `getPortletInstance(PortletInstanceId id, ResourceContext context)` Getter for returning a single `PortletInstance`.
`PortletView` | `getPortletView(PortletInstanceId id, ResourceContext context)` Getter for returning an immutable deep copy of a `PortletView`.
`PortletInstanceId` | `getPredecessor(PortletInstanceId id, ResourceContext context)` Returns the instance ID of the predecessor to the given instance ID.
`PortletInstanceId[]` | `getSuccessors(PortletInstanceId id, ResourceContext context)` Returns a list of successor instances.
`PortletInstance` | `updatePortletInstance(PortletInstance portletInstance, DesktopDefinitionId desktopDefinitionId, ResourceContext context)` Update the portlet instance within the context of a desktop.
`PortletInstance` | `updatePortletInstance(PortletInstance portletInstance, ResourceContext context)` Update the portlet instance outside the context of a desktop (in a Library).
`PortletInstance` | `updateTheme(ThemeDefinitionId themeId, PortletInstanceId portletId, String webApp, PortalPath portalPath, DesktopPath desktopPath, ResourceContext context)` Update the portlet instance Theme setting.

Method Detail

### getPortletView

    PortletView getPortletView(PortletInstanceId id,
                               ResourceContext context)
                               throws ToolsException

  Getter for returning an immutable deep copy of a `PortletView`. The `PortletView` object, unlike the `PortletDefinition` or the `PortletInstance` objects contains a full set of references to all child portlets, portlets and so on. The `PortletView` object however is immutable.

  Parameters
    `id` - the ID of the portlet to get a view for.
    `context` - the resource context
  Returns
    an immutable deep copy PortletView object if one exists, otherwise null.
  Throws
    `ToolsException`

### getPortletInstance

    PortletInstance getPortletInstance(PortletInstanceId id,
                                       ResourceContext context)
                                       throws ToolsException

  Getter for returning a single `PortletInstance`.

  Parameters
    `id` - the ID of the portlet instance to retrieve
    `context` - the resource context
  Returns
    an fully populated PortletInstance object.
  Throws
    `ToolsException`
  See Also
    `PortletDefinition`

### updateTheme

    PortletInstance updateTheme(ThemeDefinitionId themeId,
                                PortletInstanceId portletId,
                                String webApp,
                                PortalPath portalPath,
                                DesktopPath desktopPath,
                                ResourceContext context)
                                throws ToolsException,
                                       NotEntitledException,
                                       ObjectNotFoundException

  Update the portlet instance Theme setting. If the portlet instance is the primary portlet instance then a new instance will be created specifically for this user or admin.

  For an admin editing a portlet outside the context of a desktop (in a Library) you should use `updatePortletInstance(PortletInstance)`

  .

  Parameters
    `themeId` - The ID of the new theme of this portlet instance, or null for none
    `portletId` - the ID of the portlet instance
    `webApp` - the web application name
    `portalPath` - the portal path
    `desktopPath` - the desktop path
    `context` - the resource context
  Returns
    the new updated portlet instance, with possible a new portletInstanceId
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`
  See Also
    `IPortletInstanceManager.updatePortletInstance(com.bea.netuix.application.manager.CustomizationContext,PortletInstance)`

### updatePortletInstance

    PortletInstance updatePortletInstance(PortletInstance portletInstance,
                                          DesktopDefinitionId desktopDefinitionId,
                                          ResourceContext context)
                                          throws ToolsException,
                                                 NotEntitledException,
                                                 ObjectNotFoundException

  Update the portlet instance within the context of a desktop. When not in visitor mode the admin instance is updated.

  Parameters
    `portletInstance` - the portlet instance containing the new data
    `desktopDefinitionId` - The desktop containing the instance to update.
    `context` - the resource context
  Returns
    the new updated portlet instance.
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`

### updatePortletInstance

    PortletInstance updatePortletInstance(PortletInstance portletInstance,
                                          ResourceContext context)
                                          throws ToolsException,
                                                 NotEntitledException,
                                                 ObjectNotFoundException

  Update the portlet instance outside the context of a desktop (in a Library). For Admins editing the primary instance (not placed on any page) use the PortletDefinitionManager.updatePortletDefinition().

  Parameters
    `portletInstance` - the portlet instance containing the new data
    `context` - the resource context
  Returns
    the new updated portlet instance.
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`

### getPredecessor

    PortletInstanceId getPredecessor(PortletInstanceId id,
                                     ResourceContext context)
                                     throws ToolsException,
                                            ObjectNotFoundException

  Returns the instance ID of the predecessor to the given instance ID. Returns `null` if there is no predecessor

  Parameters
    `id` - the ID of the portlet instance
    `context` - the resource context
  Returns
    predecessor instance ID
  Throws
    `ToolsException`
    `ObjectNotFoundException`

### getSuccessors

    PortletInstanceId[] getSuccessors(PortletInstanceId id,
                                      ResourceContext context)
                                      throws ToolsException,
                                             ObjectNotFoundException

  Returns a list of successor instances. Returns an empty list if there are no successors.

  Parameters
    `id` - the ID of the portlet instance
    `context` - the resource context
  Returns
    array of successor instance IDs
  Throws
    `ToolsException`
    `ObjectNotFoundException`

### getAllSuccessors

    PortletInstanceId[] getAllSuccessors(PortletInstanceId id,
                                         ResourceContext context)
                                         throws ToolsException,
                                                ObjectNotFoundException

  Returns a list of all successor instances including successors of successors. Returns an empty list if there are no successors.

  Parameters
    `id` - the ID of the portlet instance
    `context` - the resource context
  Returns
    array of successor instance IDs
  Throws
    `ToolsException`
    `ObjectNotFoundException`

### createSuccessor

    PortletInstanceId createSuccessor(DesktopDefinitionId desktopDefinitionId,
                                      PortletInstanceId id,
                                      ResourceContext context)
                                      throws ToolsException,
                                             NotEntitledException,
                                             ObjectNotFoundException

  Creates a successor instance and returns its instance ID. Returns the same instance ID if there is no need to create a successor instance.

  Parameters
    `desktopDefinitionId` - the desktop context to which this chage applies.
    `id` - the ID of the portlet instance
    `context` - the resource context
  Returns
    successor instance ID
  Throws
    `ToolsException`
    `NotEntitledException`
    `ObjectNotFoundException`

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

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.