|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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.| Nested Class Summary |
| Nested classes inherited from class com.sapportals.wcm.rendering.base.IFactoryInfoProvider |
IFactoryInfoProvider.MappingInformation |
| Field Summary | |
static 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 String |
COMPONENT_PATH
key to retrieve a path class instance (a.k.a. |
static 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 String |
DATA_KEY_PAGER_DATA
key to use when transferring data to an IComponent instance
using its setData method. |
static String |
DATA_KEY_PARENT
key to use when transferring data to an IComponent instance
using its setData method. |
static String |
DATA_KEY_RESOURCE_LIST
key to use when transferring data to an IComponent instance
using its setData method. |
static String |
DATA_KEY_SEARCH_SESSION
key to use when transferring data to an IComponent instance
using its setData method. |
static String |
DATA_KEY_SORT_DATA
key to use when transferring data to an IComponent instance
using its setData method. |
static String |
LINE_BREAK
constant used to separate debugging information |
| Method Summary | |
boolean |
checkComponentAlias(String alias)
Checks is a component with the given alias exists |
void |
configEvent(ConfigEvent parm1)
is called by the configuration, if configuration for the factory was changed. |
String |
createLinkID(IComponent component,
ArrayList values)
creates a unique ID that also holds the given IComponent's alias
and all the entries of the given ArrayList. |
String |
createStaticLinkID(IComponent component,
ArrayList values,
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,
Event event,
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,
IFlavor impFlavor,
String alias)
|
IComponent |
getComponent(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(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(String alias,
IProxy proxy,
ICollectionRenderer renderer,
IResource res,
IFlavor flavor)
|
IComponent |
getComponent(String alias,
IProxy proxy,
IFlavor flavor)
|
String |
getConfigListenerId()
Gets the configListenerId attribute of the UICommandFactory object |
String |
getFactoryName()
|
static ComponentFactory |
getInstance()
Gets the instance attribute of the ComponentFactory class. |
long |
getLastReloadTime()
|
List |
getMappings(Locale locale)
|
List |
getPresentConfiguration(IResourceContext context)
returns a list of setting information of the groupcommands. |
String |
getPresentConfiguration(IResourceContext context,
String style,
boolean showJavaClassNames)
returns a string representation of the structure of all defined groupcommands with their children. |
Status |
getStatus()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String LINE_BREAK
public static final String COMPONENT_PAGER
getComponent method and stating this constant as alias-parameter
public static final String COMPONENT_PATH
getComponent method and stating this
constant as alias-parameter
public static final String COMPONENT_SORT_HEADER
getComponent method and stating this constant as alias-parameter
public static final 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 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 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 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 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(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,
IFlavor impFlavor,
String alias)
public IComponent getComponent(String alias,
IProxy proxy,
ICollectionRenderer renderer,
IResource res,
IFlavor flavor)
public boolean checkComponentAlias(String alias)
alias -
public IComponent getComponent(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(String alias,
IProxy proxy,
IFlavor flavor)
public IComponentEvent decodeEvent(ICollectionRenderer renderer,
IProxy proxy,
Event event,
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.
WcmException
public String createLinkID(IComponent component,
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 String createStaticLinkID(IComponent component,
ArrayList values,
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 String getConfigListenerId()
public void configEvent(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 String getPresentConfiguration(IResourceContext context,
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 string
public List getPresentConfiguration(IResourceContext context)
String to avoid ClassCastException
s.
context - Description of the param
public String getFactoryName()
getFactoryName in interface IFactoryInfoProvidernullpublic List getMappings(Locale locale)
getMappings in interface IFactoryInfoProviderlocale - defines the language to use, if the factory offers translated information,
must not be null
IFactoryInfoProvider.MappingInformation,
must not be nullpublic Status getStatus()
getStatus in interface IFactoryInfoProviderStatus.ERRORpublic long getLastReloadTime()
getLastReloadTime in interface 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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||