com.sapportals.wcm.rendering.uicommand

Class UICommandFactory

java.lang.Object
  extended by com.sapportals.wcm.rendering.uicommand.UICommandFactory
All Implemented Interfaces:
com.sap.netweaver.km.monitor.IMonitorInfoProvider, IClassLoaderRegistryListener, IFactoryInfoProvider

Deprecated. As of NetWeaver 7.1

public final class UICommandFactory
extends Object
implements IFactoryInfoProvider, com.sap.netweaver.km.monitor.IMonitorInfoProvider, IClassLoaderRegistryListener


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sapportals.wcm.rendering.base.IFactoryInfoProvider
IFactoryInfoProvider.MappingInformation
 
Field Summary
static String KEY_ALIAS
          Deprecated.  
static String KEY_CLASS
          Deprecated.  
static String KEY_DESCRIPTION
          Deprecated.  
static String KEY_EMB_LABEL
          Deprecated.  
static String KEY_EMB_MASS_LABEL
          Deprecated.  
static String KEY_EMB_MASS_TOOLTIP
          Deprecated.  
static String KEY_EMB_TOOLTIP
          Deprecated.  
static String KEY_GROUP_BUNDLE_FILE
          Deprecated.  
static String KEY_GROUP_BUNDLE_LABEL
          Deprecated.  
static String KEY_GROUP_BUNDLE_TOOPTIP
          Deprecated.  
static String KEY_GROUP_COMMANDS_LIST
          Deprecated.  
static String KEY_GROUP_LABEL
          Deprecated.  
static String KEY_GROUP_TOOPTIP
          Deprecated.  
static String KEY_ICON_PATH
          Deprecated.  
static String KEY_INPUT_CONTROL_TEXT_1
          Deprecated.  
static String KEY_INPUT_CONTROL_TEXT_2
          Deprecated.  
static String KEY_LAYOUT_SET
          Deprecated.  
static String KEY_MASSCOMMAND
          Deprecated.  
static String KEY_PARAMETERS
          Deprecated.  
static String KEY_PROPERTIES
          Deprecated.  
static String KEY_ROLE_MAPPING
          Deprecated.  
static String LINE_BREAK
          Deprecated. constant used to separate debugging information
static com.sapportals.wcm.util.resource.ResourceBundles resBundleDefault
          Deprecated.  
 
Method Summary
 Boolean checkSecurity(IExecCommand command, IResourceContext context)
          Deprecated. As of NetWeaver 7.1
 void classLoaderAdded(String id, ClassLoader newLoader)
          Deprecated. As of NetWeaver 7.1
 void classLoaderReplaced(String id, ClassLoader newLoader, ClassLoader oldLoader)
          Deprecated. As of NetWeaver 7.1
 ArrayList createTargetValues(IExecCommand command)
          Deprecated. As of NetWeaver 7.1
 ArrayList createTargetValues(IMassExecCommand command)
          Deprecated. As of NetWeaver 7.1
 IMassExecCommand decodeMassTarget(ArrayList values, IResourceContext context, IProxy proxy)
          Deprecated. As of NetWeaver 7.1
 IExecCommand decodeTarget(ArrayList values, IResourceContext context, IProxy proxy)
          Deprecated. As of NetWeaver 7.1
 IUIBaseCommand decodeTargetCommand(ArrayList values, IResourceContext context, IProxy proxy)
          Deprecated. As of NetWeaver 7.1
 IUIBaseCommand getCommandByAlias(String alias, IResourceContext context)
          Deprecated. As of NetWeaver 7.1
 String getFactoryName()
          Deprecated. As of NetWeaver 7.1
 IUIGroupCommand getGroupCommand(IResource resource, IParameterName group, IFlavor flavor, Hashtable table)
          Deprecated. As of NetWeaver 7.1
 IUIBaseCommand getGroupCommandByID(String groupID, IResourceContext context)
          Deprecated. As of NetWeaver 7.1
static UICommandFactory getInstance()
          Deprecated. As of NetWeaver 7.1
 long getLastReloadTime()
          Deprecated. As of NetWeaver 7.1
 List getMappings(Locale locale)
          Deprecated. As of NetWeaver 7.1
 List getPresentConfiguration(IResourceContext context)
          Deprecated. As of NetWeaver 7.1
 String getPresentConfiguration(IResourceContext context, String style, boolean showJavaClassNames)
          Deprecated. As of NetWeaver 7.1
 IPropertyNameList getRequiredProperties(String groupID)
          Deprecated. As of NetWeaver 7.1
 String getScreenflowAlias(String commandalias)
          Deprecated. As of NetWeaver 7.1
 IExecCommand getSingleCommandByAlias(String commandalias, IResource res)
          Deprecated. As of NetWeaver 7.1
 Status getStatus()
          Deprecated. As of NetWeaver 7.1
 com.sap.netweaver.km.monitor.data.MonitorData retrieveMonitorData()
          Deprecated. Method that returns a MonitorData object with object infos to be displayed in KM Monitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_BREAK

