Package com.sapportals.wcm.rendering.uicommand

Contains interfaces to render and execute commands for one or more resources.

See:
          Description

Interface Summary
ICommand Deprecated. As of NetWeaver 7.1
IExecCommand Deprecated. As of NetWeaver 7.1
IMassCommand Deprecated. As of NetWeaver 7.1
IMassExecCommand Deprecated. As of NetWeaver 7.1
IResourceDeletionEvent Deprecated. As of NetWeaver 7.1
ISelector Deprecated. As of NetWeaver 7.1
ISimpleExecution Deprecated. As of NetWeaver 7.1
ISimpleMassExecution Deprecated. As of NetWeaver 7.1
ISneakProvider Deprecated. As of NetWeaver 7.1
IUICommand Deprecated. As of NetWeaver 7.1
IUIGroupCommand Deprecated. As of NetWeaver 7.1
IUIMassCommand Deprecated. As of EP 5.0 SP6 and EP 6.0 SP1, replaced by IMassCommand
IUIMenu Deprecated. As of NetWeaver 7.1
IUIMenuCommand Deprecated. As of NetWeaver 7.1
 

Class Summary
AbstractCommand Deprecated. As of NetWeaver 7.1
AbstractMassCommand Deprecated. As of NetWeaver 7.1
AbstractUICommand Deprecated. As of NetWeaver 7.1
AbstractUIGroupCommand Deprecated. As of NetWeaver 7.1
AbstractUIMassCommand Deprecated. As of EP 5.0 SP6 and EP 6.0 SP1, replaced by AbstractMassCommand
AbstractUIMenu Deprecated. As of NetWeaver 7.1
CommandCreator Deprecated. As of NetWeaver 7.1
CommandCreator.CommandContainer Deprecated. As of NetWeaver 7.1
LinkAttributes Deprecated. As of NetWeaver 7.1
PreviewMimeType Deprecated. As of NetWeaver 7.1
PropertyInformation Deprecated. As of NetWeaver 7.1
ScreenflowInformation Deprecated. As of NetWeaver 7.1
UIBaseCommandList Deprecated. As of NetWeaver 7.1
UIBaseCommandListIterator Deprecated. As of NetWeaver 7.1
UIButtonMenu Deprecated. As of NetWeaver 7.1
UICBaskets Deprecated. As of NetWeaver 7.1
UICConsts Deprecated. As of NetWeaver 7.1
UICommandFactory Deprecated. As of NetWeaver 7.1
UICommandRenderer Deprecated. As of NetWeaver 7.1
UIConfiguration Deprecated. As of NetWeaver 7.1
UIGroupCommand Deprecated. As of NetWeaver 7.1
UIHoverMenu Deprecated. As of NetWeaver 7.1
UIIconMenu Deprecated. As of NetWeaver 7.1
UILinkMenu Renders the link menu for the given IUICommandGroup
UIMenuBar Deprecated. As of NetWeaver 7.1
UIMenuCommand Deprecated. As of NetWeaver 7.1
UIMenuFactory Deprecated. As of NetWeaver 7.1
UINoMenu Renders no menu for the given IUICommandGroup
UISmallButtonMenu Deprecated. As of NetWeaver 7.1
UITabMenu Deprecated. As of NetWeaver 7.1
UIToolbarButtonMenu Deprecated. As of NetWeaver 7.1
UIVerticalLinkMenu Deprecated. As of NetWeaver 7.1
 

Exception Summary
 

Package com.sapportals.wcm.rendering.uicommand Description

Contains interfaces to render and execute commands for one or more resources.

Package Specification

Purpose
Detailed Concept
Interfaces and Classes
Configuration
Implementation Notes

Purpose

The uicommand package is one of several packages in the KM framework that enable flexible rendering and screenflows for explorer controls. The task of ICommands objects is to render commands for resources, collections or lists of these items. They can start a screenflow to carry out an action, execute an action, open a browser window or simply provide status information for the user. Instances of ICommand and IMassCommand are provided by the UICommandFactory . An IUIGroupCommand allows the grouping of instances of IUIGroupCommand, ICommand and IMassCommand. This enables the creation of hierarchical command structures on the user interface.

Detailed Concept

ICommands can be used by controls, ICollectionRenderer orIResourceRenderer instances to render a link or button that is used to perform operations on a resource or a list of resources. Before rendering takes place, the calling class can ask the command, if it is executable and applicable for the current resource. However, this naturally does not guarantee the successful execution of the command at a later time. As the selection of an IUIGroupCommand is dynamic and not defined at compilation time, it enables the rendering of a more flexible user interface. For example, an interface that is suitable for administrative purposes can be rendered to include more commands than a interface that is suitable for browsing purposes. Commands are customizable, for example, their label or screenflow can be configured.

Interfaces and Classes

The ICommand includes everything that is required for an action to be carried out on a resource. It stores texts for labels, tooltips and messages. It also checks whether the execution is possible (at rendering time) and carries out the execution (at "click" time). If a screenflow is needed for the action, the command creates the screenflow and triggers it. As it operates on an htmlb-wdf-driven user interface, it must be able to encode all needed information for its execution in an htmlb-Event.

