# com.bea.netuix.application.manager.persistence.jdbc
PortletCategoryManagerImpl Class

public class PortletCategoryManagerImpl
extends `Object`
implements `IPortletCategoryManager`, `SessionBean`

PortletCategoryManagerImpl

Hierarchy
  `Object`
  `PortletCategoryManagerImpl`

All Implemented Interfaces
  `EnterpriseBean`, `IPortletCategoryManager`, `Serializable`, `SessionBean`

## Field Summary

`protected static `Debug`` | `debug` Debug

## Constructor Summary

PortletCategoryManagerImpl()

## Method Summary

`public void` | `addPortletDefinition`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, `PortletDefinitionId` pdId) Adds a `PortletDefinitionId` to a portlet category.
`public `PortletCategoryDefinition`` | `createCategory`(`CustomizationContext` customizationContext, `PortletCategoryDefinition` pcd) Creates a persistant version of a `PortletCategoryDefinition` from the provided `PortletCategoryDefinition`.
`public `PortletCategoryDefinition`` | `createRootCategory`(`CustomizationContext` customizationContext, `PortletCategoryDefinition` root) Creates and returns a ROOT category
`public int` | `deleteCategory`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId) Removes all (including localized) versions of a category.
`public void` | `deletePortletDefinition`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, `PortletDefinitionId` pdId) Deletes a `PortletDefinitionId` from a portlet category.
`public int` | `deletePortletDefinitions`(`CustomizationContext` customizationContext, `PortletDefinitionId` pdId) Deletes a `PortletDefinitionId` from all portlet categories.
`public void` | `ejbActivate`()
`public void` | `ejbCreate`()
`public void` | `ejbPassivate`()
`public void` | `ejbRemove`()
`public `PortletCategoryDefinitionId`[]` | `getAncestorIds`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId) Returns an array of `PortletCategoryDefinitionId`s that represent the ancestors of a category starting with the parent category and ending with the root.
`public `PortletCategoryDefinition`[]` | `getAncestors`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId) Returns an array of `PortletCategoryDefinition`s that represent the ancestors of a category starting with the parent category and ending with the root.
`public `PortletCategoryDefinition`[]` | `getCategories`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId`[] pcdId) Returns an array of `PortletCategoryDefinition`s corresponding to an array of `PortletCategoryDefinitionId`s.
`public `PortletCategoryDefinition`` | `getCategory`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId) Returns a `PortletCategoryDefinition` corresponding to a `PortletCategoryDefinitionId`.
`public int` | `getCategoryCount`(`CustomizationContext` customizationContext, `String` webAppName) Returns the number of categories recursively starting with the root category.
`public `PortletCategoryDefinitionId`[]` | `getCategoryIds`(`CustomizationContext` customizationContext, int begin, int end, `String` webAppName) Returns an array of `PorletCategoryDefinitionId`s in the `begin` and `end` range.
`public `PortletCategoryView`` | `getCategoryView`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId) Returns a `PortletCategoryView` corresponding to a `PortletCategoryDefinitionId`.
`public `PortletCategoryView`[]` | `getCategoryViews`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId`[] pcdId) Returns an array of `PortletCategoryView`s corresponding to an array of `PortletCategoryDefinitionId`s.
`public int` | `getNonCategorizedPortletDefinitionCount`(`CustomizationContext` customizationContext, `String` webAppName) Returns the number of `PortletDefinition`s that are not included under any category.
`public `PortletDefinitionId`[]` | `getNonCategorizedPortletDefinitionIds`(`CustomizationContext` customizationContext, int begin, int end, `String` webAppName) Returns noncategorized `PortletDefinitionId`s in the `begin` and `end` range.
`public `PortletDefinition`[]` | `getNonCategorizedPortletDefinitions`(`CustomizationContext` customizationContext, int begin, int end, `String` webAppName) Returns noncategorized `PortletDefinition`s in the `begin` and `end` range.
`public `PortletView`[]` | `getNonCategorizedPortletViews`(`CustomizationContext` customizationContext, int begin, int end, `String` webAppName) Returns noncategorized `PortletView`s in the `begin` and `end` range.
`public `PortletCategoryDefinitionId`[]` | `getPortletDefinitionCategories`(`CustomizationContext` customizationContext, `PortletDefinitionId` pdId) Returns all the `PortletCategoryDefinition`s that a `PortletDefinition` is a part of.
`public int` | `getPortletDefinitionCount`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId) Returns the number of `PortletDefinition`s under category `pcdId`.
`public `PortletDefinition`[]` | `getPortletDefinitions`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, int begin, int end) Returns `PortletDefinition`s in the `begin` and `end` range under the category `pcdId`.
`public `PortletView`[]` | `getPortletViews`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, int begin, int end) Returns `PortletView`s in the `begin` and `end` range under the category `pcdId`.
`public `PortletCategoryDefinition`` | `getRootCategory`(`CustomizationContext` customizationContext, `String` webAppName) Returns root of the PortletCategory hierarchy.
`public `PortletCategoryDefinition`[]` | `getSiblingCategories`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, int begin, int end) Returns an array of `PorletCategoryDefinition`s for sibling categories of the category represented by `pcdId` in the `begin` and `end` range.If fewer categories than (begin-end) exist then the former number of categories is returned.
`public int` | `getSiblingCategoryCount`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId) Returns the number of categories at the same level as a category.
`public `PortletCategoryDefinitionId`[]` | `getSiblingCategoryIds`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, int begin, int end) Returns an array of `PorletCategoryDefinitionId`s for sibling categories of the category represented by `pcdId` in the `begin` and `end` range.
`public `PortletCategoryView`[]` | `getSiblingCategoryViews`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, int begin, int end) Returns an array of `PorletCategoryView`s for sibling categories of the category represented by `pcdId` in the `begin` and `end` range.If fewer categories than (begin-end) exist then the former number of categories is returned.
`public `PortletCategoryDefinition`[]` | `getSubCategories`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, int begin, int end) Returns an array of `PorletCategoryDefinition`s for subcategories of the category represented by `pcdId` in the `begin` and `end` range.If fewer categories than (begin-end) exist then the former number of categories is returned.
`public int` | `getSubCategoryCount`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId) Returns the number of immediate categories under category `pcdId`.
`public `PortletCategoryDefinitionId`[]` | `getSubCategoryIds`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, int begin, int end) Returns an array of `PorletCategoryDefinitionId`s for subcategories of the category represented by `pcdId` in the `begin` and `end` range.
`public void` | `moveCategory`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, `PortletCategoryDefinitionId` newParentId) Moves a category under a new parent.
`public void` | `setSessionContext`(`SessionContext` sessionContext)
`public void` | `updateCategory`(`CustomizationContext` customizationContext, `PortletCategoryDefinitionId` pcdId, `PortletCategoryDefinition` newPcd) Updates a locale specific version of a category based on a new `PortletCategoryDefinition`.

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from class `com.bea.netuix.application.manager.`IPortletCategoryManager``
``addPortletDefinition`, `createCategory`, `createRootCategory`, `deleteCategory`, `deletePortletDefinition`, `deletePortletDefinitions`, `getAncestorIds`, `getAncestors`, `getCategories`, `getCategory`, `getCategoryCount`, `getCategoryIds`, `getCategoryView`, `getCategoryViews`, `getNonCategorizedPortletDefinitionCount`, `getNonCategorizedPortletDefinitionIds`, `getNonCategorizedPortletDefinitions`, `getNonCategorizedPortletViews`, `getPortletDefinitionCategories`, `getPortletDefinitionCount`, `getPortletDefinitions`, `getPortletViews`, `getRootCategory`, `getSiblingCategories`, `getSiblingCategoryCount`, `getSiblingCategoryIds`, `getSiblingCategoryViews`, `getSubCategories`, `getSubCategoryCount`, `getSubCategoryIds`, `moveCategory`, `updateCategory``

