Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, 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.netuix.application.manager
Interface IPortletInstanceManager

All Known Subinterfaces:
  PortalCustomizationManager

    public interface IPortletInstanceManager

This is the primary interface for performing persistent store operations on `PortletInstances`. In general this interface provides coarse grain getters and fine grain setters.

It is important to note that all methods on this interface are fully internationalized and entitled. All `titles` and `descriptions` on the objects returned by these methods are internationalized to the preferred locale. Also, all methods are entitled, meaning if the caller does not have the required credentials the method may return a subset of the actual list or be unable to perform the specified function.

Most "Instances" can be thought of as objects tied to a desktop, An Admin has instances derived from the library Definition, and the "end user" has instances derived from the admin instance. Changes made via these APIs require a DesktopDefinitionId and the changes are scoped to that desktop. In other words changes made here do not affect the library or other Desktops. If the "visitorMode" on the customization Context is set the false (default) and the user executing the call is in the "Admin" or "PortalSystemAdministrator" role then these changes take affect at the admin level, and affect ALL users. If the visitorMode is false then the changes only affect the calling user.

See Also
  `CustomizationContext.setVisitorMode(boolean)`
  This interface is intended to be implemented only by Oracle Weblogic Portal. Oracle Systems reserves the right to add abstract methods to this interface without notice. Implementations of this interface by other parties must not be expected to compile without change in future versions of Oracle Weblogic Portal.

