© 2003 BEA Systems, Inc.

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

java.lang.Object
  |
  +--com.bea.netuix.application.manager.persistence.jdbc.PortletCategoryManagerImpl
All Implemented Interfaces:
EnterpriseBean, IPortletCategoryManager, Serializable, SessionBean

public class PortletCategoryManagerImpl
extends Object
implements SessionBean, IPortletCategoryManager

PortletCategoryManagerImpl

See Also:
Serialized Form

Field Summary
protected static Debug debug
           
 
Constructor Summary
PortletCategoryManagerImpl()
           
 
Method Summary
 void addPortletDefinition(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, PortletDefinitionId pdId)
          Adds a PortletDefinitionId to a portlet category.
 PortletCategoryDefinition createCategory(CustomizationContext customizationContext, PortletCategoryDefinition pcd)
          Creates a persistant version of a PortletCategoryDefinition from the provided PortletCategoryDefinition.
 PortletCategoryDefinition createRootCategory(CustomizationContext customizationContext, PortletCategoryDefinition root)
          Creates and returns a ROOT category
 int deleteCategory(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId)
          Removes all (including localized) versions of a category.
 void deletePortletDefinition(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, PortletDefinitionId pdId)
          Deletes a PortletDefinitionId from a portlet category.
 int deletePortletDefinitions(CustomizationContext customizationContext, PortletDefinitionId pdId)
          Deletes a PortletDefinitionId from all portlet categories.
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 PortletCategoryDefinitionId[] getAncestorIds(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId)
          Returns an array of PortletCategoryDefinitionIds that represent the ancestors of a category starting with the parent category and ending with the root.
 PortletCategoryDefinition[] getAncestors(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId)
          Returns an array of PortletCategoryDefinitions that represent the ancestors of a category starting with the parent category and ending with the root.
 PortletCategoryDefinition[] getCategories(CustomizationContext customizationContext, PortletCategoryDefinitionId[] pcdId)
          Returns an array of PortletCategoryDefinitions corresponding to an array of PortletCategoryDefinitionIds.
 PortletCategoryDefinition getCategory(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId)
          Returns a PortletCategoryDefinition corresponding to a PortletCategoryDefinitionId.
 int getCategoryCount(CustomizationContext customizationContext, String webAppName)
          Returns the number of categories recursively starting with the root category.
 PortletCategoryDefinitionId[] getCategoryIds(CustomizationContext customizationContext, int begin, int end, String webAppName)
          Returns an array of PorletCategoryDefinitionIds in the begin and end range.
 PortletCategoryView getCategoryView(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId)
          Returns a PortletCategoryView corresponding to a PortletCategoryDefinitionId.
 PortletCategoryView[] getCategoryViews(CustomizationContext customizationContext, PortletCategoryDefinitionId[] pcdId)
          Returns an array of PortletCategoryViews corresponding to an array of PortletCategoryDefinitionIds.
 int getNonCategorizedPortletDefinitionCount(CustomizationContext customizationContext, String webAppName)
          Returns the number of PortletDefinitions that are not included under any category.
 PortletDefinitionId[] getNonCategorizedPortletDefinitionIds(CustomizationContext customizationContext, int begin, int end, String webAppName)
          Returns noncategorized PortletDefinitionIds in the begin and end range.
 PortletDefinition[] getNonCategorizedPortletDefinitions(CustomizationContext customizationContext, int begin, int end, String webAppName)
          Returns noncategorized PortletDefinitions in the begin and end range.
 PortletView[] getNonCategorizedPortletViews(CustomizationContext customizationContext, int begin, int end, String webAppName)
          Returns noncategorized PortletViews in the begin and end range.
 PortletCategoryDefinitionId[] getPortletDefinitionCategories(CustomizationContext customizationContext, PortletDefinitionId pdId)
          Returns all the PortletCategoryDefinitions that a PortletDefinition is a part of.
 int getPortletDefinitionCount(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId)
          Returns the number of PortletDefinitions under category pcdId.
 PortletDefinition[] getPortletDefinitions(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, int begin, int end)
          Returns PortletDefinitions in the begin and end range under the category pcdId.
 PortletView[] getPortletViews(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, int begin, int end)
          Returns PortletViews in the begin and end range under the category pcdId.
 PortletCategoryDefinition getRootCategory(CustomizationContext customizationContext, String webAppName)
          Returns root of the PortletCategory hierarchy.
 PortletCategoryDefinition[] getSiblingCategories(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, int begin, int end)
          Returns an array of PorletCategoryDefinitions 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.
 int getSiblingCategoryCount(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId)
          Returns the number of categories at the same level as a category.
 PortletCategoryDefinitionId[] getSiblingCategoryIds(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, int begin, int end)
          Returns an array of PorletCategoryDefinitionIds for sibling categories of the category represented by pcdId in the begin and end range.
 PortletCategoryView[] getSiblingCategoryViews(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, int begin, int end)
          Returns an array of PorletCategoryViews 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.
 PortletCategoryDefinition[] getSubCategories(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, int begin, int end)
          Returns an array of PorletCategoryDefinitions 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.
 int getSubCategoryCount(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId)
          Returns the number of immediate categories under category pcdId.
 PortletCategoryDefinitionId[] getSubCategoryIds(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, int begin, int end)
          Returns an array of PorletCategoryDefinitionIds for subcategories of the category represented by pcdId in the begin and end range.
 void moveCategory(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, PortletCategoryDefinitionId newParentId)
          Moves a category under a new parent.
 void setSessionContext(SessionContext sessionContext)
           
 void updateCategory(CustomizationContext customizationContext, PortletCategoryDefinitionId pcdId, PortletCategoryDefinition newPcd)
          Updates a locale specific version of a category based on a new PortletCategoryDefinition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static Debug debug
