02/28/2005
 

com.epicentric.portalbeans.categories
Class DisplayCategoryManager

java.lang.Object
  |
  +--com.epicentric.portalbeans.categories.DisplayCategoryManager
All Implemented Interfaces:
com.epicentric.common.listgenerator.ListGenerator, com.epicentric.uid.internal.UniquelyIdentifiableManager

Deprecated. as of Version 7.2, to be removed in 9.0 or later; instead use the new Portlet Category API, see the new PortletCategoryManager class.

public class DisplayCategoryManager
extends Object
implements com.epicentric.uid.internal.UniquelyIdentifiableManager, com.epicentric.common.listgenerator.ListGenerator

The DisplayCategoryManager is used to manage display categories. This class is a singleton. It manages all the module display categories for each site and for the system.


Field Summary
static String ALL_CUSTOM_CATEGORIES
          Deprecated.  
static String ALL_SYSTEM_CATEGORIES
          Deprecated.  
protected static String OTHER_CATEGORY
          Deprecated.  
static String OTHER_CATEGORY_IN_SITE
          Deprecated.  
static String OTHER_CATEGORY_IN_SYSTEM
          Deprecated.  
 
Method Summary
 boolean addCategoryToPage(String catID, String pageID, String siteID)
          Deprecated. Places the category on the specified page.
 boolean changeCategoryOfModule(String modID, String catID, String siteID)
          Deprecated. Places the module in the specified category in the given site.
 boolean changeCategoryOfModuleInServer(String modID, String catID)
          Deprecated. Places the module in the specified category in the server console.
 DisplayCategory createCategory(String title, String friendlyID, String desc)
          Deprecated. as of version 4.0, replaced by DisplayCategoryManager.createCategoryInSite(String, String, String, String)
 DisplayCategory createCategoryInServer(String title, String desc)
          Deprecated. Creates and persistifies a new system category with the given title and description.
 DisplayCategory createCategoryInSite(String title, String desc, String siteID)
          Deprecated. Creates and persistifies a new category with the given title and description in the specified site.
 DisplayCategory createCategoryInSite(String title, String desc, String siteID, String friendlyID)
          Deprecated. Creates and persistifies a new category with the given title and description in the specified site.
 DisplayCategory createCategoryInSiteNew(String title, String desc, String siteID, String friendlyID)
          Deprecated.  
protected  DisplayCategory createCustomCategoryWithUID(String UID, String title, String desc, String siteID, String friendlyID, Date createdDate)
          Deprecated.  
 void deleteCategory(String catID)
          Deprecated. Deletes the display category with the given UID.
 Enumeration getAllCategories()
          Deprecated. as of version 4.0, replaced by DisplayCategoryManager.listCategoriesInSite(String)
 DisplayCategory getCategoryByID(String catFriendlyID)
          Deprecated. as of version 4.0 as friendly IDs are no longer used for most applications, No replacement.
 DisplayCategory getCategoryByModuleID(String modID, String siteID)
          Deprecated. Returns the display category that contains the module with the specified ID.
 DisplayCategory getCategoryByTitle(String title)
          Deprecated. as of version 4.0, replaced by DisplayCategoryManager.getCategoryByTitle(String, String)
 DisplayCategory getCategoryByTitle(String title, String siteID)
          Deprecated. Returns the display category with the specified title in the given site.
 DisplayCategory getCategoryByTitleNew(String title, String siteID)
          Deprecated.  
 DisplayCategory getCategoryByUID(String catID)
          Deprecated. Returns the display category with the specified UID.
 DisplayCategory getCategoryInServerByModuleID(String modID)
          Deprecated. Returns the display category in the server console that contains the specified module.
 DisplayCategory getCategoryInServerByTitle(String title)
          Deprecated. Returns the system display category with the given title.
 boolean getDescriptorIsLoaded()
          Deprecated. as of version 4.0, No Replacement
 boolean getDisplayAllCategoriesOnPage(String pageID, String siteID)
          Deprecated. Returns true if all display categories are shown on the specified page.
static DisplayCategoryManager getInstance()
          Deprecated. Returns the single instance of the DisplayCategoryManager.
 OtherCategory getOtherCategoryForServer()
          Deprecated. Returns the other category for the system.
 OtherCategory getOtherCategoryForSite(String siteID)
          Deprecated. Returns the other category for the given site.
 OtherCategory getOtherCategoryForSite(String siteID, boolean isCustom)
          Deprecated. Returns the specified other category for the given site.
protected static PortalBean getPortalBean(com.vignette.portal.portlet.management.external.Portlet portlet)
          Deprecated.  