public static final String LINE_BREAK
Deprecated. 
constant used to separate debugging information


KEY_ALIAS

public static final String KEY_ALIAS
Deprecated. 
See Also:
Constant Field Values

KEY_CLASS

public static final String KEY_CLASS
Deprecated. 
See Also:
Constant Field Values

KEY_DESCRIPTION

public static final String KEY_DESCRIPTION
Deprecated. 
See Also:
Constant Field Values

KEY_ICON_PATH

public static final String KEY_ICON_PATH
Deprecated. 
See Also:
Constant Field Values

KEY_MASSCOMMAND

public static final String KEY_MASSCOMMAND
Deprecated. 
See Also:
Constant Field Values

KEY_ROLE_MAPPING

public static final String KEY_ROLE_MAPPING
Deprecated. 
See Also:
Constant Field Values

KEY_GROUP_COMMANDS_LIST

public static final String KEY_GROUP_COMMANDS_LIST
Deprecated. 
See Also:
Constant Field Values

KEY_LAYOUT_SET

public static final String KEY_LAYOUT_SET
Deprecated. 
See Also:
Constant Field Values

KEY_PROPERTIES

public static final String KEY_PROPERTIES
Deprecated. 
See Also:
Constant Field Values

KEY_PARAMETERS

public static final String KEY_PARAMETERS
Deprecated. 
See Also:
Constant Field Values

KEY_GROUP_LABEL

public static final String KEY_GROUP_LABEL
Deprecated. 
See Also:
Constant Field Values

KEY_GROUP_TOOPTIP

public static final String KEY_GROUP_TOOPTIP
Deprecated. 
See Also:
Constant Field Values

KEY_GROUP_BUNDLE_LABEL

public static final String KEY_GROUP_BUNDLE_LABEL
Deprecated. 
See Also:
Constant Field Values

KEY_GROUP_BUNDLE_TOOPTIP

public static final String KEY_GROUP_BUNDLE_TOOPTIP
Deprecated. 
See Also:
Constant Field Values

KEY_GROUP_BUNDLE_FILE

public static final String KEY_GROUP_BUNDLE_FILE
Deprecated. 
See Also:
Constant Field Values

KEY_EMB_TOOLTIP

public static final String KEY_EMB_TOOLTIP
Deprecated. 
See Also:
Constant Field Values

KEY_EMB_MASS_LABEL

public static final String KEY_EMB_MASS_LABEL
Deprecated. 
See Also:
Constant Field Values

KEY_EMB_MASS_TOOLTIP

public static final String KEY_EMB_MASS_TOOLTIP
Deprecated. 
See Also:
Constant Field Values

KEY_EMB_LABEL

public static final String KEY_EMB_LABEL
Deprecated. 
See Also:
Constant Field Values

KEY_INPUT_CONTROL_TEXT_1

public static final String KEY_INPUT_CONTROL_TEXT_1
Deprecated. 
See Also:
Constant Field Values

KEY_INPUT_CONTROL_TEXT_2

public static final String KEY_INPUT_CONTROL_TEXT_2
Deprecated. 
See Also:
Constant Field Values

resBundleDefault

public static com.sapportals.wcm.util.resource.ResourceBundles resBundleDefault
Deprecated. 
Method Detail

getInstance

public static UICommandFactory getInstance()
Deprecated. As of NetWeaver 7.1

Gets the instance attribute of the UICommandFactory class.

Returns:
the only available instance of this factory in the VM.

getScreenflowAlias

public String getScreenflowAlias(String commandalias)
Deprecated. As of NetWeaver 7.1

is a convinience method to allow the easier use of the InitialScreenflowProvider technology. If an IExecCommand implements the ISneakProvider interface, this factory will retrieve the ScreenflowInformation provided by that class.

Parameters:
commandalias - the command to retrieve screenflow information for, must not be null.
Returns:
the alias of the screenflow class provided by the command in question. This alias can be used as a URL-queryparameter value to invoke an initial screenflow. Might return null

