com.bea.portal.tools.portal.controls
Interface PortletCategoryDefinitionControl


public interface PortletCategoryDefinitionControl

A custom control interface used to interact with portlet categories.


Method Summary
 void addPortletDefinition(com.bea.netuix.application.identifier.PortletDefinitionId portletId, com.bea.netuix.application.identifier.PortletCategoryDefinitionId categoryId, com.bea.portal.tools.common.ResourceContext context)
          Adds a PortletDefinitionId to a portlet category.
 com.bea.netuix.application.definition.PortletCategoryDefinition createCategory(String title, String description, com.bea.netuix.application.identifier.PortletCategoryDefinitionId parentId, String webAppName, com.bea.portal.tools.common.ResourceContext context)
          Creates a persistent version of a PortletCategoryDefinition from the provided PortletCategoryDefinition.
 com.bea.netuix.application.definition.PortletCategoryDefinition createRootCategory(String rootCategoryTitle, String rootCategoryDescription, String webAppName, com.bea.portal.tools.common.ResourceContext context)
          Creates and returns a ROOT category
 int deleteCategory(com.bea.netuix.application.identifier.PortletCategoryDefinitionId id, com.bea.portal.tools.common.ResourceContext context)
          Deletes all (including localized) versions of a category.
 void deletePortletDefinition(com.bea.netuix.application.identifier.PortletDefinitionId portletId, com.bea.netuix.application.identifier.PortletCategoryDefinitionId categoryId, com.bea.portal.tools.common.ResourceContext context)
          Deletes a PortletDefinitionId from a portlet category.
 int deletePortletDefinitions(com.bea.netuix.application.identifier.PortletDefinitionId portletId, com.bea.portal.tools.common.ResourceContext context)
          Deletes a PortletDefinitionId from all portlet categories.
 com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.definition.PortletCategoryDefinition> getCategories(int pageSize, com.bea.netuix.application.search.WebAppSearchCriteria criteria, com.bea.portal.tools.common.ResourceContext context)
          Returns a SortableFilterablePagedResult of PortletCategoryDefinitions corresponding to an array of PortletCategoryDefinitionIds.
 com.bea.netuix.application.definition.PortletCategoryDefinition getCategory(com.bea.netuix.application.identifier.PortletCategoryDefinitionId id, com.bea.portal.tools.common.ResourceContext context)
          Returns a PortletCategoryDefinition corresponding to a PortletCategoryDefinitionId.
 com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.definition.PortletDefinition> getNonCategorizedPortletDefinitions(int pageSize, com.bea.netuix.application.search.WebAppSearchCriteria criteria, com.bea.portal.tools.common.ResourceContext context)
          Returns noncategorized PortletDefinitions.
 int getPortletDefinitionCount(com.bea.netuix.application.identifier.PortletCategoryDefinitionId id, com.bea.portal.tools.common.ResourceContext context)
          Returns the number of PortletDefinitions under category pcdId.
 com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.definition.PortletDefinition> getPortletDefinitions(int pageSize, com.bea.netuix.application.identifier.PortletCategoryDefinitionId id, com.bea.portal.tools.common.ResourceContext context)
          Returns PortletDefinitions under the category pcdId.
 com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.view.PortletView> getPortletViews(int pageSize, com.bea.netuix.application.identifier.PortletCategoryDefinitionId id, com.bea.portal.tools.common.ResourceContext context)
          Returns PortletViews.
 com.bea.netuix.application.definition.PortletCategoryDefinition getRootCategory(String webAppName, com.bea.portal.tools.common.ResourceContext context)
          Returns root of the PortletCategory hierarchy.
 com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.definition.PortletCategoryDefinition> getSubCategories(int pageSize, com.bea.netuix.application.identifier.PortletCategoryDefinitionId id, com.bea.netuix.application.search.WebAppSearchCriteria criteria, com.bea.portal.tools.common.ResourceContext context)
          Returns a SortableFilterablePagedResult of PorletCategoryDefinitions for subcategories of the category represented by pcdId If no definitions are found an empty SortableFilterablePagedResult is returned.
Implementation has to ensure that repeated calls to this method return PortletCategoryDefinitions in a consistent order.
 int getSubCategoryCount(com.bea.netuix.application.identifier.PortletCategoryDefinitionId id, com.bea.portal.tools.common.ResourceContext context)
          Returns the number of immediate categories under category pcdId.
 

Method Detail

createRootCategory

com.bea.netuix.application.definition.PortletCategoryDefinition createRootCategory(String rootCategoryTitle,
                                                                                   String rootCategoryDescription,
                                                                                   String webAppName,
                                                                                   com.bea.portal.tools.common.ResourceContext context)
                                                                                   throws com.bea.portal.tools.common.exceptions.ToolsException,
                                                                                          com.bea.netuix.application.exception.NotEntitledException,
                                                                                          com.bea.netuix.application.exception.MissingDataException,
                                                                                          com.bea.netuix.application.exception.ObjectNotFoundException
Creates and returns a ROOT category

Parameters
rootCategoryTitle -
rootCategoryDescription -
webAppName -
context - the resource context.
Returns
Throws
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException
com.bea.netuix.application.exception.MissingDataException
com.bea.netuix.application.exception.ObjectNotFoundException