Constructor Detail

PortletCategoryManagerImpl

public PortletCategoryManagerImpl()
Method Detail

setSessionContext

public void setSessionContext(SessionContext sessionContext)
                       throws EJBException
Specified by:
setSessionContext in interface SessionBean
EJBException

ejbCreate

public void ejbCreate()
               throws CreateException,
                      RemoteException
CreateException
RemoteException

ejbRemove

public void ejbRemove()
               throws EJBException
Specified by:
ejbRemove in interface SessionBean
EJBException

ejbActivate

public void ejbActivate()
                 throws EJBException
Specified by:
ejbActivate in interface SessionBean
EJBException

ejbPassivate

public void ejbPassivate()
                  throws EJBException
Specified by:
ejbPassivate in interface SessionBean
EJBException

createRootCategory

public PortletCategoryDefinition createRootCategory(CustomizationContext customizationContext,
                                                    PortletCategoryDefinition root)
                                             throws MissingDataException,
                                                    NotEntitledException
Creates and returns a ROOT category

Specified by:
createRootCategory in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
root - PortletCategoryDefinition for ROOT category
Returns:
PortletCategoryDefinition for ROOT category with identfier set
Throws:
MissingDataException - if some data is missing
NotEntitledException - if caller does not have permission for this operation

getRootCategory

public PortletCategoryDefinition getRootCategory(CustomizationContext customizationContext,
                                                 String webAppName)
                                          throws ObjectNotFoundException
Returns root of the PortletCategory hierarchy.

Specified by:
getRootCategory in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
webAppName - the name of the webapp as defined in the config.xml
Returns:
the root PortletCategoryDefinition.
Throws:
ObjectNotFoundException - if the root category does not exist

getCategoryCount

public int getCategoryCount(CustomizationContext customizationContext,
                            String webAppName)
Returns the number of categories recursively starting with the root category.

Specified by:
getCategoryCount in interface IPortletCategoryManager
Parameters:
webAppName - the name of the webapp as defined in the config.xml
Returns:
number of categories

getCategory

public PortletCategoryDefinition getCategory(CustomizationContext customizationContext,
                                             PortletCategoryDefinitionId pcdId)
                                      throws ObjectNotFoundException
Returns a PortletCategoryDefinition corresponding to a PortletCategoryDefinitionId.

Specified by:
getCategory in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
Returns:
PortletCategoryDefinition
Throws:
ObjectNotFoundException - if no category definition is found

getCategoryView

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.

Specified by:
getCategoryView in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
Returns:
PortletCategoryView
Throws:
ObjectNotFoundException - if no category definition is found