Method Summary
`PortletInstanceId` | `createSuccessor(CustomizationContext customizationContext, DesktopDefinitionId desktopDefinitionId, PortletInstanceId portletInstanceId)` Creates a successor instance and returns its instance ID.
`PortletInstanceId` | `createSuccessor(CustomizationContext customizationContext, DesktopDefinitionId desktopDefinitionId, PortletInstanceId portletInstanceId, boolean forceCreateSuccessor)` Creates a successor instance and returns its instance ID.
`void` | `deletePortletInstance(CustomizationContext customizationContext, PortletInstanceId portletInstanceId)` Deletes a portlet instance.
`PortletInstanceId[]` | `getAllSuccessors(CustomizationContext customizationContext, PortletInstanceId portletInstanceId)` Returns a list of all successor instances including successors of successors.
`PortletInstanceId[]` | `getNonPlacedPortletInstanceIds()` Finds portlet instance IDs that are not associated with any placements.
`PortletInstance` | `getPortletInstance(CustomizationContext customizationContext, PortletInstanceId portletInstanceId)` Getter for returning a single `PortletInstance`.
`PortletView` | `getPortletView(CustomizationContext customizationContext, DesktopDefinitionId desktopDefinitionId, String instanceLabel)` Getter for returning an immutable deep `PortletView`.
`PortletView` | `getPortletView(CustomizationContext customizationContext, PortletInstanceId portletInstanceId)` Getter for returning an immutable deep `PortletView`.
`PortletInstanceId` | `getPredecessor(CustomizationContext customizationContext, PortletInstanceId portletInstanceId)` Returns the instance ID that the given instance is based on.
`PortletInstanceId[]` | `getSuccessors(CustomizationContext customizationContext, PortletInstanceId portletInstanceId)` Returns a list of successor instances.
`void` | `revertPortletInstance(CustomizationContext customizationContext, PortletInstanceId portletInstanceId)` This method removes a portlet instance and replaces all occurrences of it by a reference to the parent instance.
`void` | `revertPortletSuccessors(CustomizationContext customizationContext, PortletInstanceId portletInstanceId)` This method removes any customizations of a given portlet instance.
`void` | `revertUserPortletInstance(CustomizationContext customizationContext, DesktopDefinitionId desktop, String portletInstanceLabel, String username)` This method removes any customizations of a given portlet instance, for a given user.
`PortletInstance` | `updatePortletInstance(CustomizationContext customizationContext, DesktopDefinitionId desktopDefinitionId, PortletInstance portletInstance)` Update the portlet instance with the new data.
`PortletInstance` | `updatePortletInstance(CustomizationContext customizationContext, PortletInstance portletInstance)` Update the portlet instance outside the context of a desktop (i.e.

Method Detail

### getPortletView

    PortletView getPortletView(CustomizationContext customizationContext,
                               PortletInstanceId portletInstanceId)
                               throws RemoteException

  Getter for returning an immutable deep `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
    `customizationContext` - customization information such as Locales and DesktopInstanceId
    `portletInstanceId` - the unique portletInstanceId.
  Returns
    an immutable deep PortletView object if one exists, otherwise null.
  Throws
    `RemoteException`

### getPortletView

    PortletView getPortletView(CustomizationContext customizationContext,
                               DesktopDefinitionId desktopDefinitionId,
                               String instanceLabel)
                               throws ObjectNotFoundException,
                                      RemoteException

  Getter for returning an immutable deep `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
    `customizationContext` - customization information such as Locale, visitormode, and username.
    `desktopDefinitionId` - webapp, portal path and desktop path this portlet is on
    `instanceLabel` - of the portlet.
  Returns
    an immutable deep PortletView object if one exists, otherwise null.
  Throws
    `ObjectNotFoundException` - if the supplied desktop does not exist.
    `RemoteException`

### getPortletInstance

    PortletInstance getPortletInstance(CustomizationContext customizationContext,
                                       PortletInstanceId portletInstanceId)
                                       throws RemoteException

  Getter for returning a single `PortletInstance`.

  Parameters
    `customizationContext` - the preferred language, country and variant to which the titles and descriptions are returned.
  Returns
    a fully populated PortletInstance object.
  Throws
    `RemoteException`
  See Also
    `PortletDefinition`

### updatePortletInstance

    PortletInstance updatePortletInstance(CustomizationContext customizationContext,
                                          DesktopDefinitionId desktopDefinitionId,
                                          PortletInstance portletInstance)
                                          throws RemoteException,
                                                 ObjectNotFoundException,
                                                 NotEntitledException

  Update the portlet instance with the new data. 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 (i.e. in a library) you should use `updatePortletInstance(PortletInstance)`

  .

  Parameters
    `desktopDefinitionId` - the desktop context this instance is associated with.
    `portletInstance` - the portlet instance containing the new data
  Returns
    the new updated portlet instance, with possible a new portletInstanceId
  Throws
    `ObjectNotFoundException` - if the PortletInstanceId in the PortletInstance, or desktopInstanceId is bogus.
    `RemoteException`
    `NotEntitledException`
  See Also
    `updatePortletInstance(CustomizationContext,PortletInstance)`

### updatePortletInstance

    PortletInstance updatePortletInstance(CustomizationContext customizationContext,
                                          PortletInstance portletInstance)
                                          throws RemoteException,
                                                 ObjectNotFoundException,
                                                 NotEntitledException

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

  Parameters
    `portletInstance` - the portlet instance containing the new data
  Returns
    the new updated portlet instance.
  Throws
    `ObjectNotFoundException` - if the PortletInstanceId in the PortletInstance is bogus.
    `RemoteException`
    `NotEntitledException`

### getPredecessor

    PortletInstanceId getPredecessor(CustomizationContext customizationContext,
                                     PortletInstanceId portletInstanceId)
                                     throws RemoteException,
                                            ObjectNotFoundException

  Returns the instance ID that the given instance is based on. Returns null if there is no predecessor

  Parameters
    `portletInstanceId` - the portlet instance ID
  Returns
    successor instance ID
  Throws
    `ObjectNotFoundException` - if the PortletInstanceId does not exist.
    `RemoteException`

### getSuccessors

    PortletInstanceId[] getSuccessors(CustomizationContext customizationContext,
                                      PortletInstanceId portletInstanceId)
                                      throws RemoteException,
                                             ObjectNotFoundException

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

  Parameters
    `portletInstanceId` - the portlet instance ID
  Returns
    array of successor instance IDs
  Throws
    `ObjectNotFoundException` - if the PortletInstanceId does not exist.
    `RemoteException`

### getAllSuccessors

    PortletInstanceId[] getAllSuccessors(CustomizationContext customizationContext,
                                         PortletInstanceId portletInstanceId)
                                         throws RemoteException,
                                                ObjectNotFoundException

  Returns a list of all successor instances including successors of successors. Returns a zero-length array if this is a user instance. Otherwise this method returns all successor id's, including this id.

  Parameters
    `portletInstanceId` - the portlet instance ID
  Returns
    array of successor instance IDs
  Throws
    `ObjectNotFoundException` - if the PortletInstanceId does not exist.
    `RemoteException`

### createSuccessor

    PortletInstanceId createSuccessor(CustomizationContext customizationContext,
                                      DesktopDefinitionId desktopDefinitionId,
                                      PortletInstanceId portletInstanceId)
                                      throws RemoteException,
                                             ObjectNotFoundException,
                                             NotEntitledException

  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 change applies.
    `portletInstanceId` - the portlet instance ID
  Returns
    successor instance ID
  Throws
    `ObjectNotFoundException` - if the PortletInstanceId does not exist.
    `RemoteException`
    `NotEntitledException`

### createSuccessor

    PortletInstanceId createSuccessor(CustomizationContext customizationContext,
                                      DesktopDefinitionId desktopDefinitionId,
                                      PortletInstanceId portletInstanceId,
                                      boolean forceCreateSuccessor)
                                      throws RemoteException,
                                             ObjectNotFoundException,
                                             NotEntitledException

  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 change applies.
    `portletInstanceId` - the portlet instance ID
    `forceCreateSuccessor` - if `true` - forces the underlying store to create a new successor
  Returns
    successor instance ID
  Throws
    `ObjectNotFoundException` - if the PortletInstanceId does not exist.
    `RemoteException`
    `NotEntitledException`

### deletePortletInstance

    void deletePortletInstance(CustomizationContext customizationContext,
                               PortletInstanceId portletInstanceId)
                               throws RemoteException,
                                      NotEntitledException

  Deletes a portlet instance. Note that instances associated with other aggregating entities such as pages should not be deleted directly using this method.

  Parameters
    `customizationContext` - the `CustomizationContext`
    `portletInstanceId` - the instance id of the portlet to delete
  Throws
    `RemoteException`
    `NotEntitledException` - if the caller is entitled to delete the instance

### getNonPlacedPortletInstanceIds

    PortletInstanceId[] getNonPlacedPortletInstanceIds()
                                                       throws RemoteException

  Finds portlet instance IDs that are not associated with any placements.

  Throws
    `RemoteException`

### revertUserPortletInstance

    void revertUserPortletInstance(CustomizationContext customizationContext,
                                   DesktopDefinitionId desktop,
                                   String portletInstanceLabel,
                                   String username)
                                   throws RemoteException,
                                          ObjectNotFoundException,
                                          NotEntitledException

  This method removes any customizations of a given portlet instance, for a given user. Any page placements referring to a successor are updated to refer to the parent instance. All successor instances are deleted. This method traverses the entire tree of successors, so successors of successors are deleted, and so on.

  Parameters
    `customizationContext` - the `CustomizationContext`
    `desktop` - the parent DesktopDefinition. Only portlet instances belonging to this desktop will be affected.
    `portletInstanceLabel` - the portlet instance for which the successors should be deleted.
    `username` - Only portlets that have been customized by the given user will be affected
  Throws
    `ObjectNotFoundException` - if the PortletInstanceId does not exist.
    `RemoteException`
    `NotEntitledException`

### revertPortletSuccessors

    void revertPortletSuccessors(CustomizationContext customizationContext,
                                 PortletInstanceId portletInstanceId)
                                 throws RemoteException,
                                        ObjectNotFoundException,
                                        NotEntitledException

  This method removes any customizations of a given portlet instance. Any page placements referring to a successor are updated to refer to the parent instance. All successor instances are deleted. This method traverses the entire tree of successors, so successors of successors are deleted, and so on.

  Parameters
    `customizationContext` - the `CustomizationContext`
    `portletInstanceId` - the id of the portlet instance whose successors should be reverted
  Throws
    `ObjectNotFoundException` - if the PortletInstanceId does not exist.
    `RemoteException`
    `NotEntitledException`

### revertPortletInstance

    void revertPortletInstance(CustomizationContext customizationContext,
                               PortletInstanceId portletInstanceId)
                               throws RemoteException,
                                      ObjectNotFoundException,
                                      NotEntitledException

  This method removes a portlet instance and replaces all occurrences of it by a reference to the parent instance. You can use this method to undo a customization. Any page placements referring to this portlet are updated to refer to the parent instance. All successor instances are deleted. This method traverses the entire tree of successors, so successors of successors are deleted, and so on.

  Parameters
    `customizationContext` - the `CustomizationContext`
    `portletInstanceId` - the id of the portlet instance to be reverted
  Throws
    `ObjectNotFoundException` - if the PortletInstanceId does not exist.
    `RemoteException`
    `NotEntitledException`

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, 2009, 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.