com.sapportals.wcm.rendering.collection
Class CollectionRendererFactory
java.lang.Object
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.
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 String getCollectionRendererConfiguration(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,
IFlavor flavor)
throws WcmException
- Parameters:
proxy - the IProxy that acts as the outer container for the renderingcollection - the collection that needs a rendererflavor - 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
- Throws:
WcmException
getCollectionRenderer
public ICollectionRenderer getCollectionRenderer(IProxy proxy,
ICollection currentFolder,
ICollection customizingCollection,
IFlavor flavor)
throws WcmException
- Parameters:
proxy - the IProxy that acts as the outer container for the renderingcurrentFolder - the collection that needs a renderercustomizingCollection - the collection that is used to retrieve additional configurationflavor - 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
- Throws:
WcmException
getCollectionRenderer
public ICollectionRenderer getCollectionRenderer(IProxy proxy,
ITypedResourceList resourcelist,
IFlavor flavor)
throws WcmException
- Parameters:
proxy - the IProxy that acts as the outer container for the renderingresourcelist - the resourcelist that needs a rendererflavor - 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
- Throws:
WcmException
getFactoryName
public String getFactoryName()
- Returns:
- a human-readable name of the factory, must not be
null
Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. 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.