Methods from class `javax.ejb.`SessionBean``
`ejbActivate, ejbPassivate, ejbRemove, setSessionContext`

## Field Detail

### debug

    protected static Debug debug

## Constructor Detail

### PortletCategoryManagerImpl

    public PortletCategoryManagerImpl()

## Method Detail

### addPortletDefinition(CustomizationContext, PortletCategoryDefinitionId, PortletDefinitionId) Method

    public void addPortletDefinition(CustomizationContext customizationContext,
                                     PortletCategoryDefinitionId pcdId,
                                     PortletDefinitionId pdId)
         throws NotEntitledException

Adds a `PortletDefinitionId` to a portlet category.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

pdId
  `PortletDefinitionId`

#### Exceptions

``NotEntitledException``
  is caller does not have permission for this operation

### createCategory(CustomizationContext, PortletCategoryDefinition) Method

    public PortletCategoryDefinition createCategory(CustomizationContext customizationContext,
                                                    PortletCategoryDefinition pcd)
         throws NotEntitledException, MissingDataException

Creates a persistant version of a `PortletCategoryDefinition` from the provided `PortletCategoryDefinition`.

#### Parameters

customizationContext
  customization information such as prefered locales

pcd
  `PortletCategoryDefinition`

#### Returns

handle to persisted `PortletCategoryDefinition`