The IMassCommand is very similar to the ICommand . The only difference is, that it does not know which resources it will operate on at the time of rendering. Therefore, it cannot check whether execution is possible. At "click" time, the surrounding framework provides the list of selected resources for the mass command. The command then iterates through this list, executing the required action for each of the resources. If execution fails for one resource, other resources are not influenced . No transaction-like behavior is implemented.

The UICommandFactory is a singleton factory that holds instances of all commands. It is the single entry point for all classes within the flexible UI that need to obtain instances of commands or group commands. The factory also maps an htmlb event to a command and instantiates a command for a given htmlb event. When a command is rendered, it adds all information it needs for execution to a list. The factory adds further information like the command's alias and unique identifier to the list. The list is then attached to the event. At "click" time, the factory is called. It creates an instance of the uicommand from the information added to the event and returns the list with information to the command. It is important to note, that the instance of the command that creates the list of values and the instance of the command that receives the list of values (and executes the action) are not the same.

The IUIGroupCommand allows the grouping of commands and other IUIGroupCommands. This enables the creation of hiearchical structures of commands. Normally such structures are set in the configuration. However, other implementations of IUIGroupCommand can dynamically generate a command structure at runtime. For example, the statemanagement service uses such an implementation. It checks the resource and current users permissions before generating the appropriate list of commands, for example approve, reject and skip approval.

The classes UIMenuFactory, UICommandRenderer as well as UIButtonMenu, UILinkMenu, UIHoverMenu and UISmallButtonMenu offer more convenient use of the command classes.

Configuration

Configuration is possible for IUIGroupCommands, ICommands and IMassCommands. The configuration can be accessed in the Configuration Framework under Content Management->UserInterface->Commands-> in three different sections : UICommands, UICommands With Selection and UI GroupCommands.

For UICommand, the following attributes are available:

Property Required Description
javaclass Yes Class that implements the ICommand or IMassCommand interface
description No Short description of the commands functions
alias Yes Unique name to identify the command to use. Within the configuration, only the alias is used, never the original java name of the class.
masscommand Yes If this box is checked, the factory tries to load the class as a IMassCommand. 
Bundle File Name No The resource bundle to use to retrieve label and tooltip for the command
Bundle Key For Label No The key to retrieve the label text from the resource bundle
Bundle Key For Tooltip No The key to retrieve the tooltip text from the resource bundle

For UICommand With Selection, the following attributes are available:

Property Required Description
javaclass Yes Class that implements the ICommand or IMassCommand interface
description No Short description of the commands functionality
alias Yes Unique name to identify the command to use. Within the configuration, only the alias is used, never the original Java name of the class.
masscommand Yes If the box is checked, the factory tries to load the class as a IMassCommand. 
Bundle File Name No The resource bundle to use to retrieve label and tooltip for this command
Bundle Key For Label No The key to retrieve the label text from the resource bundle
Bundle Key For Tooltip No The key to retrieve the tooltip text from the resource bundle
LayoutSet Yes The layout set that must be used on the first screen of the command's screenflow
Label for Command on Selection Screen No The label for the command that will lead to the completion of the commands screenflow and implementation
Label for Mass Command on Selection Screen No The label for the masscommand that will lead to the completion of the commands screenflow and implementation
Tooltip for Command on Selection Screen No The tooltip for the command that will lead to the completion of the commands screenflow and implementation
Tooltip for Mass Command on Selection Screen No The tooltip for the masscommand that will lead to the completion of the commands screenflow and implementation
Label for First Input Field No The label for the first input field on the selection screen, if there is one
Label for Second Input Field No The Label for the second input field on the selection screen if there is one

For UI Command Groups, the following attributes are available:

Property Required Description
UI Command Class Yes Class that implements the IUIGroupCommandinterface
description No Short description of the commands functionality
alias Yes Unique name to identify the command to use. Within the configuration, only the alias is used, never the classes original JAVA-name.
commandlist Yes A comma-separated list of aliases of other groups and commands. 
Bundle File Name No The resource bundle to use to retrieve label and tooltip for this command
Bundle Key For Label No The key to retrieve the label text from the resource bundle
Bundle Key For Tooltip No The key to retrieve the tooltip text from the resource bundle

Implementation Notes

The ICommand object and UICommandFactory work in close coordination with other elements of the KM framework related to rendering. When, for example, a particular folder or resource are rendered with commands, the process is as follows:

An AbstractProxyControl instance is informed, via an event, that a folder must be rendered. In response, the proxy requests an ILayoutController object from the LayoutControllerFactory. It then calls the layout controllers's render method. This can use several controls to render the folder. These controls use the ICollectionRendererFactory to retrieve ICollectionRenderer instances.  The ICollectionRendererinstances use IResourceRenderers that are provided by the ResourceRendererFactory to further delegate rendering. They also use ICommands, provided by the UICommandFactory, to delegate the creation of commands for the displayed resources. The UICommandFactory uses the parameter settings of the renderer classes to retrieve the correct group command to render. The included ICommands check whether the commands are executable and whether they should be rendered or deactivated.



Copyright 2014 SAP AG Complete Copyright Notice