getRootCategory

com.bea.netuix.application.definition.PortletCategoryDefinition getRootCategory(String webAppName,
                                                                                com.bea.portal.tools.common.ResourceContext context)
                                                                                throws com.bea.netuix.application.exception.ObjectNotFoundException,
                                                                                       com.bea.portal.tools.common.exceptions.ToolsException
Returns root of the PortletCategory hierarchy.

Parameters
webAppName -
context - the resource context.
Returns
Throws
com.bea.netuix.application.exception.ObjectNotFoundException
com.bea.portal.tools.common.exceptions.ToolsException

getCategory

com.bea.netuix.application.definition.PortletCategoryDefinition getCategory(com.bea.netuix.application.identifier.PortletCategoryDefinitionId id,
                                                                            com.bea.portal.tools.common.ResourceContext context)
                                                                            throws com.bea.portal.tools.common.exceptions.ToolsException,
                                                                                   com.bea.netuix.application.exception.ObjectNotFoundException
Returns a PortletCategoryDefinition corresponding to a PortletCategoryDefinitionId.

Parameters
id - the portlet category definition id.
context - the resource context.
Returns
Throws
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.ObjectNotFoundException

getCategories

com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.definition.PortletCategoryDefinition> getCategories(int pageSize,
                                                                                                                                     com.bea.netuix.application.search.WebAppSearchCriteria criteria,
                                                                                                                                     com.bea.portal.tools.common.ResourceContext context)
                                                                                                                                     throws com.bea.portal.tools.common.exceptions.ToolsException,
                                                                                                                                            com.bea.netuix.application.exception.ObjectNotFoundException
Returns a SortableFilterablePagedResult of PortletCategoryDefinitions corresponding to an array of PortletCategoryDefinitionIds.

Parameters
pageSize - the number of entries per page of the SortableFilterablePagedResult
criteria - the search criteria, including the web app name
context - the resource context.
Returns
an Iterator of pages. Each page will contain pageSize entries.
Throws
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.ObjectNotFoundException

getSubCategoryCount

int getSubCategoryCount(com.bea.netuix.application.identifier.PortletCategoryDefinitionId id,
                        com.bea.portal.tools.common.ResourceContext context)
                        throws com.bea.portal.tools.common.exceptions.ToolsException
Returns the number of immediate categories under category pcdId.

Parameters
id - the portlet category definition id.
context - the resource context.
Returns
Throws
com.bea.portal.tools.common.exceptions.ToolsException

getSubCategories

com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.definition.PortletCategoryDefinition> getSubCategories(int pageSize,
                                                                                                                                        com.bea.netuix.application.identifier.PortletCategoryDefinitionId id,
                                                                                                                                        com.bea.netuix.application.search.WebAppSearchCriteria criteria,
                                                                                                                                        com.bea.portal.tools.common.ResourceContext context)
                                                                                                                                        throws com.bea.portal.tools.common.exceptions.ToolsException,
                                                                                                                                               com.bea.netuix.application.exception.ObjectNotFoundException
Returns a SortableFilterablePagedResult of PorletCategoryDefinitions for subcategories of the category represented by pcdId If no definitions are found an empty SortableFilterablePagedResult is returned.
Implementation has to ensure that repeated calls to this method return PortletCategoryDefinitions in a consistent order.

Parameters
pageSize - the number of entries per page of the SortableFilterablePagedResult
id - the portlet category definition id.
criteria - the search criteria, including the web app name
context - the resource context.
Returns
an Iterator of pages. Each page will contain pageSize entries.
Throws
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.ObjectNotFoundException

getPortletDefinitionCount

int getPortletDefinitionCount(com.bea.netuix.application.identifier.PortletCategoryDefinitionId id,
                              com.bea.portal.tools.common.ResourceContext context)
                              throws com.bea.portal.tools.common.exceptions.ToolsException
Returns the number of PortletDefinitions under category pcdId.

Parameters
id - the portlet category definition id.
context - the resource context.
Returns
Throws
com.bea.portal.tools.common.exceptions.ToolsException

getPortletDefinitions

com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.definition.PortletDefinition> getPortletDefinitions(int pageSize,
                                                                                                                                     com.bea.netuix.application.identifier.PortletCategoryDefinitionId id,
                                                                                                                                     com.bea.portal.tools.common.ResourceContext context)
                                                                                                                                     throws com.bea.portal.tools.common.exceptions.ToolsException
Returns PortletDefinitions under the category pcdId. If no definitions are found an empty SortableFilterablePagedResult is returned.
Use this method after getting the number of PortletDefinitions.
Implementation has to ensure that repeated calls to this method return PortletDefinitions in a consistent order.

Parameters
pageSize - the number of entries per page of the SortableFilterablePagedResult
id - the portlet category definition id.
context - the resource context.
Returns
an Iterator of pages. Each page will contain pageSize entries.
Throws
com.bea.portal.tools.common.exceptions.ToolsException

getPortletViews

