com.sapportals.wcm.rendering.base

Class AbstractProxyControl

java.lang.Object
  extended bycom.sapportals.wcm.rendering.base.AbstractProxyControl

public abstract class AbstractProxyControl
extends Object

implements the IProxy and extends the WcmBaseControl. It acts as the base class for all classes that work as interface between the WD-framework and the rendering classes underneath.

Since:
EP5 SP6 and EP6 SP1

Field Summary
static String DISPATCH_EVENT
           
static String HTMLB_PREFIX
          constant that can be used to filter out parameters in the URL that are only needed for htmlb.
protected  boolean isFirstCall
           
static String ON_DELEGATED_CLICK
           
static String ON_EXECUTE
          constant to use as a target for the creation of Events through the WdfEventDispatcher for IUICommand
static String ON_MASS_EXECUTE
          constant to use as a target for the creation of Events through the WdfEventDispatcher for IUIMassCommand
static String ON_NAVIGATE
          constant to use as a target for the creation of Events through the WdfEventDispatcher when a navigation via resource-URLs is wanted
protected  HashMap renderKeys
           
protected  ISearchSession searchsession
           
 
Method Summary
 void addControlStatus(String id, IControlStatus status)
           
protected  boolean checkEvent(WdfEvent event)
          returns true, if the event to clean status has been fired
 String createDispatchableID(String handler, ArrayList values)
           
 String createDispatchableID(String handler, String value)
           
abstract  String createNavigationTarget(ICollection collection)
          creates the needed information for a Link or Button to offer navigation to the given ICollection.
 List decodeValues(Event event)
           
protected  void deleteAllControlStatus(boolean partial)
           
 void deleteControlStatus(String id)
           
 ResourcePropertyAmalgamation getAmalgamation()
           
abstract  IUIBaseCommand getCommand()
           
 IControlStatus getControlStatus(String id)
           
 String getCssCacheID()
           
 DynPage getDynamicPage()
           
abstract  String getDynamicPane()
          returns the name of the PaneElement that holds the PaneElement that can be replaced with a dynamic screenflow.
 ArrayList getEventValues(Event event)
           
 String[] getInputFromEntryControls()
          iterates through all controls that implement the IInputFieldControlinterface and asks for their input.
abstract  Hashtable getParameters()
           
abstract  PaneElement getPresentDynamicPane()
          returns the PaneElement that holds the current control.
 IResource getResource()
          returns the present resource of the control or null.
protected  RID getRID()
           
 ISearchSession getSearchSession()
           
abstract  String getStartUri()
          returns the starturi of the control or null.
abstract  IProxy getTargetControl()
          returns the event handler control.
abstract  String getUri()
          returns the uri of the control.
 String getUserInput(String key)
           
protected  void initialize()
           
 boolean isPreviewEnabled()
          returns a flag, if the present screen offers functionality to view resources in this screen.
 WdfEvent onDelegatedClick(Event event)
           
abstract  WdfEvent onExecute(Event event)
          This method is called by the WDF when a Link or a Button with this target has been clicked and the ON_EXECUTE constant has been used as target for link or button creation.
abstract  WdfEvent onMassExecute(Event event)
          This method is called by the WDF when a Link or a Button with this target has been clicked and the ON_MASS_EXECUTE constant has been used as target for link or button creation.
protected  void refreshAllControlStatus()
           
 String register(IDelegatedReceiver receiver)
           
 void setCssCacheID(String id)
           
protected  void setRID(RID rid)
           
abstract  void setUri(String string)
          sets the uri of the control.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

renderKeys

protected HashMap renderKeys

searchsession

protected ISearchSession searchsession

isFirstCall

protected boolean isFirstCall

ON_EXECUTE

public static final String ON_EXECUTE
constant to use as a target for the creation of Events through the WdfEventDispatcher for IUICommand

See Also:
Constant Field Values

ON_MASS_EXECUTE

public static final String ON_MASS_EXECUTE
constant to use as a target for the creation of Events through the WdfEventDispatcher for IUIMassCommand

See Also:
Constant Field Values

ON_NAVIGATE

public static final String ON_NAVIGATE
constant to use as a target for the creation of Events through the WdfEventDispatcher when a navigation via resource-URLs is wanted

See Also:
Constant Field Values

ON_DELEGATED_CLICK

public static final String ON_DELEGATED_CLICK
See Also:
Constant Field Values

HTMLB_PREFIX

public static final String HTMLB_PREFIX
constant that can be used to filter out parameters in the URL that are only needed for htmlb. This can lead to performance gains, as the HashMap with the URL-Parameters that can be used by all classes holds less entries

See Also:
Constant Field Values

DISPATCH_EVENT

public static final String DISPATCH_EVENT
Method Detail

onExecute

public abstract WdfEvent onExecute(Event event)
                            throws WdfException
This method is called by the WDF when a Link or a Button with this target has been clicked and the ON_EXECUTE constant has been used as target for link or button creation. All IExecCommand created by the UICommandFactory are also pointing to this method when clicked. The inner structure of the values encoded in the Event can only be decoded by the UICommandFactory The IExecCommand can change the static screenflow, defined in the xml-files of the WDF. If they do, this change is carried out within this method. The returned event triggers the screenflow.

Parameters:
event - encapsulates all information needed to carry out the functionality of the link or button that raised it.
Returns:
a WdfEvent that is propagated to all WdfEventReceivers and that might trigger a screenflow. Can return null.
Throws:
a - WdfException that can encapsulate other exceptions.
WdfException

onMassExecute

public abstract WdfEvent onMassExecute(Event event)
                                throws WdfException
