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 IPortletDefinitionManager

All Known Subinterfaces:
  PortletDefinitionManager

    public interface IPortletDefinitionManager

This is the primary interface for performing persistent store operations on `PortletDefinitions`. 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.

"Definitions" can be thought of as objects in the library. Objects in the library are not associated to any one Desktop. In other words definitions can be placed on zero or more desktops and changes made in the library (to the definitions) are cascaded down to object on the desktops. If you are only interested in affecting a single desktop then use the `PortalCustomizationManager` and make changes to the "Instances".

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
`void` | `addPortletDefinitionListener(IPortletDefinitionManagerListener listener)` Add a listener which will be called whenever a portlet definition is created updated or deleted
`PortletDefinition` | `clonePortletDefinition(CustomizationContext customizationContext, PortletDefinitionId portletDefinitionId)` Clone an existing portlet definition and all of its localization resources.
`PortletDefinition` | `createPortletDefinition(CustomizationContext customizationContext, PortletDefinition portletDefinition)` Create a new portlet definition.
`void` | `deletePortletDefinition(CustomizationContext customizationContext, PortletDefinitionId portletDefinitionId)` Delete a portlet definition, but only if it is not used by other portlet instances.
`void` | `deletePortletDefinitionWithCascade(CustomizationContext customizationContext, PortletDefinitionId portletDefinitionId)` Delete a portlet definition and all portlet instances associated with this definition.
`int` | `getPortletCount(String webAppName)` Count the number of portlets defined for a webapp.
`PortletDefinition` | `getPortletDefinition(CustomizationContext customizationContext, PortletDefinitionId portletDefinitionId)` Getter for returning a single `PortletDefinition` object given a supplied portlet definition identifier.
`PortletDefinition` | `getPortletDefinition(CustomizationContext customizationContext, String definitionLabel, String webAppName)` Getter for returning a single `PortletDefinition` by Label.
`PortletDefinition` | `getPortletDefinitionFromFile(CustomizationContext customizationContext, String portletFile, String webAppName)` Return a portlet definitions with the portletFile equal to the supplied portlet file.
`PortletDefinition[]` | `getPortletDefinitions(CustomizationContext customizationContext, String webapp)` Getter for returning a list of all `PortletDefinitions` scoped to the supplied webapp.
`PortletDefinition[]` | `getPortletDefinitions(CustomizationContext customizationContext, String webapp, PortletDefinitionId firstPortletDefinitionId, int limit)` Returns `PortletDefinition`s in `definitionId` order (create order), starting with the supplied definitionId and limiting the result set to size `limit` If fewer `PortletDefinition`s exist than `limit`, then a smaller result set will be returned.
`SortableFilterablePagedResult<PortletDefinition>` | `getPortletDefinitions(CustomizationContext customizationContext, WebAppSearchCriteria criteria, int pageSize)` Get all portlet definitions for a webapp as a paged result.
`PortletView` | `getPortletView(CustomizationContext customizationContext, PortletDefinitionId portletDefinitionId)` Getter for returning an immutable deep `PortletView`.
`PortletDefinition[]` | `getPublicPortletDefinitions(CustomizationContext customizationContext, String webapp)` Getter for returning a list of all `PortletDefinitions` scoped to the supplied webapp and marked as public.
`Set<String>` | `getSpecifiedPortletUserProperties(PortletDefinitionId portletDefinitionId)` Get the set of specified WSRP user properties for the given portlet definition, or an empty set if none are specified.
`void` | `removePortletDefinitionListener(IPortletDefinitionManagerListener listener)` Add a listener which will be called whenever a portlet definition is created updated or deleted
`PortletDefinition[]` | `searchPortletDefinitions(CustomizationContext customizationContext, String webapp, String partialPortletTitle, int limit)` Search for portlets given the supplied search string.
`void` | `setSpecifiedPortletUserProperties(PortletDefinitionId portletDefinitionId, Collection<String> properties)` Set the set of specified WSRP user properties for the given portlet definition.
`void` | `updatePortletDefinition(CustomizationContext customizationContext, PortletDefinition portletDefinition)` Update the portlet definition with the new data.

Method Detail