#### Exceptions

``NotEntitledException``
  if caller does not have permission for this operation
``MissingDataException``
  if data required to create a category is missing

### createRootCategory(CustomizationContext, PortletCategoryDefinition) Method

    public PortletCategoryDefinition createRootCategory(CustomizationContext customizationContext,
                                                        PortletCategoryDefinition root)
         throws MissingDataException, NotEntitledException

Creates and returns a ROOT category

#### Parameters

customizationContext
  customization information such as prefered locales

root
  PortletCategoryDefinition for ROOT category

#### Returns

PortletCategoryDefinition for ROOT category with identfier set

#### Exceptions

``MissingDataException``
  if some data is missing
``NotEntitledException``
  if caller does not have permission for this operation

### deleteCategory(CustomizationContext, PortletCategoryDefinitionId) Method

    public int deleteCategory(CustomizationContext customizationContext,
                              PortletCategoryDefinitionId pcdId)
         throws NotEntitledException

Removes all (including localized) versions of a category. Also removes all subcategories of category in question.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  category to be removed

#### Returns

number of categories deleted

#### Exceptions

``NotEntitledException``
  if caller does not have permission for this operation

### deletePortletDefinition(CustomizationContext, PortletCategoryDefinitionId, PortletDefinitionId) Method

    public void deletePortletDefinition(CustomizationContext customizationContext,
                                        PortletCategoryDefinitionId pcdId,
                                        PortletDefinitionId pdId)
         throws NotEntitledException

Deletes a `PortletDefinitionId` from a portlet category.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

pdId
  `PortletDefinitionId`

#### Exceptions

``NotEntitledException``
  if caller does not have permission for this operation

### deletePortletDefinitions(CustomizationContext, PortletDefinitionId) Method

    public int deletePortletDefinitions(CustomizationContext customizationContext,
                                        PortletDefinitionId pdId)
         throws RemoteException, NotEntitledException

Deletes a `PortletDefinitionId` from all portlet categories.

#### Parameters

customizationContext
  customization information such as prefered locales

pdId
  `PortletDefinitionId`

#### Returns

number of `PortletDefinitions` deleted

#### Exceptions

``RemoteException``
``NotEntitledException``
  if caller does not have permission for this operation

### ejbActivate() Method

    public void ejbActivate()
         throws EJBException

#### Exceptions

``EJBException``

### ejbCreate() Method

    public void ejbCreate()
         throws CreateException, RemoteException

#### Exceptions

``CreateException``
``RemoteException``

### ejbPassivate() Method

    public void ejbPassivate()
         throws EJBException

#### Exceptions

``EJBException``

### ejbRemove() Method

    public void ejbRemove()
         throws EJBException

#### Exceptions

``EJBException``

### getAncestorIds(CustomizationContext, PortletCategoryDefinitionId) Method

    public PortletCategoryDefinitionId[] getAncestorIds(CustomizationContext customizationContext,
                                                      PortletCategoryDefinitionId pcdId)
         throws ObjectNotFoundException

Returns an array of `PortletCategoryDefinitionId`s that represent the ancestors of a category starting with the parent category and ending with the root.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

#### Returns