getSingleCommandByAlias

public IExecCommand getSingleCommandByAlias(String commandalias,
                                            IResource res)
Deprecated. As of NetWeaver 7.1

Parameters:
commandalias - the alias of the command to retrieve, must not be null
res - the resource the command should use, must not be null
Returns:
a ready-to-use new instance of the command mapped to the given alias. If no mapping could be found, null will be returned.

getCommandByAlias

public IUIBaseCommand getCommandByAlias(String alias,
                                        IResourceContext context)
Deprecated. As of NetWeaver 7.1

returns a command that is mapped to the given alias. It first checks, if an IUIGroupCommand with this alias exists, then if an IExecCommand exists and finally, an IMassExecCommand. If nothing can be found, null is returned and an error is added to the log file, stating the alias searched for.

Parameters:
alias - the alias of the command requested
context - the context of the current request
Returns:
the command needed or null

createTargetValues

public ArrayList createTargetValues(IExecCommand command)
                             throws com.sapportals.wcm.WcmException
Deprecated. As of NetWeaver 7.1

returns the arraylist with all the information needed by the given IUICommand to do its work. The ArrayList is used by the WdfEventDispatcher to create the Component that will trigger the execution of the given command.

Parameters:
command - The command that has to rendered.
Returns:
ArrayList a new ArrayList, with following order position 0..n-1: The n-elements that are retrieved from the command through its getTargetParameters method position n: a UUID to make sure that the created html-link will have a unique ID position n+1: the alias of the IUICommand, so the factory can recreate an instance of this command when the decodeTarget method is called.
Throws:
com.sapportals.wcm.WcmException - Exception raised in failure situation

createTargetValues

public ArrayList createTargetValues(IMassExecCommand command)
                             throws com.sapportals.wcm.WcmException
Deprecated. As of NetWeaver 7.1

returns the arraylist with all the information needed by the given IUIMassCommand to do its work. The ArrayList is used by the WdfEventDispatcher to create the Component that will trigger the execution of the given command.

Parameters:
command - The command that has to rendered.
Returns:
ArrayList a new ArrayList, with following order position 0..n-1: The n-elements that are retrieved from the command through its getTargetParameters method position n: a UUID to make sure that the created html-link will have a unique ID position n+1: the alias of the IUIMassCommand, so the factory can recreate an instance of this command when the decodeTarget method is called.
Throws:
com.sapportals.wcm.WcmException - Exception raised in failure situation

decodeTargetCommand

public IUIBaseCommand decodeTargetCommand(ArrayList values,
                                          IResourceContext context,
                                          IProxy proxy)
                                   throws com.sapportals.wcm.WcmException
Deprecated. As of NetWeaver 7.1

returns a properly created instance of an IUICommand as it was encoded in the given array list by the factories createTarget. This command is ready to use, e.g. call its execute method. It can be used instead of the decodeTarget or decodeMassTarget methods, if it is unknown, which kind of class created the values list.

Parameters:
values - Description of the param
context - Description of the param
proxy - Description of the param
Returns:
Description of the Return Value
Throws:
com.sapportals.wcm.WcmException - Exception raised in failure situation

decodeTarget

public IExecCommand decodeTarget(ArrayList values,
                                 IResourceContext context,
                                 IProxy proxy)
                          throws com.sapportals.wcm.WcmException
Deprecated. As of NetWeaver 7.1

returns a properly created instance of an IUICommand as it was encoded in the given array list by the factories createTarget. This command is ready to use, e.g. call its execute method.

Parameters:
values - a list of String values, as it was created by the createTargetValues method of this class. Must not be null and must not contain classes that are not of type String .
context - the present context of the session. Must not be null .
proxy - the proxy that the returned command shall use. Must not be null
Returns:
a new instance of the IUICommand which was encoded in the values parameter
Throws:
com.sapportals.wcm.WcmException - Exception raised in failure situation

decodeMassTarget

public IMassExecCommand decodeMassTarget(ArrayList values,
                                         IResourceContext context,
                                         IProxy proxy)
                                  throws com.sapportals.wcm.WcmException
Deprecated. As of NetWeaver 7.1

returns a properly created instance of an IUIMassCommand as it was encoded in the given array list by the factories createTarget . This command is ready to use, e.g. call its execute method.