protected static com.vignette.portal.portlet.management.external.Portlet getPortlet(String moduleID)
          Deprecated.  
protected  com.vignette.portal.portlet.management.external.PortletCategory getPortletCategory(String UID)
          Deprecated.  
 Collection getSupportedUIDTypes()
          Deprecated. Returns a collection of the UID Types that this manager supports.
 boolean isCategoryOnPage(String catID, String pageID, String siteID)
          Deprecated. Indicates whether the given page contains the given category.
 boolean isModuleInCategory(String modID, String catID, String siteID)
          Deprecated. Indicates whether the given module is in the given category on the given site, regardless of whether the site is using system or custom display categories.
 boolean isModuleInCategoryInServer(String modID, String catID)
          Deprecated. Indicates whether the given module is in the given category in the server console.
 Iterator listCategoriesInServer()
          Deprecated. Returns an Iterator over all system display categories except the Other category.
 Iterator listCategoriesInSite(String siteID)
          Deprecated. Returns an Iterator over the categories on a given site that it is currently set to use.
 Iterator listCategoriesInSiteNew(String siteID)
          Deprecated.  
 Iterator listCategoriesOnPage(String pageID, String siteID)
          Deprecated. Returns an Iterator over all categories that the site will display on the given page.
 Iterator listCustomCategoriesInSite(String siteID)
          Deprecated. Returns an Iterator over all custom categories on the given site except the Other category regardless of whether the site is using system or custom categories.
 Iterator listModulesInCategory(String catID)
          Deprecated. Returns an iterator over all the modules in the category.
 void loadDescriptorFromServer()
          Deprecated. as of version 7.0, Use new Portlet Categories API
 void removeAllCategoriesFromPage(String pageID, String siteID)
          Deprecated. Removes all display categories from the given page and site.
 boolean removeCategoryFromPage(String catID, String pageID, String siteID)
          Deprecated. Removes the display category from the page.
 void save()
          Deprecated. Saves all display categories to persistent storage.
 void save(String catID)
          Deprecated.  
 void setDescriptorIsLoaded(String value)
          Deprecated. as of version 4.0, No Replacement
 void setDisplayAllCategoriesOnPage(String pageID, String siteID, boolean displayAll)
          Deprecated. Determines whether to display all categories collectively from the specified page.
 void upgradeTo7_0()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.epicentric.uid.internal.UniquelyIdentifiableManager
deleteObjectFromUID, getObjectFromUID
 
Methods inherited from interface com.epicentric.common.listgenerator.ListGenerator
getList, getList
 

Field Detail

OTHER_CATEGORY

protected static final String OTHER_CATEGORY
Deprecated. 

OTHER_CATEGORY_IN_SITE

public static final String OTHER_CATEGORY_IN_SITE
Deprecated. 

OTHER_CATEGORY_IN_SYSTEM

public static final String OTHER_CATEGORY_IN_SYSTEM
Deprecated. 

ALL_CUSTOM_CATEGORIES

public static final String ALL_CUSTOM_CATEGORIES
Deprecated. 

ALL_SYSTEM_CATEGORIES

public static final String ALL_SYSTEM_CATEGORIES
Deprecated. 
Method Detail

upgradeTo7_0

public void upgradeTo7_0()
Deprecated. 

getPortletCategory

protected com.vignette.portal.portlet.management.external.PortletCategory getPortletCategory(String UID)
Deprecated. 

getPortlet

protected static com.vignette.portal.portlet.management.external.Portlet getPortlet(String moduleID)
Deprecated. 

getPortalBean

protected static PortalBean getPortalBean(com.vignette.portal.portlet.management.external.Portlet portlet)
Deprecated. 

addCategoryToPage

public boolean addCategoryToPage(String catID,
                                 String pageID,
                                 String siteID)
Deprecated. 
Places the category on the specified page. Does nothing and returns false if the category does not exist or is already on the page.
Parameters:
catID - the UID of the category to be added to the page
pageID - the UID of the page that the category is to be added to
siteID - the UID of the site that this page is on
Returns:
true if the category was successfully added to the page
Since:
version 4.0

changeCategoryOfModule

public boolean changeCategoryOfModule(String modID,
                                      String catID,
                                      String siteID)
Deprecated. 
Places the module in the specified category in the given site. If the module previously belonged to a different category, the module is removed from the old one. Does nothing and returns false if the category does not exist.
Parameters:
modID - the UID of the module which is being moved to a new display category
catID - the UID of the new display category to which the module will belong
siteID - the UID of the site in which this category belongs
Returns:
true if module now belongs to specified category
Since:
version 4.0

changeCategoryOfModuleInServer