### getPortletView

    PortletView getPortletView(CustomizationContext customizationContext,
                               PortletDefinitionId portletDefinitionId)
                               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 preferred locales
    `portletDefinitionId` - the unique portletDefinitionId.
  Returns
    an immutable deep PortletView object if one exists, otherwise null.
  Throws
    `RemoteException`

### getPortletDefinitions

    PortletDefinition[] getPortletDefinitions(CustomizationContext customizationContext,
                                              String webapp)
                                              throws RemoteException

  Getter for returning a list of all `PortletDefinitions` scoped to the supplied webapp.

  Parameters
    `customizationContext` - customization information such as preferred locales
    `webapp` - the web application these portlet definitions are scoped to.
  Returns
    an array of `PortletDefinition` objects if they exist, otherwise, an empty array.
  Throws
    `RemoteException`
  See Also
    `PortletDefinition`

### getPortletDefinitions

    PortletDefinition[] getPortletDefinitions(CustomizationContext customizationContext,
                                              String webapp,
                                              PortletDefinitionId firstPortletDefinitionId,
                                              int limit)
                                              throws RemoteException

  Returns `PortletDefinition`s in `definitionId` order (create order), starting with the supplied definitionId and limiting the result set to size `limit` If fewer `PortletDefinition`s exist than `limit`, then a smaller result set will be returned. If no definitions are found an empty array is returned. To start at the beginning of the list specify null as the `portletDefinitionId`. To retrieve from the end of the list and back specify null as the `portletDefinitionId` and a negative `limit`. To retrieve all the portletDefinitions in the database supply a limit of 0.
  The implmentation has to ensure that repeated calls to this method return `PortletDefinition`s in a consistent order.

  Parameters
    `customizationContext` - customization information such as preferred locales.
    `webapp` - the web application these portlet definitions are scoped to.
    `firstPortletDefinitionId` - optional parameter to indicate where the list should start.
    `limit` - the maximum result set size. Note the limit may be negative indicating a reverse sort order. To retrieve all the records specify a limit of zero. Note: some elements may be pruned because of entitlements.
  Returns
    array of `PortletDefinition`s no greater than `limit` in size.
  Throws
    `RemoteException`

### getPublicPortletDefinitions

    PortletDefinition[] getPublicPortletDefinitions(CustomizationContext customizationContext,
                                                    String webapp)
                                                    throws RemoteException

  Getter for returning a list of all `PortletDefinitions` scoped to the supplied webapp and marked as public.

  Parameters
    `customizationContext` - customization information such as preferred locales
    `webapp` - the web application these portlet definitions are scoped to.
  Returns
    an array of `PortletDefinition` objects if they exist, otherwise, an empty array.
  Throws
    `RemoteException`
  See Also
    `PortletDefinition`

### searchPortletDefinitions

    PortletDefinition[] searchPortletDefinitions(CustomizationContext customizationContext,
                                                 String webapp,
                                                 String partialPortletTitle,
                                                 int limit)
                                                 throws RemoteException

  Search for portlets given the supplied search string. Portlets with `titles` matching the supplied pattern will be returned. No more than `limit` results will be returned, however a smaller number may be returned. The implmentation has to ensure that repeated calls to this method return `PortletDefinition`s in a consistent order.

  Parameters
    `customizationContext` - customization information such as preferred locales.
    `webapp` - the web application these portlet definitions are scoped to.
    `partialPortletTitle` - the search string for portlet title match. Note: this string may contain special '*' and '?' characters, where '*' matches any number of characters and '?' matches any single character.
    `limit` - the maximum result set size. Note the limit may be negative indicating a reverse sort order. To retrieve all the records specify a limit of zero. Note: some elements may be pruned because of entitlements.
  Returns
    array of `PortletDefinition`s no greater than `limit` in size.
  Throws
    `RemoteException`

### getPortletDefinition

    PortletDefinition getPortletDefinition(CustomizationContext customizationContext,
                                           PortletDefinitionId portletDefinitionId)
                                           throws RemoteException

  Getter for returning a single `PortletDefinition` object given a supplied portlet definition identifier.

  Parameters
    `customizationContext` - customization information such as preferred locales
    `portletDefinitionId` - the unique portlet definition identifier.
  Returns
    a `PortletDefinition` object fully populated and internationalized, otherwise, null if the object does not exist.
  Throws
    `RemoteException`