an array of `PortletCategoryDefinitionId`s

#### Exceptions

``ObjectNotFoundException``
  if category does not exist

### getAncestors(CustomizationContext, PortletCategoryDefinitionId) Method

    public PortletCategoryDefinition[] getAncestors(CustomizationContext customizationContext,
                                                  PortletCategoryDefinitionId pcdId)
         throws ObjectNotFoundException

Returns an array of `PortletCategoryDefinition`s that represent the ancestors of a category starting with the parent category and ending with the root.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

#### Returns

an array of `PortletCategoryDefinition`s

#### Exceptions

``ObjectNotFoundException``
  if category does not exist

### getCategories(CustomizationContext, PortletCategoryDefinitionId[]) Method

    public PortletCategoryDefinition[] getCategories(CustomizationContext customizationContext,
                                                   PortletCategoryDefinitionId[] pcdId)
         throws ObjectNotFoundException

Returns an array of `PortletCategoryDefinition`s corresponding to an array of `PortletCategoryDefinitionId`s.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  array of `PortletCategoryDefinitionId`s

#### Returns

array of `PortletCategoryDefinition`s

#### Exceptions

``ObjectNotFoundException``
  if category for any key does not exist

### getCategory(CustomizationContext, PortletCategoryDefinitionId) Method

    public PortletCategoryDefinition getCategory(CustomizationContext customizationContext,
                                                 PortletCategoryDefinitionId pcdId)
         throws ObjectNotFoundException

Returns a `PortletCategoryDefinition` corresponding to a `PortletCategoryDefinitionId`.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

#### Returns

`PortletCategoryDefinition`

#### Exceptions

``ObjectNotFoundException``
  if no category definition is found

### getCategoryCount(CustomizationContext, String) Method

    public int getCategoryCount(CustomizationContext customizationContext,
                                String webAppName)

Returns the number of categories recursively starting with the root category.

#### Parameters

customizationContext
  the name of the webapp as defined in the config.xml

#### Returns

number of categories

### getCategoryIds(CustomizationContext, int, int, String) Method

    public PortletCategoryDefinitionId[] getCategoryIds(CustomizationContext customizationContext,
                                                      int begin,
                                                      int end,
                                                      String webAppName)

Returns an array of `PorletCategoryDefinitionId`s in the `begin` and `end` range. If fewer categories than (begin-end) exist then the former number of categories is returned. If no definitions are found an empty array is returned.
Implementation has to ensure that repeated calls to this method return `PortletCategoryDefinitionId`s in a consistent order.

#### Parameters

customizationContext
  customization information such as prefered locales

begin
  begin index

end
  end index

webAppName
  as defined in the config.xml

#### Returns

an array of `PortletCategoryDefinitionId`s

### getCategoryView(CustomizationContext, PortletCategoryDefinitionId) Method

    public PortletCategoryView getCategoryView(CustomizationContext customizationContext,
                                               PortletCategoryDefinitionId pcdId)
         throws ObjectNotFoundException

Returns a `PortletCategoryView` corresponding to a `PortletCategoryDefinitionId`.
NOTE: This method returns a deep copy of a category definition. So, the higher the level of the `PortletCategoryDefinitionId` in the category hierarchy the larger the size of the returned `PortletCategoryView` object is going to be. An example of such a degenerative case would be to call this method for the root category in which case all category definitions and all portlet definitions that are categorized will be returned.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

#### Returns

`PortletCategoryView`

#### Exceptions

``ObjectNotFoundException``
  if no category definition is found

### getCategoryViews(CustomizationContext, PortletCategoryDefinitionId[]) Method

    public PortletCategoryView[] getCategoryViews(CustomizationContext customizationContext,
                                                PortletCategoryDefinitionId[] pcdId)
         throws ObjectNotFoundException

Returns an array of `PortletCategoryView`s corresponding to an array of `PortletCategoryDefinitionId`s.
NOTE:If some of the `PortletCategoryDefinition`s in the method argument are parents or children of one another duplicated data will get returned in the `PortletCategoryView` objects.
Same caveat as method getCategoryView applies.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  array of `PortletCategoryDefinitionId`s

#### Returns

array of `PortletCategoryView`s

