com.sapportals.wcm.rendering.resource
Class ResourceRendererFactory
[contained in: com.sap.km.cm.ui.flex.par - km.shared.ui.flex.resource_api.jar]
com.sapportals.wcm.rendering.base.AbstractFactory
|
+--com.sapportals.wcm.rendering.resource.ResourceRendererFactory
- All Implemented Interfaces:
- IFactoryInfoProvider
- public final class ResourceRendererFactory
- extends AbstractFactory
This class is a singleton factory, creating new instances of
IResourceRenderer. 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 IResourceRenderer 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 IResourceRenderer 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 |
initialize
protected void initialize()
throws WcmException
- Description copied from class:
AbstractFactory
- This method is called when the class, that extends
AbstractFactory, is instantiated
for the first time. It uses the ConfigurationFramework to retrieve the ILayoutObjects and
their settings from the present configuration.
When this method is called at a later point of time (e.g. when an update-event from the
configuration framework is fired, the existing ILayoutObjects and settings are deleted
and reloaded from the configuration.
When reloading, the old configuration will be kept until the complete reloading has been finished.
At that time, the new configuration will replace the existing one. If exceptions or errors occured
when reloading the configuration, the old configuration will be removed anyways and only the
default classes will be available.
- Overrides:
initialize in class AbstractFactory
- Following copied from class:
com.sapportals.wcm.rendering.base.AbstractFactory
- Throws:
WcmException - thrown when the configuration-framework throws any kind of exception.
If this happens, all classes, mapping etc. that have been read out are reset again.
Only the default ILayoutObject and the default ILayoutObject for
508-rendering that are set in the class that extends this AbstractFactory are
available. This information is logged with attribute .
If classes specified in the IConfigurable returned from the Configuration
Framework do not exist or do not implement the ILayoutObject interface,
the exception is caught and the information is logged with attribute .
getInstance
public static ResourceRendererFactory getInstance()
- Returns:
- the singleton instance of the ResourceRendererFactory.
When this method is first called, the singleton instance reads out the configuration and
fills its internal
HashMap of IResourceRenderer
getResourceRenderer
public IResourceRenderer getResourceRenderer(IProxy proxy,
IResource outerResource,
IResource resource,
com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
throws WcmException
- returns a new instance of an
IResourceRenderer.
The factory first checks, if section 508-conform rendering is needed for the current user
It then passes all given parameters to the ICustomizingController, which
will return the correct alias-name of an IResourceRenderer. If no renderer
can be found in the factory's HashMap of renderers, the factory will
return the coded default-renderer. The renderer has already the given resource set as
its resource to render
- Parameters:
proxy - the proxy that acts as the outermost container of the current rendering process.
getResourceRenderer
public IResourceRenderer getResourceRenderer(IProxy proxy,
ITypedResourceList list,
IResource resource,
com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
throws WcmException
- returns a new instance of an
IResourceRenderer.
The factory first checks, if section 508-conform rendering is needed for the current user
It then passes all given parameters to the ICustomizingController, which
will return the correct alias-name of an IResourceRenderer. If no renderer
can be found in the factory's HashMap of renderers, the factory will
return the coded default-renderer. The resource-attribute of the renderer will not be set.
- Parameters:
proxy - the proxy that acts as the outermost container of the current rendering process.
getSupportedPreviewMimetypes
public java.util.HashSet getSupportedPreviewMimetypes()
prepareSupportedPreviewMimetypes
public void prepareSupportedPreviewMimetypes()
getResourceRendererConfiguration
public java.lang.String getResourceRendererConfiguration(java.lang.String format)
- returns a formatted list including all configured
IResourceRenderer
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
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
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.