SAP NetWeaver '04

com.sapportals.wcm.rendering.collection
Class CollectionRendererFactory

[contained in: com.sap.km.cm.ui.flex.par - km.shared.ui.flex.collection_api.jar]
com.sapportals.wcm.rendering.base.AbstractFactory
  |
  +--com.sapportals.wcm.rendering.collection.CollectionRendererFactory
All Implemented Interfaces:
IFactoryInfoProvider

public final class CollectionRendererFactory
extends AbstractFactory

This class is a singleton factory, creating new instances of ICollectionRenderer. These instances are ready-to-use, as the factory takes care of the initialization. This includes the setting of the member variables of the renderer. See ICollectionRenderer for details. The factory reads out mapping information from the configuration framework. It uses the mapping entries in the configuration to create in internal HashMap that holds an instance of each ICollectionRenderer specified in the configuration. The alias-attribute of the mapping is used as the key for the HashMap entries. The factory reacts on events from the config. If an event is received, the HashMap is cleared and all instances are newly created. If an exception occurs while filling the map, the map is cleared again and only the default-renderer specified in this factory will be usable.


Inner classes inherited from class com.sapportals.wcm.rendering.base.IFactoryInfoProvider
IFactoryInfoProvider.MappingInformation
 
Fields inherited from class com.sapportals.wcm.rendering.base.AbstractFactory
category, classkey, configclass, configplugin, CONFIGURATION_FORMAT_LIST, CONFIGURATION_FORMAT_TABLE, CONFIGURATION_FORMAT_TABLE_NO_HEADER, default_config, default508_config, default508class, defaultclass, descriptiveName
 
Method Summary
 ICollectionRenderer getCollectionRenderer(IProxy proxy, ICollection currentFolder, ICollection customizingCollection, com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
           
 ICollectionRenderer getCollectionRenderer(IProxy proxy, ICollection collection, com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
           
 ICollectionRenderer getCollectionRenderer(IProxy proxy, ITypedResourceList resourcelist, com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
           
 java.lang.String getCollectionRendererConfiguration(java.lang.String format)
          returns a formatted list including all configured ICollectionRenderer with their attributes and settings.
 java.lang.String getFactoryName()
           
static CollectionRendererFactory getInstance()
           
 
Methods inherited from class com.sapportals.wcm.rendering.base.AbstractFactory
configEvent, getConfigListenerId, getConfiguration, getLastReloadTime, getLayoutObject, getLayoutObject, getMappings, getStatus, initialize
 

Method Detail

getInstance

public static CollectionRendererFactory getInstance()
Returns:
the singleton instance of the CollectionRendererFactory. When this method is first called, the singleton instance reads out the configuration and fills its internal HashMap of ICollectionRenderer

getCollectionRendererConfiguration

public java.lang.String getCollectionRendererConfiguration(java.lang.String format)
returns a formatted list including all configured ICollectionRenderer with their attributes and settings. This is only used for documentation purposes.
Parameters:
format - the format requested. See AbstractFactory for supported formats
Returns:
the formatted list

getCollectionRenderer

public ICollectionRenderer getCollectionRenderer(IProxy proxy,
                                                 ICollection collection,
                                                 com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
                                          throws WcmException
Parameters:
proxy - the IProxy that acts as the outer container for the rendering
collection - the collection that needs a renderer
flavor - description, what kind of ICollectionRenderer is wanted, e.g. "Taxonomy" or "ImageMap"
Returns:
ICollectionRenderer - a new instance that is ready to use by the calling class: The parameters, the resource and the proxy and context are set. This call is threadsafe, for every call (even with the same parameters) a new instance of the ICollectionRenderer is returned

getCollectionRenderer

public ICollectionRenderer getCollectionRenderer(IProxy proxy,
                                                 ICollection currentFolder,
                                                 ICollection customizingCollection,
                                                 com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
                                          throws WcmException
Parameters:
proxy - the IProxy that acts as the outer container for the rendering
currentFolder - the collection that needs a renderer
customizingCollection - the collection that is used to retrieve additional configuration
flavor - description, what kind of ICollectionRenderer is wanted, e.g. "Taxonomy" or "ImageMap"
Returns:
ICollectionRenderer - a new instance that is ready to use by the calling class: The parameters, the resource and the proxy and context are set. This call is threadsafe, for every call (even with the same parameters) a new instance of the ICollectionRenderer is returned

getCollectionRenderer

public ICollectionRenderer getCollectionRenderer(IProxy proxy,
                                                 ITypedResourceList resourcelist,
                                                 com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
                                          throws WcmException
Parameters:
proxy - the IProxy that acts as the outer container for the rendering
resourcelist - the resourcelist that needs a renderer
flavor - description, what kind of ICollectionRenderer is wanted, e.g. "Taxonomy" or "ImageMap"
Returns:
ICollectionRenderer - a new instance that is ready to use by the calling class: The parameters, the resource and the proxy and context are set. This call is threadsafe, for every call (even with the same parameters) a new instance of the ICollectionRenderer is returned

getFactoryName

public java.lang.String getFactoryName()
Following copied from interface: com.sapportals.wcm.rendering.base.IFactoryInfoProvider
Returns:
a human-readable name of the factory, must not be null

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.