#### Exceptions

``ObjectNotFoundException``
  if category for any key does not exist

Related Topics

``note for caveat``

### getNonCategorizedPortletDefinitionCount(CustomizationContext, String) Method

    public int getNonCategorizedPortletDefinitionCount(CustomizationContext customizationContext,
                                                       String webAppName)

Returns the number of `PortletDefinition`s that are not included under any category.

#### Parameters

customizationContext
  the web app name as defined in the config.xml

#### Returns

number of uncategorized `PortletDefinition`s

### getNonCategorizedPortletDefinitionIds(CustomizationContext, int, int, String) Method

    public PortletDefinitionId[] getNonCategorizedPortletDefinitionIds(CustomizationContext customizationContext,
                                                                     int begin,
                                                                     int end,
                                                                     String webAppName)

Returns noncategorized `PortletDefinitionId`s in the `begin` and `end` range. If fewer categories than (begin-end) exist then the former number of categories is returned. If no definitions are found an empty array is returned.
Use this method after getting the number of noncategorized `PortletDefinitionId`s.
The implementation has to ensure that repeated calls to this method return `PortletDefinition`s in a consistent order.

#### Parameters

customizationContext
  customization information such as prefered locales

begin
  begin index

end
  end index

webAppName
  the web app name as defined in the config.xml

#### Returns

array of `PortletDefinitionId`s

### getNonCategorizedPortletDefinitions(CustomizationContext, int, int, String) Method

    public PortletDefinition[] getNonCategorizedPortletDefinitions(CustomizationContext customizationContext,
                                                                 int begin,
                                                                 int end,
                                                                 String webAppName)

Returns noncategorized `PortletDefinition`s in the `begin` and `end` range. If fewer categories than (begin-end) exist then the former number of categories is returned. If no definitions are found an empty array is returned.
Use this method after getting the number of noncategorized `PortletDefinition`s.
Implementation has to ensure that repeated calls to this method return `PortletDefinition`s in a consistent order.

#### Parameters

customizationContext
  customization information such as prefered locales

begin
  begin index

end
  end index

webAppName
  the web app name as defined in the config.xml

#### Returns

array of `PortletDefinition`s

### getNonCategorizedPortletViews(CustomizationContext, int, int, String) Method

    public PortletView[] getNonCategorizedPortletViews(CustomizationContext customizationContext,
                                                     int begin,
                                                     int end,
                                                     String webAppName)

Returns noncategorized `PortletView`s in the `begin` and `end` range. If fewer categories than (begin-end) exist then the former number of category views is returned. If no definitions are found an empty array is returned.
Use this method after getting the number of noncategorized `PortletDefinition`s.
Implementation has to ensure that repeated calls to this method return `PortletView`s in a consistent order.

#### Parameters

customizationContext
  customization information such as prefered locales

begin
  begin index

end
  end index

webAppName
  the web app name as defined in the config.xml

#### Returns

array of `PortletView`s

### getPortletDefinitionCategories(CustomizationContext, PortletDefinitionId) Method

    public PortletCategoryDefinitionId[] getPortletDefinitionCategories(CustomizationContext customizationContext,
                                                                      PortletDefinitionId pdId)

Returns all the `PortletCategoryDefinition`s that a `PortletDefinition` is a part of. Returns an empty array if the latter is noncategorized.

#### Parameters

customizationContext
  customization information such as prefered locales

pdId
  `PortletDefinitionId`

#### Returns

an array of `PortletCategoryDefinitionId`s

### getPortletDefinitionCount(CustomizationContext, PortletCategoryDefinitionId) Method

    public int getPortletDefinitionCount(CustomizationContext customizationContext,
                                         PortletCategoryDefinitionId pcdId)

Returns the number of `PortletDefinition`s under category `pcdId`.

#### Parameters

customizationContext
  `PortletCategoryDefinitionId`

#### Returns

number of `PortletDefinition`s under category `pcdId`

### getPortletDefinitions(CustomizationContext, PortletCategoryDefinitionId, int, int) Method

    public PortletDefinition[] getPortletDefinitions(CustomizationContext customizationContext,
                                                   PortletCategoryDefinitionId pcdId,
                                                   int begin,
                                                   int end)