public boolean changeCategoryOfModuleInServer(String modID,
                                              String catID)
Deprecated. 
Places the module in the specified category in the server console. If the module previously belonged to a different category, the module is removed from the old one. Does nothing and returns false if the category does not exist.
Parameters:
modID - the UID of the module which is being moved to a new display category
catID - the UID of the new display category to which the module will belong
Returns:
true if module now belongs to specified category
Since:
version 4.0

createCategory

public DisplayCategory createCategory(String title,
                                      String friendlyID,
                                      String desc)
                               throws CategoryStoreException
Deprecated. as of version 4.0, replaced by DisplayCategoryManager.createCategoryInSite(String, String, String, String)

Creates and persistifies a new category with the given title and description. Returns null if not successful. Duplicate titles are not allowed.

If this method is called it is assumed that a category should be created in the system repository.

Parameters:
title - a String representing the title of the display category to be created
friendlyID - a String representing the friendlyID of the display category to be created
desc - a String representing a description of the types of modules in the display category to be created
Returns:
the newly created DisplayCategory

createCategoryInServer

public DisplayCategory createCategoryInServer(String title,
                                              String desc)
                                       throws CategoryStoreException
Deprecated. 
Creates and persistifies a new system category with the given title and description. Duplicate titles are not allowed.
Parameters:
title - a String representing the title of the system category to be created
desc - a String that provides a description of what modules are contained by the category to be created
Returns:
the newly created system category
Since:
version 4.0

createCategoryInSite

public DisplayCategory createCategoryInSite(String title,
                                            String desc,
                                            String siteID)
                                     throws CategoryStoreException
Deprecated. 
Creates and persistifies a new category with the given title and description in the specified site. Duplicate titles are not allowed. If the site uses system categories a system category is created otherwise a custom category is created.
Parameters:
title - a String representing the title of the display category to be created
desc - a String representing a description of the types of modules in the display category to be created
siteID - the UID of the site in which the display category should be created
Returns:
the newly created DisplayCategory
Since:
version 4.0

createCategoryInSite

public DisplayCategory createCategoryInSite(String title,
                                            String desc,
                                            String siteID,
                                            String friendlyID)
                                     throws CategoryStoreException
Deprecated. 
Creates and persistifies a new category with the given title and description in the specified site. Duplicate titles are not allowed. If the site uses system categories a system category is created otherwise a custom category is created.
Parameters:
title - a String representing the title of the display category to be created
desc - a String representing a description of the types of modules in the display category to be created
siteID - the UID of the site in which the display category should be created
friendlyID - a String representing a friendlyID of the display category to be created
Returns:
the newly created DisplayCategory
Since:
version 4.0

createCategoryInSiteNew

public DisplayCategory createCategoryInSiteNew(String title,
                                               String desc,
                                               String siteID,
                                               String friendlyID)
                                        throws CategoryStoreException
Deprecated. 

createCustomCategoryWithUID

protected DisplayCategory createCustomCategoryWithUID(String UID,
                                                      String title,
                                                      String desc,
                                                      String siteID,
                                                      String friendlyID,
                                                      Date createdDate)
                                               throws CategoryStoreException
Deprecated. 

deleteCategory

public void deleteCategory(String catID)
Deprecated. 
Deletes the display category with the given UID.
Parameters:
catID - the UID of the display category to be deleted

getAllCategories

public Enumeration getAllCategories()
Deprecated. as of version 4.0, replaced by DisplayCategoryManager.listCategoriesInSite(String)

Returns an Enumeration of all categories available to the system except the Other category.
Returns:
a list of all system display categories

getCategoryByID

public DisplayCategory getCategoryByID(String catFriendlyID)
Deprecated. as of version 4.0 as friendly IDs are no longer used for most applications, No replacement.

Returns the system display category with the specified friendly ID. Returns a "Other" category if no category is listed with the specified friendly ID.
Parameters:
catID - the friendly ID of the display category to be returned
Returns:
the system DisplayCategory with the specified friendly ID or a "Other" category if no such category is listed.

getCategoryByModuleID

public DisplayCategory getCategoryByModuleID(String modID,
                                             String siteID)
Deprecated. 
Returns the display category that contains the module with the specified ID.
Parameters:
modID - the UID of the module that is contained by the category to be returned
siteID - the UID of the site that contains the display category to be returned
Returns:
the DisplayCategory that contains the module
Since:
version 4.0

getCategoryByTitle

public DisplayCategory getCategoryByTitle(String title)
Deprecated. as of version 4.0, replaced by DisplayCategoryManager.getCategoryByTitle(String, String)

