Skip navigation links


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


@ControlInterface
public interface PortletCategoryDefinitionControl

A custom control interface used to interact with portlet categories.


Method Summary
 void addPortletDefinition(PortletDefinitionId portletId, PortletCategoryDefinitionId categoryId, ResourceContext context)
          Adds a PortletDefinitionId to a portlet category.
 PortletCategoryDefinition createCategory(String title, String description, PortletCategoryDefinitionId parentId, String webAppName, ResourceContext context)
          Creates a persistent version of a PortletCategoryDefinition from the provided PortletCategoryDefinition.
 PortletCategoryDefinition createRootCategory(String rootCategoryTitle, String rootCategoryDescription, String webAppName, ResourceContext context)
          Creates and returns a ROOT category
 int deleteCategory(PortletCategoryDefinitionId id, ResourceContext context)
          Deletes all (including localized) versions of a category.
 void deletePortletDefinition(PortletDefinitionId portletId, PortletCategoryDefinitionId categoryId, ResourceContext context)
          Deletes a PortletDefinitionId from a portlet category.
 int deletePortletDefinitions(PortletDefinitionId portletId, ResourceContext context)
          Deletes a PortletDefinitionId from all portlet categories.
 SortableFilterablePagedResult<PortletCategoryDefinition> getCategories(int pageSize, WebAppSearchCriteria criteria, ResourceContext context)
          Returns a SortableFilterablePagedResult of PortletCategoryDefinitions corresponding to an array of PortletCategoryDefinitionIds.
 PortletCategoryDefinition getCategory(PortletCategoryDefinitionId id, ResourceContext context)
          Returns a PortletCategoryDefinition corresponding to a PortletCategoryDefinitionId.
 SortableFilterablePagedResult<PortletDefinition> getNonCategorizedPortletDefinitions(int pageSize, WebAppSearchCriteria criteria, ResourceContext context)
          Returns noncategorized PortletDefinitions.
 int getPortletDefinitionCount(PortletCategoryDefinitionId id, ResourceContext context)
          Returns the number of PortletDefinitions under category pcdId.
 SortableFilterablePagedResult<PortletDefinition> getPortletDefinitions(int pageSize, PortletCategoryDefinitionId id, ResourceContext context)
          Returns PortletDefinitions under the category pcdId.
 SortableFilterablePagedResult<PortletView> getPortletViews(int pageSize, PortletCategoryDefinitionId id, ResourceContext context)
          Returns PortletViews.
 PortletCategoryDefinition getRootCategory(String webAppName, ResourceContext context)
          Returns root of the PortletCategory hierarchy.
 SortableFilterablePagedResult<PortletCategoryDefinition> getSubCategories(int pageSize, PortletCategoryDefinitionId id, WebAppSearchCriteria criteria, ResourceContext context)
          Returns a SortableFilterablePagedResult of PortletCategoryDefinitions 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(PortletCategoryDefinitionId id, ResourceContext context)
          Returns the number of immediate categories under category pcdId.

 

Method Detail

createRootCategory

PortletCategoryDefinition createRootCategory(String rootCategoryTitle,
                                             String rootCategoryDescription,
                                             String webAppName,
                                             ResourceContext context)
                                             throws ToolsException,
                                                    NotEntitledException,
                                                    MissingDataException,
                                                    ObjectNotFoundException
Creates and returns a ROOT category
Parameters
rootCategoryTitle -
rootCategoryDescription -
webAppName -
context - the resource context.
Throws
ToolsException
NotEntitledException
MissingDataException
ObjectNotFoundException

getRootCategory

PortletCategoryDefinition getRootCategory(String webAppName,
                                          ResourceContext context)
                                          throws ObjectNotFoundException,
                                                 ToolsException
Returns root of the PortletCategory hierarchy.
Parameters
webAppName -
context - the resource context.
Throws
ObjectNotFoundException
ToolsException

getCategory

PortletCategoryDefinition getCategory(PortletCategoryDefinitionId id,
                                      ResourceContext context)
                                      throws ToolsException,
                                             ObjectNotFoundException