### deletePortletDefinition

    void deletePortletDefinition(CustomizationContext customizationContext,
                                 PortletDefinitionId portletDefinitionId)
                                 throws RemoteException,
                                        ObjectNotFoundException,
                                        ObjectInUseException,
                                        NotEntitledException

  Delete a portlet definition, but only if it is not used by other portlet instances.

  Parameters
    `customizationContext` - customization information such as preferred locales
    `portletDefinitionId` - the id of the portlet definition to delete.
  Throws
    `ObjectNotFoundException` - if the portletDefinitionId is bogus
    `ObjectInUseException` - if portlet instances are currently using this portlet definition
    `NotEntitledException` - the caller is not entitled to perform this operation.
    `RemoteException`
  See Also
    `deletePortletDefinitionWithCascade(com.bea.netuix.application.manager.CustomizationContext, com.bea.netuix.application.identifier.PortletDefinitionId)`

### deletePortletDefinitionWithCascade

    void deletePortletDefinitionWithCascade(CustomizationContext customizationContext,
                                            PortletDefinitionId portletDefinitionId)
                                            throws RemoteException,
                                                   ObjectNotFoundException,
                                                   NotEntitledException

  Delete a portlet definition and all portlet instances associated with this definition.

  Parameters
    `customizationContext` - customization information such as preferred locales
    `portletDefinitionId` - the id of the portlet definition to delete.
  Throws
    `ObjectNotFoundException` - if the portletDefinitionId is bogus
    `NotEntitledException` - the caller is not entitled to perform this operation.
    `RemoteException`
  See Also
    `deletePortletDefinition(com.bea.netuix.application.manager.CustomizationContext, com.bea.netuix.application.identifier.PortletDefinitionId)`

### updatePortletDefinition

    void updatePortletDefinition(CustomizationContext customizationContext,
                                 PortletDefinition portletDefinition)
                                 throws RemoteException,
                                        ObjectNotFoundException,
                                        NotEntitledException

  Update the portlet definition with the new data.

  Parameters
    `customizationContext` - customization information such as preferred locales
    `portletDefinition` - the portlet definition containing the new data
  Throws
    `ObjectNotFoundException` - if the LocalizationIntersectionId in the LocalizationResource is bogus.
    `RemoteException`
    `NotEntitledException`

### createPortletDefinition

    PortletDefinition createPortletDefinition(CustomizationContext customizationContext,
                                              PortletDefinition portletDefinition)
                                              throws RemoteException,
                                                     MissingDataException,
                                                     NotEntitledException,
                                                     DuplicateObjectException

  Create a new portlet definition.

  Parameters
    `customizationContext` - customization information such as preferred locales
    `portletDefinition` - the object containing the data to create the new portlet definition with.
  Returns
    a fully populated portlet definition object
  Throws
    `MissingDataException` - the pade definition object supplied is missing some vital data.
    `NotEntitledException` - caller is not entitled to perform this action
    `DuplicateObjectException` - if the supplied portlet's definition label is already in the database.
    `RemoteException`

### clonePortletDefinition

    PortletDefinition clonePortletDefinition(CustomizationContext customizationContext,
                                             PortletDefinitionId portletDefinitionId)
                                             throws RemoteException,
                                                    ObjectNotFoundException,
                                                    NotEntitledException

  Clone an existing portlet definition and all of its localization resources. The localization resources are slightly mutated with a '_' in front of them as to allow the administrator to distinguish from the original. Note: this method only clones the primary instance; any user instances derived from the original are not cloned.

  Parameters
    `customizationContext` - customization information such as preferred locales
    `portletDefinitionId` - the id of the portlet definition to clone
  Returns
    a fully populated portlet definition object
  Throws
    `ObjectNotFoundException` - if the portletDefinitionId is bogus.
    `NotEntitledException` - caller is not entitled to perform this action
    `RemoteException`