Returns the category with the given title.
Parameters:
title - a string specifying the title of the category to be returned
Returns:
the system display category with the specified title.

getCategoryByTitle

public DisplayCategory getCategoryByTitle(String title,
                                          String siteID)
Deprecated. 
Returns the display category with the specified title in the given site.
Parameters:
title - a string specifying the title of the category to be returned
siteID - the UID of the site that contains this category
Returns:
the display category with the specified title or null if no such display category exists
Since:
version 4.0

getCategoryByTitleNew

public DisplayCategory getCategoryByTitleNew(String title,
                                             String siteID)
Deprecated. 

getCategoryByUID

public DisplayCategory getCategoryByUID(String catID)
Deprecated. 
Returns the display category with the specified UID. Returns null if no category exists with the specified UID.
Parameters:
catID - the UID of the display category to be returned
Returns:
the DisplayCategory with the specified UID or null if no such category exists

getCategoryInServerByModuleID

public DisplayCategory getCategoryInServerByModuleID(String modID)
Deprecated. 
Returns the display category in the server console that contains the specified module. Returns null if no system display category contains the specified module.
Parameters:
modID - the UID of the module
Returns:
the system display category that contains the module
Since:
version 4.0

getCategoryInServerByTitle

public DisplayCategory getCategoryInServerByTitle(String title)
Deprecated. 
Returns the system display category with the given title. Returns null if no system display category has the specified title.
Parameters:
title - a string representing the title of the display category
Returns:
the system display category with the specified title
Since:
version 4.0

getDescriptorIsLoaded

public boolean getDescriptorIsLoaded()
Deprecated. as of version 4.0, No Replacement

Returns true if the descriptor has been loaded from the metastore. This class no longer uses the metastore to keep track of whether the descriptor has been loaded. The functionality of this method is in effect handled by com.epicentric.components.PortalServicesComponent#init0()
Returns:
false

getDisplayAllCategoriesOnPage

public boolean getDisplayAllCategoriesOnPage(String pageID,
                                             String siteID)
Deprecated. 
Returns true if all display categories are shown on the specified page.
Parameters:
pageID - the UID of the page that the categories will be displayed on
siteID - the UID of the site on which the page is being modified
Returns:
true if all categories will be displayed on the specified page
Since:
version 4.0

getInstance

public static DisplayCategoryManager getInstance()
Deprecated. 
Returns the single instance of the DisplayCategoryManager. There is only one instance of the DisplayCategoryManager per system, and it will be created by this method if it does not currently exist.
Returns:
the single instance of the DisplayCategoryManager

getOtherCategoryForSite

public OtherCategory getOtherCategoryForSite(String siteID)
Deprecated. 
Returns the other category for the given site. This will be the Other Category that belongs to the set of categories that the site is currently using. In other words this method will return either the system other category or this site's custom other category depending on whether the site is using system or custom categories.
Parameters:
siteID - the UID of the site
Returns:
the other category for the site
Since:
version 4.0

getOtherCategoryForSite

public OtherCategory getOtherCategoryForSite(String siteID,
                                             boolean isCustom)
Deprecated. 
Returns the specified other category for the given site.
Parameters:
siteID - the UID of the site
isCustom - if true, will return the custom Other Category for this site, otherwise will return the system Other Category.
Returns:
the specified other category
Since:
version 4.0
See Also:
DisplayCategoryManager.getOtherCategoryForSite(String siteID)

getOtherCategoryForServer

public OtherCategory getOtherCategoryForServer()
Deprecated. 
Returns the other category for the system.
Returns:
the other category for the system
Since:
version 4.0

getSupportedUIDTypes

public Collection getSupportedUIDTypes()
Deprecated. 
Returns a collection of the UID Types that this manager supports. This manager only supports DisplayCategories.
Specified by:
getSupportedUIDTypes in interface com.epicentric.uid.internal.UniquelyIdentifiableManager
Returns:
the UID Types that this manager supports

isCategoryOnPage

public boolean isCategoryOnPage(String catID,
                                String pageID,
                                String siteID)
Deprecated. 
Indicates whether the given page contains the given category.
Parameters:
catID - the UID of the category that is being tested
pageID - the UID of the page that may contain the display category
siteID - the UID of the site that this page is on
Returns:
true if the category is contained on the page.
Since:
version 4.0

isModuleInCategory

public boolean isModuleInCategory(String modID,
                                  String catID,
                                  String siteID)
Deprecated. 
Indicates whether the given module is in the given category on the given site, regardless of whether the site is using system or custom display categories.
Parameters:
modID - the UID of the module that is being tested
catID - the UID of the category that may contain the module
siteID - the UID of the site that the category is on
Returns:
true if the module is contained in the display category
Since:
version 4.0