getCategoryIds

public PortletCategoryDefinitionId[] getCategoryIds(CustomizationContext customizationContext,
                                                    int begin,
                                                    int end,
                                                    String webAppName)
Returns an array of PorletCategoryDefinitionIds 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 PortletCategoryDefinitionIds in a consistent order.

Specified by:
getCategoryIds in interface IPortletCategoryManager
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 PortletCategoryDefinitionIds

getCategories

public PortletCategoryDefinition[] getCategories(CustomizationContext customizationContext,
                                                 PortletCategoryDefinitionId[] pcdId)
                                          throws ObjectNotFoundException
Returns an array of PortletCategoryDefinitions corresponding to an array of PortletCategoryDefinitionIds.

Specified by:
getCategories in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - array of PortletCategoryDefinitionIds
Returns:
array of PortletCategoryDefinitions
Throws:
ObjectNotFoundException - if category for any key does not exist

getCategoryViews

public PortletCategoryView[] getCategoryViews(CustomizationContext customizationContext,
                                              PortletCategoryDefinitionId[] pcdId)
                                       throws ObjectNotFoundException
Returns an array of PortletCategoryViews corresponding to an array of PortletCategoryDefinitionIds.
NOTE:If some of the PortletCategoryDefinitions 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.

Specified by:
getCategoryViews in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - array of PortletCategoryDefinitionIds
Returns:
array of PortletCategoryViews
Throws:
ObjectNotFoundException - if category for any key does not exist
See Also:
note for caveat

getAncestorIds

public PortletCategoryDefinitionId[] getAncestorIds(CustomizationContext customizationContext,
                                                    PortletCategoryDefinitionId pcdId)
                                             throws ObjectNotFoundException
Returns an array of PortletCategoryDefinitionIds that represent the ancestors of a category starting with the parent category and ending with the root.

Specified by:
getAncestorIds in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
Returns:
an array of PortletCategoryDefinitionIds
Throws:
ObjectNotFoundException - if category does not exist

getAncestors

public PortletCategoryDefinition[] getAncestors(CustomizationContext customizationContext,
                                                PortletCategoryDefinitionId pcdId)
                                         throws ObjectNotFoundException
Returns an array of PortletCategoryDefinitions that represent the ancestors of a category starting with the parent category and ending with the root.

Specified by:
getAncestors in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
Returns:
an array of PortletCategoryDefinitions
Throws:
ObjectNotFoundException - if category does not exist

getSubCategoryCount

public int getSubCategoryCount(CustomizationContext customizationContext,
                               PortletCategoryDefinitionId pcdId)
Returns the number of immediate categories under category pcdId.

Specified by:
getSubCategoryCount in interface IPortletCategoryManager
Parameters:
pcdId - PortletCategoryDefinitionId
Returns:
number of categories under category pcdId

getSubCategoryIds

public PortletCategoryDefinitionId[] getSubCategoryIds(CustomizationContext customizationContext,
                                                       PortletCategoryDefinitionId pcdId,
                                                       int begin,
                                                       int end)
Returns an array of PorletCategoryDefinitionIds 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 PortletCategoryDefinitionIds in a consistent order.

Specified by:
getSubCategoryIds in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
begin - begin index
end - end index
Returns:
an array of PortletCategoryDefinitionIds

getSubCategories

public PortletCategoryDefinition[] getSubCategories(CustomizationContext customizationContext,
                                                    PortletCategoryDefinitionId pcdId,
                                                    int begin,
                                                    int end)
                                             throws ObjectNotFoundException
Returns an array of PorletCategoryDefinitions 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 PortletCategoryDefinitions in a consistent order.

Specified by:
getSubCategories in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
begin - begin index
end - end index
Returns:
an array of PortletCategoryDefinitions
Throws:
ObjectNotFoundException - if category does not exist

getSiblingCategoryCount

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.

Specified by:
getSiblingCategoryCount in interface IPortletCategoryManager
Parameters:
pcdId - PortletCategoryDefinitionId
Returns:
number of code>PortletDefinitions under category pcdId

getSiblingCategoryIds

public PortletCategoryDefinitionId[] getSiblingCategoryIds(CustomizationContext customizationContext,
                                                           PortletCategoryDefinitionId pcdId,
                                                           int begin,
                                                           int end)
