com.sapportals.wcm.rendering.base
Class AbstractFactory
java.lang.Object
com.sapportals.wcm.rendering.base.AbstractFactory
- All Implemented Interfaces:
- IFactoryInfoProvider
- Direct Known Subclasses:
- CollectionRendererFactory, ResourceRendererFactory
- public abstract class AbstractFactory
- extends Object
- implements IFactoryInfoProvider
|
Method Summary |
void |
configEvent(ConfigEvent event)
Description of the Method |
String |
getConfigListenerId()
Gets the configListenerId attribute of the UICommandFactory object |
protected String |
getConfiguration(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,
Hashtable table,
IFlavor flavor,
boolean requires508)
This method is used by the classes that extend the AbstractFactory. |
protected ILayoutObject |
getLayoutObject(IProxy proxy,
ITypedResourceList resourcelist,
Hashtable table,
IFlavor flavor,
boolean requires508)
|
List |
getMappings(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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIGURATION_FORMAT_TABLE
public static final String CONFIGURATION_FORMAT_TABLE
- See Also:
- Constant Field Values
CONFIGURATION_FORMAT_TABLE_NO_HEADER
public static final String CONFIGURATION_FORMAT_TABLE_NO_HEADER
- See Also:
- Constant Field Values
CONFIGURATION_FORMAT_LIST
public static final String CONFIGURATION_FORMAT_LIST
- See Also:
- Constant Field Values
category
protected IRenderObjectInfo.RenderObjectCategory category
configplugin
protected String configplugin
configclass
protected String configclass
defaultclass
protected String defaultclass
default508class
protected String default508class
default_config
protected String default_config
default508_config
protected String default508_config
classkey
protected IParameterName classkey
descriptiveName
protected String descriptiveName
AbstractFactory
public AbstractFactory()
getLayoutObject
protected ILayoutObject getLayoutObject(IProxy proxy,
IResource outerResource,
IResource resource,
Hashtable table,
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 fortable - the parameters coming from the URL, including the iView settingsflavor - 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.
- Throws:
WcmException
getLayoutObject
protected ILayoutObject getLayoutObject(IProxy proxy,
ITypedResourceList resourcelist,
Hashtable table,
IFlavor flavor,
boolean requires508)
throws WcmException
- 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 String getConfiguration(String format)
- returns a formatted list of all configured
ILayoutObjects and
their supported parameters and default values
getConfigListenerId
public String getConfigListenerId()
- Gets the configListenerId attribute of the UICommandFactory object
- Returns:
- The configListenerId value
configEvent
public void configEvent(ConfigEvent event)
- Description of the Method
getMappings
public List getMappings(Locale locale)
- Specified by:
getMappings in interface 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
- 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
- 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.
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.