isModuleInCategoryInServer

public boolean isModuleInCategoryInServer(String modID,
                                          String catID)
Deprecated. 
Indicates whether the given module is in the given category in the server console.
Parameters:
modID - the UID of the module that is being tested
catID - the UID of the category that may contain the module
Returns:
true if the module is contained in the display category
Since:
version 4.0

listCategoriesInServer

public Iterator listCategoriesInServer()
Deprecated. 
Returns an Iterator over all system display categories except the Other category.
Returns:
a list of all system display categories
Since:
version 4.0

listCategoriesInSite

public Iterator listCategoriesInSite(String siteID)
Deprecated. 
Returns an Iterator over the categories on a given site that it is currently set to use. This list will not contain the Other category.
Parameters:
siteID - the UID of the site for which all categories are to be found
Returns:
a list of all display categories on the specified site
Since:
version 4.0

listCategoriesInSiteNew

public Iterator listCategoriesInSiteNew(String siteID)
Deprecated. 

listCategoriesOnPage

public Iterator listCategoriesOnPage(String pageID,
                                     String siteID)
Deprecated. 
Returns an Iterator over all categories that the site will display on the given page. This list will never include the Other category even if it should be displayed on the page. Also, the list returned will depend on whether the site is set to use System or Custom display categories.
Parameters:
pageID - the UID of the page for which the categories are to be found
siteID - the UID of the site for which the categories are to be found
Returns:
a list of all display categories on the specified page and site
Since:
version 4.0

listCustomCategoriesInSite

public Iterator listCustomCategoriesInSite(String siteID)
Deprecated. 
Returns an Iterator over all custom categories on the given site except the Other category regardless of whether the site is using system or custom categories.
Parameters:
siteID - the UID of the site for which all categories are to be found
Returns:
a list of all display categories on the specified site
Since:
version 4.0

listModulesInCategory

public Iterator listModulesInCategory(String catID)
Deprecated. 
Returns an iterator over all the modules in the category. The modules are stored as uniquely identifiable items.
Parameters:
catID - the UID of the category containing the modules to be returned
Returns:
a list of all modules in the specified category
Since:
version 4.0

loadDescriptorFromServer

public void loadDescriptorFromServer()
                              throws CategoryDescriptorException
Deprecated. as of version 7.0, Use new Portlet Categories API

Initialize categories from the category descriptor file. This method defers to categories that are already there -- in other words -- if there already exists a category with an id or title matching one specified in the descriptor file, then the existing category will prevail, and the new category will not be created.

removeAllCategoriesFromPage

public void removeAllCategoriesFromPage(String pageID,
                                        String siteID)
Deprecated. 
Removes all display categories from the given page and site. Also sets the DISPLAY_ALL categories flag to false.
Parameters:
pageID - the UID of the page from which to remove the categories
siteID - the UID of the site from which to remove the categories
Since:
version 4.0

removeCategoryFromPage

public boolean removeCategoryFromPage(String catID,
                                      String pageID,
                                      String siteID)
Deprecated. 
Removes the display category from the page. Does nothing if the category is not on the page.
Parameters:
catID - the UID of the category to be removed
pageID - the UID of the page from which the category should be removed
Returns:
true if page was modified (in other words, if page used to contain the category and no longer does)
Since:
version 4.0

save

public void save()
          throws CategoryStoreException
Deprecated. 
Saves all display categories to persistent storage. Only saves display categories that have been modified.

save

public void save(String catID)
          throws CategoryStoreException
Deprecated. 

setDescriptorIsLoaded

public void setDescriptorIsLoaded(String value)
Deprecated. as of version 4.0, No Replacement

Sets a property in the metastore/system/categories folder. When set to true, it indicates that the categories in this system have ever been initialized on this server from the Category Descriptor file. This class no longer uses the metastore to keep track of whether the descriptor has been loaded. The functionality of this method is handled by com.epicentric.components.PortalServicesComponent#init0()
Parameters:
value - the value to be stored in the metastore

setDisplayAllCategoriesOnPage

public void setDisplayAllCategoriesOnPage(String pageID,
                                          String siteID,
                                          boolean displayAll)
Deprecated. 
Determines whether to display all categories collectively from the specified page. This is different from adding or removing each category from the page individually. Categories that were placed on the page individually will remain on the page regardless of this method.
Parameters:
pageID - the UID of the page that the categoroes are to be displayed on
siteID - the UID of the site on which the page is being modified
displayAll - true if all categories should be displayed on the specified page
Since:
version 4.0

02/28/2005
 

Copyright and Trademark Notices