com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.view.PortletView> getPortletViews(int pageSize,
                                                                                                                   com.bea.netuix.application.identifier.PortletCategoryDefinitionId id,
                                                                                                                   com.bea.portal.tools.common.ResourceContext context)
                                                                                                                   throws com.bea.portal.tools.common.exceptions.ToolsException,
                                                                                                                          com.bea.netuix.application.exception.ObjectNotFoundException
Returns PortletViews. If no views are found an empty SortableFilterablePagedResult is returned.
Use this method after getting the number of PortletDefinitions.
Implementation has to ensure that repeated calls to this method return PortletViews in a consistent order.
Same caveat as method getCategoryView applies.

Parameters
pageSize - the number of entries per page of the SortableFilterablePagedResult
id - the portlet category definition id.
context - the resource context.
Returns
an Iterator of pages. Each page will contain pageSize entries.
Throws
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.ObjectNotFoundException

addPortletDefinition

void addPortletDefinition(com.bea.netuix.application.identifier.PortletDefinitionId portletId,
                          com.bea.netuix.application.identifier.PortletCategoryDefinitionId categoryId,
                          com.bea.portal.tools.common.ResourceContext context)
                          throws com.bea.portal.tools.common.exceptions.ToolsException,
                                 com.bea.netuix.application.exception.NotEntitledException
Adds a PortletDefinitionId to a portlet category.

Parameters
portletId - portlet definition id.
categoryId - portlet category definition id.
context - the resource context.
Throws
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException

deletePortletDefinition

void deletePortletDefinition(com.bea.netuix.application.identifier.PortletDefinitionId portletId,
                             com.bea.netuix.application.identifier.PortletCategoryDefinitionId categoryId,
                             com.bea.portal.tools.common.ResourceContext context)
                             throws com.bea.portal.tools.common.exceptions.ToolsException,
                                    com.bea.netuix.application.exception.NotEntitledException
Deletes a PortletDefinitionId from a portlet category.

Parameters
portletId - portlet definition id.
categoryId - portlet category definition id.
context - the resource context.
Throws
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException

deletePortletDefinitions

int deletePortletDefinitions(com.bea.netuix.application.identifier.PortletDefinitionId portletId,
                             com.bea.portal.tools.common.ResourceContext context)
                             throws com.bea.portal.tools.common.exceptions.ToolsException,
                                    com.bea.netuix.application.exception.NotEntitledException
Deletes a PortletDefinitionId from all portlet categories.

Parameters
portletId - portlet definition id.
context - the resource context.
Returns
the number of instances deleted.
Throws
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException

getNonCategorizedPortletDefinitions

com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.definition.PortletDefinition> getNonCategorizedPortletDefinitions(int pageSize,
                                                                                                                                                   com.bea.netuix.application.search.WebAppSearchCriteria criteria,
                                                                                                                                                   com.bea.portal.tools.common.ResourceContext context)
                                                                                                                                                   throws com.bea.portal.tools.common.exceptions.ToolsException
Returns noncategorized PortletDefinitions. If no definitions are found an empty SortableFilterablePagedResult is returned.
Use this method after getting the number of noncategorized PortletDefinitions.
Implementation has to ensure that repeated calls to this method return PortletDefinitions in a consistent order.

Parameters
pageSize - the number of entries per page of the SortableFilterablePagedResult
criteria - the criteria for the search, including web app name.
context - the resource context.
Returns
an Iterator of pages. Each page will contain pageSize entries.
Throws
com.bea.portal.tools.common.exceptions.ToolsException

createCategory

com.bea.netuix.application.definition.PortletCategoryDefinition createCategory(String title,
                                                                               String description,
                                                                               com.bea.netuix.application.identifier.PortletCategoryDefinitionId parentId,
                                                                               String webAppName,
                                                                               com.bea.portal.tools.common.ResourceContext context)
                                                                               throws com.bea.portal.tools.common.exceptions.ToolsException,
                                                                                      com.bea.netuix.application.exception.NotEntitledException,
                                                                                      com.bea.netuix.application.exception.MissingDataException,
                                                                                      com.bea.netuix.application.exception.ObjectNotFoundException
Creates a persistent version of a PortletCategoryDefinition from the provided PortletCategoryDefinition.

Parameters
title -
description -
parentId - parent category definition id.
webAppName -
context - the resource context.
Returns
Throws
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException
com.bea.netuix.application.exception.MissingDataException
com.bea.netuix.application.exception.ObjectNotFoundException

deleteCategory

int deleteCategory(com.bea.netuix.application.identifier.PortletCategoryDefinitionId id,
                   com.bea.portal.tools.common.ResourceContext context)
                   throws com.bea.portal.tools.common.exceptions.ToolsException,
                          com.bea.netuix.application.exception.NotEntitledException,
                          com.bea.netuix.application.exception.ObjectNotFoundException
Deletes all (including localized) versions of a category. Also deletes all subcategories of category in question. This method attempts to clean up all related security policies on and under the deleted Category. 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 category definition id.
context - the resource context.
Returns
the number of categories deleted
Throws
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException
com.bea.netuix.application.exception.ObjectNotFoundException


Copyright © 2006 BEA Systems, Inc. All Rights Reserved