### getPortletDefinition

    PortletDefinition getPortletDefinition(CustomizationContext customizationContext,
                                           String definitionLabel,
                                           String webAppName)
                                           throws RemoteException

  Getter for returning a single `PortletDefinition` by Label. The `webAppName` name is the deployed name of the module, and is often the name of the WAR file or directory, although this is not always the case. This name is that name given in config.xml as the Name of the WebAppComponent element (and thus WebAppComponentMBean's Name attribute). Note that this name is not the name of the URL context root.

  Parameters
    `customizationContext` - customization information such as preferred locales
    `definitionLabel` - the unique definitionLabel for the portlet. this is an optional label that the developer can set.
    `webAppName` - the webapp this portlet is scoped to.
  Returns
    a `PortletDefinition` object fully populated and internationalized, otherwise, null if the object does not exist.
  Throws
    `RemoteException`

### getPortletDefinitionFromFile

    PortletDefinition getPortletDefinitionFromFile(CustomizationContext customizationContext,
                                                   String portletFile,
                                                   String webAppName)
                                                   throws RemoteException

  Return a portlet definitions with the portletFile equal to the supplied portlet file. The `webAppName` name is the deployed name of the module, and is often the name of the WAR file or directory, although this is not always the case. This name is that name given in config.xml as the Name of the WebAppComponent element (and thus WebAppComponentMBean's Name attribute). Note that this name is not the name of the URL context root.

  Parameters
    `customizationContext` -
    `portletFile` - the relative path to the portlet file from the domain directory example "beaApps/portal/.../myportlet.portlet"
    `webAppName` - the webapp this portlet is scoped to.
  Returns
    a portlet definition, if no portlet matched then null
  Throws
    `RemoteException`
  See Also
    `ApplicationHelper.getWebAppName(javax.servlet.ServletContext)`

### getSpecifiedPortletUserProperties

    Set<String> getSpecifiedPortletUserProperties(PortletDefinitionId portletDefinitionId)
                                                  throws RemoteException

  Get the set of specified WSRP user properties for the given portlet definition, or an empty set if none are specified.

  Throws
    `RemoteException`

### setSpecifiedPortletUserProperties

    void setSpecifiedPortletUserProperties(PortletDefinitionId portletDefinitionId,
                                           Collection<String> properties)
                                           throws RemoteException

  Set the set of specified WSRP user properties for the given portlet definition.

  Throws
    `RemoteException`

### getPortletCount

    int getPortletCount(String webAppName)
                        throws RemoteException

  Count the number of portlets defined for a webapp.

  Throws
    `RemoteException`

### getPortletDefinitions

    SortableFilterablePagedResult<PortletDefinition> getPortletDefinitions(CustomizationContext customizationContext,
                                                                           WebAppSearchCriteria criteria,
                                                                           int pageSize)
                                                                           throws RemoteException

  Get all portlet definitions for a webapp as a paged result.

  The returned PagedResult is sortable and filterable on the field "TITLE", and supports these filter methods:
  - FilterMethod.UNFILTERED
  - FilterMethod.BEGINS_WITH
  - FilterMethod.ENDS_WITH
  - FilterMethod.CONTAINS
  - FilterMethod.EQUALS
  However, the reSort and reFilter methods on the returned PagedResult ignore their locale arguments. If you want to requery with a different locale, you should call this method again after setting the desired locale in the CustomizationContext.

  Parameters
    `customizationContext` - customization information such as preferred locales and http request.
    `criteria` - used to specify the webapp
    `pageSize` - the number of item per page in the result.
  Returns
    SortableFilterablePagedResult
  Throws
    `RemoteException`

### addPortletDefinitionListener

    void addPortletDefinitionListener(IPortletDefinitionManagerListener listener)
                                      throws RemoteException

  Add a listener which will be called whenever a portlet definition is created updated or deleted

  Parameters
    `listener` - the listener to call
  Throws
    `RemoteException`

### removePortletDefinitionListener

    void removePortletDefinitionListener(IPortletDefinitionManagerListener listener)
                                         throws RemoteException

  Add a listener which will be called whenever a portlet definition is created updated or deleted

  Parameters
    `listener` - the listener to call
  Throws
    `RemoteException`

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.