This method is called by the WDF when a Link or a Button with this target has been clicked and the ON_MASS_EXECUTE constant has been used as target for link or button creation. All IMassExecCommand created by the UICommandFactory are also pointing to this method when clicked. The inner structure of the values encoded in the Event can only be decoded by the UICommandFactory The IMassExecCommand can change the static screenflow, defined in the xml-files of the WDF. If they do, this change is carried out within this method. The returned event triggers the screenflow.

Parameters:
event - encapsulates all information needed to carry out the functionality of the link or button that raised it.
Returns:
a WdfEvent that is propagated to all WdfEventReceivers and that might trigger a screenflow. Can return null.
Throws:
a - WdfException that can encapsulate other exceptions.
WdfException

getDynamicPane

public abstract String getDynamicPane()
returns the name of the PaneElement that holds the PaneElement that can be replaced with a dynamic screenflow.

Returns:
the name of the outer pane of the dynamic screenflow setup

getPresentDynamicPane

public abstract PaneElement getPresentDynamicPane()
                                           throws WdfException
returns the PaneElement that holds the current control.

Returns:
the current pane
Throws:
WdfException. - This can happen, if the static WDF-file is badly configured, e.g. if the Pane, whose name is returned in the controls getDynamicPane holds no or more than one pane.
WdfException

createNavigationTarget

public abstract String createNavigationTarget(ICollection collection)
                                       throws WcmException
creates the needed information for a Link or Button to offer navigation to the given ICollection. It uses the WdfEventDispatcher. The parameters in this string have to be in the following order:
URL of the resource to navigate to (mandatory) Start-Path to use (not mandatory)
As several Components in an iView may specify the same navigation target, it is necessary to ensure unique IDs for each of these components. One way to do this is to add some unique string at a later position in the parameter list, such as new UUID().toString().

Parameters:
collection - the folder to navigate to
Returns:
the information needed to create a navigation link to the given folder
Throws:
WdfException - if an exception occurs in the repository framework or the WDF
WcmException

getTargetControl

public abstract IProxy getTargetControl()
returns the event handler control. If the proxy does not want to handle events itself, it can specify another control with this method that handles the events. If it wants to handle the events itself, it must return a handle to itself here:
return this

Returns:
a control that is used by the WdfEventDispatcher when creating a Link or Button. Must not return null

getParameters

public abstract Hashtable getParameters()
                                 throws WcmException
Returns:
Hashtable contains all parameters from the http-request, without the entries that are htmlb-related. The iView-parameters, for example, are included in the table. As some classes may modify these parameters, the implementing class has to ensure, that it does not return its own instance of these parameters, but rather returns a deep-clone of its own hashtable. When the hashtable only holds keys and values of type String, the hashtable's own clone method will suffice.
Throws:
WcmException

getCommand

public abstract IUIBaseCommand getCommand()
                                   throws WcmException
Returns:
a stored command whose execution extends over more than one screen. Another IUIBaseCommand can ask the AbstractProxyControl for this command and use it.
Throws:
WcmException

getUri

public abstract String getUri()
returns the uri of the control. Can be null


setUri

public abstract void setUri(String string)
sets the uri of the control. Can be null


getStartUri

public abstract String getStartUri()
returns the starturi of the control or null. The start-uri states the furthermost ancestor of the uri that is available for browsing.


isPreviewEnabled

public boolean isPreviewEnabled()
returns a flag, if the present screen offers functionality to view resources in this screen.

Returns:
true, if the screen offers functionality to view resources in place. Depending on the resource's mimetype, the preview might not be possible, even if the preview is available. The implementation available in this abstract class always returns false.

getResource

public IResource getResource()
returns the present resource of the control or null. The implementation available in this abstract class always returns null.


initialize

protected void initialize()
                   throws WdfException
Throws:
WdfException

getInputFromEntryControls

public String[] getInputFromEntryControls()
                                   throws WcmException
iterates through all controls that implement the IInputFieldControlinterface and asks for their input. The controls must be registered at the WD-Framework by the implementing class.

Returns:
The inputFromEntryControls value or null The implementation available in this abstract class always returns null.
Throws:
WdfException - Exception raised in failure situation
WcmException

addControlStatus

public void addControlStatus(String id,
                             IControlStatus status)

getControlStatus

public IControlStatus getControlStatus(String id)

deleteControlStatus

public void deleteControlStatus(String id)

deleteAllControlStatus

protected void deleteAllControlStatus(boolean partial)
Parameters:
partial - flag telling if all IControlStatus instances should be deleted (this is for value false), or if only instances should be deleted which do not implement the IRefreshSurvivor interface (this is for value true).

checkEvent

protected boolean checkEvent(WdfEvent event)
returns true, if the event to clean status has been fired


refreshAllControlStatus

protected void refreshAllControlStatus()

setCssCacheID

public void setCssCacheID(String id)

getCssCacheID

public String getCssCacheID()

register

public String register(IDelegatedReceiver receiver)

getEventValues

public ArrayList getEventValues(Event event)
                         throws WcmException
Throws:
WcmException

onDelegatedClick

public WdfEvent onDelegatedClick(Event event)
                          throws WdfException
Throws:
WdfException

getSearchSession

public ISearchSession getSearchSession()

createDispatchableID

public String createDispatchableID(String handler,
                                   ArrayList values)
                            throws WcmException
Throws:
WcmException

createDispatchableID

public String createDispatchableID(String handler,
                                   String value)
                            throws WcmException
Throws:
WcmException

decodeValues

public List decodeValues(Event event)

getDynamicPage

public DynPage getDynamicPage()

getAmalgamation

public ResourcePropertyAmalgamation getAmalgamation()

getUserInput

public String getUserInput(String key)

getRID

protected final RID getRID()

setRID

protected final void setRID(RID rid)


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.