Returns an array of PorletCategoryDefinitionIds 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 PortletCategoryDefinitionIds in a consistent order.

Specified by:
getSiblingCategoryIds in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
begin - begin index
end - end index
Returns:
an array of PortletCategoryDefinitionIds

getSiblingCategories

public PortletCategoryDefinition[] getSiblingCategories(CustomizationContext customizationContext,
                                                        PortletCategoryDefinitionId pcdId,
                                                        int begin,
                                                        int end)
                                                 throws ObjectNotFoundException
Returns an array of PorletCategoryDefinitions 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 PortletCategoryDefinitions in a consistent order.

Specified by:
getSiblingCategories in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
begin - begin index
end - end index
Returns:
an array of PortletCategoryDefinitions
Throws:
ObjectNotFoundException - if category does not exist

getSiblingCategoryViews

public PortletCategoryView[] getSiblingCategoryViews(CustomizationContext customizationContext,
                                                     PortletCategoryDefinitionId pcdId,
                                                     int begin,
                                                     int end)
                                              throws ObjectNotFoundException
Returns an array of PorletCategoryViews 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 PortletCategoryDefinitions in a consistent order.
Same caveat as method getCategoryView applies.

Specified by:
getSiblingCategoryViews in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
begin - begin index
end - end index
Returns:
an array of PortletCategoryDefinitions
Throws:
ObjectNotFoundException - if category does not exist
See Also:
note for caveat

getPortletDefinitionCount

public int getPortletDefinitionCount(CustomizationContext customizationContext,
                                     PortletCategoryDefinitionId pcdId)
Returns the number of PortletDefinitions under category pcdId.

Specified by:
getPortletDefinitionCount in interface IPortletCategoryManager
Parameters:
pcdId - PortletCategoryDefinitionId
Returns:
number of PortletDefinitions under category pcdId

getPortletDefinitions

public PortletDefinition[] getPortletDefinitions(CustomizationContext customizationContext,
                                                 PortletCategoryDefinitionId pcdId,
                                                 int begin,
                                                 int end)
Returns PortletDefinitions in the begin and end range under the category pcdId. If fewer PortletDefinitions 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 PortletDefinitions.
Implementation has to ensure that repeated calls to this method return PortletDefinitions in a consistent order.

Specified by:
getPortletDefinitions in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
begin - begin index
end - end index
Returns:
array of PortletDefinitions

getPortletViews

public PortletView[] getPortletViews(CustomizationContext customizationContext,
                                     PortletCategoryDefinitionId pcdId,
                                     int begin,
                                     int end)
                              throws ObjectNotFoundException
Returns PortletViews 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 PortletDefinitions.
Implementation has to ensure that repeated calls to this method return PortletViews in a consistent order.
Same caveat as method getCategoryView applies.

Specified by:
getPortletViews in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
begin - begin index
end - end index
Returns:
array of PortletViews
ObjectNotFoundException
See Also:
note for caveat

addPortletDefinition

public void addPortletDefinition(CustomizationContext customizationContext,
                                 PortletCategoryDefinitionId pcdId,
                                 PortletDefinitionId pdId)
                          throws NotEntitledException
Adds a PortletDefinitionId to a portlet category.

Specified by:
addPortletDefinition in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
pdId - PortletDefinitionId
Throws:
NotEntitledException - is caller does not have permission for this operation

deletePortletDefinition

public void deletePortletDefinition(CustomizationContext customizationContext,
                                    PortletCategoryDefinitionId pcdId,
                                    PortletDefinitionId pdId)
                             throws NotEntitledException
Deletes a PortletDefinitionId from a portlet category.

Specified by:
deletePortletDefinition in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
pdId - PortletDefinitionId
Throws:
NotEntitledException - if caller does not have permission for this operation

deletePortletDefinitions

public int deletePortletDefinitions(CustomizationContext customizationContext,
                                    PortletDefinitionId pdId)
                             throws RemoteException,
                                    NotEntitledException
Deletes a PortletDefinitionId from all portlet categories.

Specified by:
deletePortletDefinitions in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pdId - PortletDefinitionId
Returns:
number of PortletDefinitions deleted
Throws:
NotEntitledException - if caller does not have permission for this operation
RemoteException