Returns a PortletCategoryDefinition corresponding to a PortletCategoryDefinitionId.
Parameters
id - the portlet category definition id.
context - the resource context.
Throws
ToolsException
ObjectNotFoundException

getCategories

SortableFilterablePagedResult<PortletCategoryDefinition> getCategories(int pageSize,
                                                                       WebAppSearchCriteria criteria,
                                                                       ResourceContext context)
                                                                       throws ToolsException,
                                                                              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
ToolsException
ObjectNotFoundException

getSubCategoryCount

int getSubCategoryCount(PortletCategoryDefinitionId id,
                        ResourceContext context)
                        throws ToolsException
Returns the number of immediate categories under category pcdId.
Parameters
id - the portlet category definition id.
context - the resource context.
Throws
ToolsException

getSubCategories

SortableFilterablePagedResult<PortletCategoryDefinition> getSubCategories(int pageSize,
                                                                          PortletCategoryDefinitionId id,
                                                                          WebAppSearchCriteria criteria,
                                                                          ResourceContext context)
                                                                          throws ToolsException,
                                                                                 ObjectNotFoundException
Returns a SortableFilterablePagedResult of PortletCategoryDefinitions 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
ToolsException
ObjectNotFoundException

getPortletDefinitionCount

int getPortletDefinitionCount(PortletCategoryDefinitionId id,
                              ResourceContext context)
                              throws ToolsException
Returns the number of PortletDefinitions under category pcdId.
Parameters
id - the portlet category definition id.
context - the resource context.
Throws
ToolsException

getPortletDefinitions

SortableFilterablePagedResult<PortletDefinition> getPortletDefinitions(int pageSize,
                                                                       PortletCategoryDefinitionId id,
                                                                       ResourceContext context)
                                                                       throws 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
ToolsException

getPortletViews

SortableFilterablePagedResult<PortletView> getPortletViews(int pageSize,
                                                           PortletCategoryDefinitionId id,
                                                           ResourceContext context)
                                                           throws ToolsException,
                                                                  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
ToolsException
ObjectNotFoundException

addPortletDefinition

void addPortletDefinition(PortletDefinitionId portletId,
                          PortletCategoryDefinitionId categoryId,
                          ResourceContext context)
                          throws ToolsException,
                                 NotEntitledException
Adds a PortletDefinitionId to a portlet category.
Parameters
portletId - portlet definition id.
categoryId - portlet category definition id.
context - the resource context.
Throws
ToolsException
NotEntitledException

deletePortletDefinition

void deletePortletDefinition(PortletDefinitionId portletId,
                             PortletCategoryDefinitionId categoryId,
                             ResourceContext context)
                             throws ToolsException,
                                    NotEntitledException
Deletes a PortletDefinitionId from a portlet category.
Parameters
portletId - portlet definition id.
categoryId - portlet category definition id.
context - the resource context.
Throws
ToolsException
NotEntitledException

deletePortletDefinitions

int deletePortletDefinitions(PortletDefinitionId portletId,
                             ResourceContext context)
                             throws ToolsException,
                                    NotEntitledException
Deletes a PortletDefinitionId from all portlet categories.
Parameters
portletId - portlet definition id.
context - the resource context.
Returns
the number of instances deleted.
Throws
ToolsException
NotEntitledException

getNonCategorizedPortletDefinitions

SortableFilterablePagedResult<PortletDefinition> getNonCategorizedPortletDefinitions(int pageSize,
                                                                                     WebAppSearchCriteria criteria,
                                                                                     ResourceContext context)
                                                                                     throws 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
ToolsException

createCategory

PortletCategoryDefinition createCategory(String title,
                                         String description,
                                         PortletCategoryDefinitionId parentId,
                                         String webAppName,
                                         ResourceContext context)
                                         throws ToolsException,
                                                NotEntitledException,
                                                MissingDataException,
                                                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.
Throws
ToolsException
NotEntitledException
MissingDataException
ObjectNotFoundException

deleteCategory

int deleteCategory(PortletCategoryDefinitionId id,
                   ResourceContext context)
                   throws ToolsException,
                          NotEntitledException,
                          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
ToolsException
NotEntitledException
ObjectNotFoundException

Skip navigation links


Copyright © 2010, Oracle. All rights reserved.