Returns `PortletDefinition`s in the `begin` and `end` range under the category `pcdId`. If fewer `PortletDefinition`s than (begin-end) exist then the former number is returned. If no definitions are found an empty array is returned.
Use this method after getting the number of `PortletDefinition`s.
Implementation has to ensure that repeated calls to this method return `PortletDefinition`s in a consistent order.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

begin
  begin index

end
  end index

#### Returns

array of `PortletDefinition`s

### getPortletViews(CustomizationContext, PortletCategoryDefinitionId, int, int) Method

    public PortletView[] getPortletViews(CustomizationContext customizationContext,
                                       PortletCategoryDefinitionId pcdId,
                                       int begin,
                                       int end)
         throws ObjectNotFoundException

Returns `PortletView`s in the `begin` and `end` range under the category `pcdId`. If fewer views than (begin-end) exist then the former number of views is returned. If no views are found an empty array is returned.
Use this method after getting the number of `PortletDefinition`s.
Implementation has to ensure that repeated calls to this method return `PortletView`s in a consistent order.
Same caveat as method getCategoryView applies.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

begin
  begin index

end
  end index

#### Returns

array of `PortletView`s

#### Exceptions

``ObjectNotFoundException``

Related Topics

``note for caveat``

### getRootCategory(CustomizationContext, String) Method

    public PortletCategoryDefinition getRootCategory(CustomizationContext customizationContext,
                                                     String webAppName)
         throws ObjectNotFoundException

Returns root of the PortletCategory hierarchy.

#### Parameters

customizationContext
  customization information such as prefered locales

webAppName
  the name of the webapp as defined in the config.xml

#### Returns

the root `PortletCategoryDefinition`.

#### Exceptions

``ObjectNotFoundException``
  if the root category does not exist

### getSiblingCategories(CustomizationContext, PortletCategoryDefinitionId, int, int) Method

    public PortletCategoryDefinition[] getSiblingCategories(CustomizationContext customizationContext,
                                                          PortletCategoryDefinitionId pcdId,
                                                          int begin,
                                                          int end)
         throws ObjectNotFoundException

Returns an array of `PorletCategoryDefinition`s for sibling categories of the category represented by `pcdId` in the `begin` and `end` range.If fewer categories than (begin-end) exist then the former number of categories is returned. If no definitions are found an empty array is returned.
Implementation has to ensure that repeated calls to this method return `PortletCategoryDefinition`s in a consistent order.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

begin
  begin index

end
  end index

#### Returns

an array of `PortletCategoryDefinition`s

#### Exceptions

``ObjectNotFoundException``
  if category does not exist

### getSiblingCategoryCount(CustomizationContext, PortletCategoryDefinitionId) Method

    public int getSiblingCategoryCount(CustomizationContext customizationContext,
                                       PortletCategoryDefinitionId pcdId)

Returns the number of categories at the same level as a category. All these categories have the same parent.

#### Parameters

customizationContext
  `PortletCategoryDefinitionId`

#### Returns

number of code>PortletDefinitions under category `pcdId`

### getSiblingCategoryIds(CustomizationContext, PortletCategoryDefinitionId, int, int) Method

    public PortletCategoryDefinitionId[] getSiblingCategoryIds(CustomizationContext customizationContext,
                                                             PortletCategoryDefinitionId pcdId,
                                                             int begin,
                                                             int end)

Returns an array of `PorletCategoryDefinitionId`s for sibling categories of the category represented by `pcdId` in the `begin` and `end` range. If fewer categories than (begin-end) exist then the former number of categories is returned. If no definitions are found an empty array is returned.
Implementation has to ensure that repeated calls to this method return `PortletCategoryDefinitionId`s in a consistent order.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

begin
  begin index

end
  end index

#### Returns

an array of `PortletCategoryDefinitionId`s

### getSiblingCategoryViews(CustomizationContext, PortletCategoryDefinitionId, int, int) Method

    public PortletCategoryView[] getSiblingCategoryViews(CustomizationContext customizationContext,
                                                       PortletCategoryDefinitionId pcdId,
                                                       int begin,
                                                       int end)
         throws ObjectNotFoundException