getPortletDefinitionCategories

public PortletCategoryDefinitionId[] getPortletDefinitionCategories(CustomizationContext customizationContext,
                                                                    PortletDefinitionId pdId)
Returns all the PortletCategoryDefinitions that a PortletDefinition is a part of. Returns an empty array if the latter is noncategorized.

Specified by:
getPortletDefinitionCategories in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pdId - PortletDefinitionId
Returns:
an array of PortletCategoryDefinitionIds

getNonCategorizedPortletDefinitionCount

public int getNonCategorizedPortletDefinitionCount(CustomizationContext customizationContext,
                                                   String webAppName)
Returns the number of PortletDefinitions that are not included under any category.

Specified by:
getNonCategorizedPortletDefinitionCount in interface IPortletCategoryManager
Parameters:
webAppName - the web app name as defined in the config.xml
Returns:
number of uncategorized PortletDefinitions

getNonCategorizedPortletDefinitionIds

public PortletDefinitionId[] getNonCategorizedPortletDefinitionIds(CustomizationContext customizationContext,
                                                                   int begin,
                                                                   int end,
                                                                   String webAppName)
Returns noncategorized PortletDefinitionIds 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 PortletDefinitionIds.
The implementation has to ensure that repeated calls to this method return PortletDefinitions in a consistent order.

Specified by:
getNonCategorizedPortletDefinitionIds in interface IPortletCategoryManager
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 PortletDefinitionIds

getNonCategorizedPortletDefinitions

public PortletDefinition[] getNonCategorizedPortletDefinitions(CustomizationContext customizationContext,
                                                               int begin,
                                                               int end,
                                                               String webAppName)
Returns noncategorized PortletDefinitions 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 PortletDefinitions.
Implementation has to ensure that repeated calls to this method return PortletDefinitions in a consistent order.

Specified by:
getNonCategorizedPortletDefinitions in interface IPortletCategoryManager
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 PortletDefinitions

getNonCategorizedPortletViews

public PortletView[] getNonCategorizedPortletViews(CustomizationContext customizationContext,
                                                   int begin,
                                                   int end,
                                                   String webAppName)
Returns noncategorized PortletViews 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 PortletDefinitions.
Implementation has to ensure that repeated calls to this method return PortletViews in a consistent order.

Specified by:
getNonCategorizedPortletViews in interface IPortletCategoryManager
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 PortletViews

createCategory

public PortletCategoryDefinition createCategory(CustomizationContext customizationContext,
                                                PortletCategoryDefinition pcd)
                                         throws NotEntitledException,
                                                MissingDataException
Creates a persistant version of a PortletCategoryDefinition from the provided PortletCategoryDefinition.

Specified by:
createCategory in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcd - PortletCategoryDefinition
Returns:
handle to persisted PortletCategoryDefinition
Throws:
NotEntitledException - if caller does not have permission for this operation
MissingDataException - if data required to create a category is missing

deleteCategory

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.

Specified by:
deleteCategory in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - category to be removed
Returns:
number of categories deleted
Throws:
NotEntitledException - if caller does not have permission for this operation

updateCategory

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.

Specified by:
updateCategory in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PorletCategoryDefinitionId
newPcd - new PorletCategoryDefinition
Throws:
NotEntitledException - if caller does not have permission for this operation
ObjectNotFoundException - if category does not exist
MissingDataException - if data required to update a category is missing
RemoteException

moveCategory

public void moveCategory(CustomizationContext customizationContext,
                         PortletCategoryDefinitionId pcdId,
                         PortletCategoryDefinitionId newParentId)
                  throws ObjectNotFoundException,
                         NotEntitledException
Moves a category under a new parent.

Specified by:
moveCategory in interface IPortletCategoryManager
Parameters:
customizationContext - customization information such as prefered locales
pcdId - PortletCategoryDefinitionId
newParentId - new parent PortletCategoryDefinitionId
Throws:
ObjectNotFoundException - if category does not exist
NotEntitledException - if caller does not have permission for this operation

© 2003 BEA Systems, Inc.

Copyright © 2003 BEA Systems, Inc. All Rights Reserved