SAP NetWeaver '04

com.sapportals.wcm.rendering.base
Class AbstractFactory

[contained in: com.sap.km.cm.ui.flex.par - km.shared.ui.flex.base_api.jar]
com.sapportals.wcm.rendering.base.AbstractFactory
All Implemented Interfaces:
IFactoryInfoProvider
Direct Known Subclasses:
CollectionRendererFactory, ResourceRendererFactory

public abstract class AbstractFactory
implements IFactoryInfoProvider


Inner classes inherited from class com.sapportals.wcm.rendering.base.IFactoryInfoProvider
IFactoryInfoProvider.MappingInformation
 
Field Summary
protected  com.sapportals.wcm.repository.service.layout.info.IRenderObjectInfo.RenderObjectCategory category
           
protected  com.sapportals.wcm.repository.service.layout.customizing.IParameterName classkey
           
protected  java.lang.String configclass
           
protected  java.lang.String configplugin
           
static java.lang.String CONFIGURATION_FORMAT_LIST
           
static java.lang.String CONFIGURATION_FORMAT_TABLE
           
static java.lang.String CONFIGURATION_FORMAT_TABLE_NO_HEADER
           
protected  java.lang.String default_config
           
protected  java.lang.String default508_config
           
protected  java.lang.String default508class
           
protected  java.lang.String defaultclass
           
protected  java.lang.String descriptiveName
           
 
Constructor Summary
AbstractFactory()
           
 
Method Summary
 void configEvent(com.sapportals.config.event.ConfigEvent event)
          Description of the Method
 java.lang.String getConfigListenerId()
          Gets the configListenerId attribute of the UICommandFactory object
protected  java.lang.String getConfiguration(java.lang.String format)
          returns a formatted list of all configured ILayoutObjects and their supported parameters and default values
 long getLastReloadTime()
           
protected  ILayoutObject getLayoutObject(IProxy proxy, IResource outerResource, IResource resource, java.util.Hashtable table, com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor, boolean requires508)
          This method is used by the classes that extend the AbstractFactory.
protected  ILayoutObject getLayoutObject(IProxy proxy, ITypedResourceList resourcelist, java.util.Hashtable table, com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor, boolean requires508)
           
 java.util.List getMappings(java.util.Locale locale)
           
 Status getStatus()
           
protected  void initialize()
          This method is called when the class, that extends AbstractFactory, is instantiated for the first time.
 
Methods inherited from interface com.sapportals.wcm.rendering.base.IFactoryInfoProvider
getFactoryName
 

Field Detail

CONFIGURATION_FORMAT_TABLE

public static final java.lang.String CONFIGURATION_FORMAT_TABLE

CONFIGURATION_FORMAT_TABLE_NO_HEADER

public static final java.lang.String CONFIGURATION_FORMAT_TABLE_NO_HEADER

CONFIGURATION_FORMAT_LIST

public static final java.lang.String CONFIGURATION_FORMAT_LIST

category

protected com.sapportals.wcm.repository.service.layout.info.IRenderObjectInfo.RenderObjectCategory category

configplugin

protected java.lang.String configplugin

configclass

protected java.lang.String configclass

defaultclass

protected java.lang.String defaultclass

default508class

protected java.lang.String default508class

default_config

protected java.lang.String default_config

default508_config

protected java.lang.String default508_config

classkey

protected com.sapportals.wcm.repository.service.layout.customizing.IParameterName classkey

descriptiveName

protected java.lang.String descriptiveName
Constructor Detail

AbstractFactory

public AbstractFactory()
Method Detail

getLayoutObject

protected ILayoutObject getLayoutObject(IProxy proxy,
                                        IResource outerResource,
                                        IResource resource,
                                        java.util.Hashtable table,
                                        com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor,
                                        boolean requires508)
                                 throws WcmException
This method is used by the classes that extend the AbstractFactory. This class holds a map of ILayoutObject. It uses the ICustomizingController to retrieve the best match for the given parameters. The ICustomizingController returns the best fitting result or - if none could be found - the default value, that was supplied. This returned value is just the alias for the needed ILayoutController. The ILayoutObject that is mapped on this alias will be returned. If the value returned by the ICustomizingController is not known to the AbstractFactory or the class that is mapped on this alias cannot be instantiated an error is logged and the default ILayoutObject is returned.
Parameters:
resource - the resource that the ILayoutObject is needed for
table - the parameters coming from the URL, including the iView settings
flavor - if several ILayoutObject are available for this resource,
requires508 - flag, if the ILayoutObject returned must support 508-conform rendering. the flavor specifies which one to take.
Returns:
ILayoutObject a new instance of the ILayoutObject that best matches the given parameters. If 508-conform rendering is required and the ILayoutObject retrieved by the above described procedure does not support this, the default 508-renderer specified will be returned instead.

getLayoutObject

protected ILayoutObject getLayoutObject(IProxy proxy,
                                        ITypedResourceList resourcelist,
                                        java.util.Hashtable table,
                                        com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor,
                                        boolean requires508)
                                 throws WcmException

initialize

protected void initialize()
                   throws WcmException
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.
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 .

getConfiguration

protected java.lang.String getConfiguration(java.lang.String format)
returns a formatted list of all configured ILayoutObjects and their supported parameters and default values

getConfigListenerId

public java.lang.String getConfigListenerId()
Gets the configListenerId attribute of the UICommandFactory object
Returns:
The configListenerId value

configEvent

public void configEvent(com.sapportals.config.event.ConfigEvent event)
Description of the Method
Parameters:
parm1 - Description of the param

getMappings

public java.util.List getMappings(java.util.Locale locale)
Specified by:
getMappings in interface IFactoryInfoProvider
Following copied from interface: com.sapportals.wcm.rendering.base.IFactoryInfoProvider
Parameters:
locale - defines the language to use, if the factory offers translated information, must not be null
Returns:
a list that must only contain IFactoryInfoProvider.MappingInformation, must not be null

getStatus

public Status getStatus()
Specified by:
getStatus in interface IFactoryInfoProvider
Following copied from interface: com.sapportals.wcm.rendering.base.IFactoryInfoProvider
Returns:
the aggregated status of the factory. If, e.g., there have been errors creating a class defined in the config, the factory should return Status.ERROR

getLastReloadTime

public long getLastReloadTime()
Specified by:
getLastReloadTime in interface IFactoryInfoProvider
Following copied from interface: com.sapportals.wcm.rendering.base.IFactoryInfoProvider
Returns:
the time of the last reload of the config by this factory. Expects a format such as returned by System.currentTimeMillis(). An implementing class might also return -1 to indicate, that no information is available.

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.