Parameters:
values - a list of String values, as it was created by the createTargetValues method of this class. Must not be null and must not contain classes that are not of type String .
context - the present context of the session. Must not be null .
proxy - the proxy that the returned command shall use. Must not be null
Returns:
a new instance of the IUIMassCommand which was encoded in the values parameter
Throws:
com.sapportals.wcm.WcmException - Exception raised in failure situation

getGroupCommand

public IUIGroupCommand getGroupCommand(IResource resource,
                                       IParameterName group,
                                       IFlavor flavor,
                                       Hashtable table)
                                throws com.sapportals.wcm.WcmException
Deprecated. As of NetWeaver 7.1

returns the configured group command for the given resource. The Factory uses the given parameters to determine the ID (alias) of the group command configured for the given resource. If no ID is configured or no instance of an IUIGroupCommand can be found in the factories instances-table, null is returned

Parameters:
resource - the resource the group command is needed for
flavor - the flavor to use when reading the configuration
group - the parameter to look for in the configuration
table - the parameters that hold configuration information
Returns:
a new group command for the given resource, ready to use, or null
Throws:
com.sapportals.wcm.WcmException - Exception raised in failure situation

getGroupCommandByID

public IUIBaseCommand getGroupCommandByID(String groupID,
                                          IResourceContext context)
Deprecated. As of NetWeaver 7.1

returns a new instance - ready to use - for the groupcommand that is mapped to the given parameter.

Parameters:
groupID - the groupID that is defined for the group command requested.
context - the current context of the session
Returns:
a new instance of a IUIGroupCommand or null , if no groupID was given or no group is defined for the given groupID

getPresentConfiguration

public String getPresentConfiguration(IResourceContext context,
                                      String style,
                                      boolean showJavaClassNames)
Deprecated. As of NetWeaver 7.1

returns a string representation of the structure of all defined groupcommands with their children.

Parameters:
context - the current context of the user, sets e.g. the language of the labels for the commands
style - currently not used
showJavaClassNames - flag to show (true) or hide (false) java class names in the returned string
Returns:
a String with line breaks and indentions to show the structure of all configured commands

getPresentConfiguration

public List getPresentConfiguration(IResourceContext context)
Deprecated. As of NetWeaver 7.1

returns a list of setting information of the groupcommands. GroupCommands are free to add information to this list. When using this list a type check should be done before casting to String to avoid ClassCastException s.

Parameters:
context - Description of the param
Returns:
a list containing information provided by the factory's groupcommands.

getMappings

public List getMappings(Locale locale)
Deprecated. As of NetWeaver 7.1

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()
Deprecated. As of NetWeaver 7.1

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

getFactoryName

public String getFactoryName()
Deprecated. As of NetWeaver 7.1

Specified by:
getFactoryName in interface IFactoryInfoProvider
Returns:
a human-readable name of the factory, must not be null

getRequiredProperties

public IPropertyNameList getRequiredProperties(String groupID)
Deprecated. As of NetWeaver 7.1


retrieveMonitorData

public com.sap.netweaver.km.monitor.data.MonitorData retrieveMonitorData()
Deprecated. 
Method that returns a MonitorData object with object infos to be displayed in KM Monitor

Specified by:
retrieveMonitorData in interface com.sap.netweaver.km.monitor.IMonitorInfoProvider

getLastReloadTime

public long getLastReloadTime()
Deprecated. As of NetWeaver 7.1

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.

checkSecurity

public Boolean checkSecurity(IExecCommand command,
                             IResourceContext context)
Deprecated. As of NetWeaver 7.1

Parameters:
command -
context -

classLoaderAdded

public void classLoaderAdded(String id,
                             ClassLoader newLoader)
Deprecated. As of NetWeaver 7.1

Description copied from interface: IClassLoaderRegistryListener
Notify a subscriber for newly added class loader

Specified by:
classLoaderAdded in interface IClassLoaderRegistryListener
Parameters:
id - the ID of the application being registered with CRT
newLoader - the class loader of the application

classLoaderReplaced

public void classLoaderReplaced(String id,
                                ClassLoader newLoader,
                                ClassLoader oldLoader)
Deprecated. As of NetWeaver 7.1

Description copied from interface: IClassLoaderRegistryListener
Notify a subscriber whenever a registered class loader is replaced.

Specified by:
classLoaderReplaced in interface IClassLoaderRegistryListener
Parameters:
id - the ID of the application being registered with CRT
newLoader - the new class loader
oldLoader - the old class loader
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM
[sap.com] KMC-CM [sap.com] tc/km/nonwduideprecated api EP-KM-CM


Copyright 2011 SAP AG Complete Copyright Notice