public final class ResourceRendererFactory extends AbstractFactory
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.IFactoryInfoProvider.MappingInformation
category, classkey, configclass, configplugin, CONFIGURATION_FORMAT_LIST, CONFIGURATION_FORMAT_TABLE, CONFIGURATION_FORMAT_TABLE_NO_HEADER, default_config, default508_config, default508class, defaultclass, descriptiveName, uninitialized
Modifier and Type | Method and Description |
---|---|
String |
getFactoryName()
Deprecated.
As of NetWeaver 7.1
|
static ResourceRendererFactory |
getInstance()
Deprecated.
As of NetWeaver 7.1
|
IResourceRenderer |
getResourceRenderer(IProxy proxy,
IResource outerResource,
IResource resource,
IFlavor flavor)
Deprecated.
As of NetWeaver 7.1
|
IResourceRenderer |
getResourceRenderer(IProxy proxy,
ITypedResourceList list,
IResource resource,
IFlavor flavor)
Deprecated.
As of NetWeaver 7.1
|
String |
getResourceRendererConfiguration(String format)
Deprecated.
As of NetWeaver 7.1
|
HashSet |
getSupportedPreviewMimetypes()
Deprecated.
As of NetWeaver 7.1
|
protected void |
initialize()
Deprecated.
As of NetWeaver 7.1
|
void |
prepareSupportedPreviewMimetypes()
Deprecated.
As of NetWeaver 7.1
|
classLoaderAdded, classLoaderReplaced, getConfiguration, getLastReloadTime, getLayoutObject, getLayoutObject, getMappings, getStatus
protected void initialize() throws WcmException
AbstractFactory
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.initialize
in class AbstractFactory
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 error.
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 error.public static ResourceRendererFactory getInstance()
HashMap
of IResourceRenderer
public IResourceRenderer getResourceRenderer(IProxy proxy, IResource outerResource, IResource resource, IFlavor flavor) throws WcmException
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 renderproxy
- the proxy that acts as the outermost container of the current rendering process.outerResource
- the leading resource which determines the layoutresource
- the resource the renderer is needed forflavor
- the flavor for the requested renderer. This is needed for the ICustomizingController
to read out configuration data. Can be null
.WcmException
public IResourceRenderer getResourceRenderer(IProxy proxy, ITypedResourceList list, IResource resource, IFlavor flavor) throws WcmException
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.proxy
- the proxy that acts as the outermost container of the current rendering process.list
- the resourcelist the renderer is needed for.resource
- flavor
- the flavor for the requested renderer. This is needed for the ICustomizingController
to read out configuration data. Can be null
.WcmException
public HashSet getSupportedPreviewMimetypes()
public void prepareSupportedPreviewMimetypes()
public String getResourceRendererConfiguration(String format)
IResourceRenderer
with their attributes and settings.
This is only used for documentation purposes.format
- the format requested. See AbstractFactory
for supported formatspublic String getFactoryName()
null
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com]
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice