|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
com.sapportals.wcm.rendering.collection.ComponentFactory
IComponents. When the factory is called for
the first time or when it receives a ConfigEvent , it reads out
information from the config framework. This information allows a mapping of a
descriptive name ("alias") to a java-class. This allows a usage of the descriptive name
throughout the configuration of the other parts of the rendering framework.
If a mapping points to a not-existing or non-loadable class or if the class
found does not implement the needed interface, an error message is written in
the log.files, stating the name of the alias and the mapped java-class.| Inner classes inherited from class com.sapportals.wcm.rendering.base.IFactoryInfoProvider |
IFactoryInfoProvider.MappingInformation |
| Field Summary | |
static java.lang.String |
COMPONENT_PAGER
key to retrieve a pager class instance from the factory using the factory's getComponent method and stating this constant as alias-parameter |
static java.lang.String |
COMPONENT_PATH
key to retrieve a path class instance (a.k.a. |
static java.lang.String |
COMPONENT_SORT_HEADER
key to retrieve a sort header class instance from the factory using the factory's getComponent method and stating this constant as alias-parameter |
static java.lang.String |
DATA_KEY_PAGER_DATA
key to use when transferring data to an IComponent instance
using its setData method. |
static java.lang.String |
DATA_KEY_PARENT
key to use when transferring data to an IComponent instance
using its setData method. |
static java.lang.String |
DATA_KEY_RESOURCE_LIST
key to use when transferring data to an IComponent instance
using its setData method. |
static java.lang.String |
DATA_KEY_SEARCH_SESSION
key to use when transferring data to an IComponent instance
using its setData method. |
static java.lang.String |
DATA_KEY_SORT_DATA
key to use when transferring data to an IComponent instance
using its setData method. |
static java.lang.String |
LINE_BREAK
constant used to separate debugging information |
| Method Summary | |
void |
configEvent(com.sapportals.config.event.ConfigEvent parm1)
is called by the configuration, if configuration for the factory was changed. |
java.lang.String |
createLinkID(IComponent component,
java.util.ArrayList values)
creates a unique ID that also holds the given IComponent's alias
and all the entries of the given ArrayList. |
java.lang.String |
createStaticLinkID(IComponent component,
java.util.ArrayList values,
java.lang.String id)
creates a unique ID that also holds the given IComponent's alias
and all the entries of the given ArrayList. |
IComponentEvent |
decodeEvent(ICollectionRenderer renderer,
IProxy proxy,
com.sapportals.htmlb.event.Event event,
java.util.Map values)
creates a new IComponent from the component's alias found inside
the given event and let's it fire the returned IComponentEvent or
null.
|
IComponent |
getComponent(IProxy proxy,
IResource res,
com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor impFlavor,
java.lang.String alias)
|
IComponent |
getComponent(java.lang.String alias,
IProxy proxy)
returns a new instance of an IComponent that is defined for the
given alias or null, if no component is defined for the given
alias.
|
IComponent |
getComponent(java.lang.String alias,
IProxy proxy,
ICollectionRenderer renderer)
returns a new instance of an IComponent that is defined for the
given alias or null, if no component is defined for the given
alias.
|
IComponent |
getComponent(java.lang.String alias,
IProxy proxy,
ICollectionRenderer renderer,
IResource res,
com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
|
IComponent |
getComponent(java.lang.String alias,
IProxy proxy,
com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
|
java.lang.String |
getConfigListenerId()
Gets the configListenerId attribute of the UICommandFactory object |
java.lang.String |
getFactoryName()
|
static ComponentFactory |
getInstance()
Gets the instance attribute of the ComponentFactory class. |
long |
getLastReloadTime()
|
java.util.List |
getMappings(java.util.Locale locale)
|
java.util.List |
getPresentConfiguration(IResourceContext context)
returns a list of setting information of the groupcommands. |
java.lang.String |
getPresentConfiguration(IResourceContext context,
java.lang.String style,
boolean showJavaClassNames)
returns a string representation of the structure of all defined groupcommands with their children. |
Status |
getStatus()
|
| Field Detail |
public static final java.lang.String LINE_BREAK
public static final java.lang.String COMPONENT_PAGER
getComponent method and stating this constant as alias-parameterpublic static final java.lang.String COMPONENT_PATH
getComponent method and stating this
constant as alias-parameterpublic static final java.lang.String COMPONENT_SORT_HEADER
getComponent method and stating this constant as alias-parameterpublic static final java.lang.String DATA_KEY_SORT_DATA
IComponent instance
using its setData method. It is used as the key for a
Map entry that must be of class SortDefinition.public static final java.lang.String DATA_KEY_PAGER_DATA
IComponent instance
using its setData method. It is used as the key for a
Map entry that must be of class PagerData.public static final java.lang.String DATA_KEY_RESOURCE_LIST
IComponent instance
using its setData method. It is used as the key for a
Map entry that must be of class IResourceList.public static final java.lang.String DATA_KEY_SEARCH_SESSION
IComponent instance
using its setData method. It is used as the key for a
Map entry that must be of class ISearchSession.public static final java.lang.String DATA_KEY_PARENT
IComponent instance
using its setData method. It is used as the key for a
Map entry that must be of class ICollection.| Method Detail |
public static ComponentFactory getInstance()
public IComponent getComponent(java.lang.String alias,
IProxy proxy,
ICollectionRenderer renderer)
IComponent that is defined for the
given alias or null, if no component is defined for the given
alias.
The components attributes alias, flavor, proxy, renderer, resource, startUri
will be set with the values obtained from the given parameters.
public IComponent getComponent(IProxy proxy,
IResource res,
com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor impFlavor,
java.lang.String alias)
public IComponent getComponent(java.lang.String alias,
IProxy proxy,
ICollectionRenderer renderer,
IResource res,
com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
public IComponent getComponent(java.lang.String alias,
IProxy proxy)
IComponent that is defined for the
given alias or null, if no component is defined for the given
alias.
The components attributes alias, proxy, resource, startUri
will be set with the values obtained from the given parameters.
public IComponent getComponent(java.lang.String alias,
IProxy proxy,
com.sapportals.wcm.repository.service.layout.customizing.flavor.IFlavor flavor)
public IComponentEvent decodeEvent(ICollectionRenderer renderer,
IProxy proxy,
com.sapportals.htmlb.event.Event event,
java.util.Map values)
throws WcmException
IComponent from the component's alias found inside
the given event and let's it fire the returned IComponentEvent or
null.
If the id of the Htmlb-Component that fired the Event
was not created using the factory's createLinkID or
createStaticLinkID, this method might throw an WcmException
or simply return null. Otherwise, a new Component
instance is created, its attributes alias, proxy, renderer are set
with the parameters given and its decodeEvent method is called,
using again the given parameters. The created instance of the IComponent
will not be reused by the factory in later calls.
public java.lang.String createLinkID(IComponent component,
java.util.ArrayList values)
throws WcmException
IComponent's alias
and all the entries of the given ArrayList. It also adds a
String obtained from IDCounter.currentID(). Therefore,
the ID created by this method cannot be reproduced at a later time. If you
need to access the htmlb-Component inside your IComponent
after an http-request-cycle, use the factory's createStaticLinkID
method.
None of the given parameters must be null.WcmException - if the creation of the linkID failed. This exception might
wrap a WdfException.
public java.lang.String createStaticLinkID(IComponent component,
java.util.ArrayList values,
java.lang.String id)
throws WcmException
IComponent's alias
and all the entries of the given ArrayList. It also adds the
id-parameter given. Therefore, the ID created by this method can be reproduced
at a later time. Note that if you create two htmlb-Components within
the same IComponent and the same ArrayList and id,
there will be a NonUniqueIDException thrown when rendering the html-page.
None of the given parameters must be null.WcmException - if the creation of the linkID failed. This exception might
wrap a WdfException.public java.lang.String getConfigListenerId()
public void configEvent(com.sapportals.config.event.ConfigEvent parm1)
ConfigEvent.CONFIGURABLE_LOADED or ConfigEvent.CONFIGMANAGER_TERMINATED
, the factory deletes all its entries and reloads the configuration, creating
all commands anew.parm1 - the event raised by the configuration
public java.lang.String getPresentConfiguration(IResourceContext context,
java.lang.String style,
boolean showJavaClassNames)
context - the current context of the user, sets e.g. the language
of the labels for the commandsstyle - currently not usedshowJavaClassNames - flag to show (true) or hide (false) java class names
in the returned stringpublic java.util.List getPresentConfiguration(IResourceContext context)
String to avoid ClassCastException
s.context - Description of the parampublic java.lang.String getFactoryName()
getFactoryName in interface IFactoryInfoProvidercom.sapportals.wcm.rendering.base.IFactoryInfoProvidernullpublic java.util.List getMappings(java.util.Locale locale)
getMappings in interface IFactoryInfoProvidercom.sapportals.wcm.rendering.base.IFactoryInfoProviderlocale - defines the language to use, if the factory offers translated information,
must not be nullIFactoryInfoProvider.MappingInformation,
must not be nullpublic Status getStatus()
getStatus in interface IFactoryInfoProvidercom.sapportals.wcm.rendering.base.IFactoryInfoProviderStatus.ERRORpublic long getLastReloadTime()
getLastReloadTime in interface IFactoryInfoProvidercom.sapportals.wcm.rendering.base.IFactoryInfoProviderSystem.currentTimeMillis().
An implementing class might also return -1 to indicate, that
no information is available.
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||