Returns an array of `PorletCategoryView`s for sibling categories of the category represented by `pcdId` in the `begin` and `end` range.If fewer categories than (begin-end) exist then the former number of categories is returned. If no definitions are found an empty array is returned.
Implementation has to ensure that repeated calls to this method return `PortletCategoryDefinition`s in a consistent order.
Same caveat as method getCategoryView applies.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

begin
  begin index

end
  end index

#### Returns

an array of `PortletCategoryDefinition`s

#### Exceptions

``ObjectNotFoundException``
  if category does not exist

Related Topics

``note for caveat``

### getSubCategories(CustomizationContext, PortletCategoryDefinitionId, int, int) Method

    public PortletCategoryDefinition[] getSubCategories(CustomizationContext customizationContext,
                                                      PortletCategoryDefinitionId pcdId,
                                                      int begin,
                                                      int end)
         throws ObjectNotFoundException

Returns an array of `PorletCategoryDefinition`s for subcategories of the category represented by `pcdId` in the `begin` and `end` range.If fewer categories than (begin-end) exist then the former number of categories is returned. If no definitions are found an empty array is returned.
Implementation has to ensure that repeated calls to this method return `PortletCategoryDefinition`s in a consistent order.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

begin
  begin index

end
  end index

#### Returns

an array of `PortletCategoryDefinition`s

#### Exceptions

``ObjectNotFoundException``
  if category does not exist

### getSubCategoryCount(CustomizationContext, PortletCategoryDefinitionId) Method

    public int getSubCategoryCount(CustomizationContext customizationContext,
                                   PortletCategoryDefinitionId pcdId)

Returns the number of immediate categories under category `pcdId`.

#### Parameters

customizationContext
  `PortletCategoryDefinitionId`

#### Returns

number of categories under category `pcdId`

### getSubCategoryIds(CustomizationContext, PortletCategoryDefinitionId, int, int) Method

    public PortletCategoryDefinitionId[] getSubCategoryIds(CustomizationContext customizationContext,
                                                         PortletCategoryDefinitionId pcdId,
                                                         int begin,
                                                         int end)

Returns an array of `PorletCategoryDefinitionId`s for subcategories of the category represented by `pcdId` in the `begin` and `end` range. If fewer categories than (begin-end) exist then the former number of categories is returned. If no definitions are found an empty array is returned.
Implementation has to ensure that repeated calls to this method return `PortletCategoryDefinitionId`s in a consistent order.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

begin
  begin index

end
  end index

#### Returns

an array of `PortletCategoryDefinitionId`s

### moveCategory(CustomizationContext, PortletCategoryDefinitionId, PortletCategoryDefinitionId) Method

    public void moveCategory(CustomizationContext customizationContext,
                             PortletCategoryDefinitionId pcdId,
                             PortletCategoryDefinitionId newParentId)
         throws ObjectNotFoundException, NotEntitledException

Moves a category under a new parent.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PortletCategoryDefinitionId`

newParentId
  new parent `PortletCategoryDefinitionId`

#### Exceptions

``ObjectNotFoundException``
  if category does not exist
``NotEntitledException``
  if caller does not have permission for this operation

### setSessionContext(SessionContext) Method

    public void setSessionContext(SessionContext sessionContext)
         throws EJBException

#### Exceptions

``EJBException``

### updateCategory(CustomizationContext, PortletCategoryDefinitionId, PortletCategoryDefinition) Method

    public void updateCategory(CustomizationContext customizationContext,
                               PortletCategoryDefinitionId pcdId,
                               PortletCategoryDefinition newPcd)
         throws NotEntitledException, MissingDataException, RemoteException, ObjectNotFoundException

Updates a locale specific version of a category based on a new `PortletCategoryDefinition`.

#### Parameters

customizationContext
  customization information such as prefered locales

pcdId
  `PorletCategoryDefinitionId`

newPcd
  new `PorletCategoryDefinition`

#### Exceptions

``NotEntitledException``
  if caller does not have permission for this operation
``MissingDataException``
  if data required to update a category is missing
``RemoteException``
``ObjectNotFoundException``
  if category does not exist