SAP NetWeaver '04

com.sapportals.wcm.rendering.base
Interface IProxy

[contained in: com.sap.km.cm.ui.flex.par - km.shared.ui.flex.base_api.jar]
All Superinterfaces:
IAmalgamationProvider
All Known Implementing Classes:
AbstractProxyControl

public interface IProxy
extends IAmalgamationProvider

Base interface to use the flexible UI. It wraps functionality of the underlying screenflow technology (e.g. the Wdf-Htmlb) to offer a consistent and centralized interface. It acts as a Facade-pattern for this screenflow technology. The proxy groups several functionalities: - caching mechanisms (addControlStatus, getControlStatus, deleteControlStatus) - debugging information (addEntryToDebugList, isDebugEnabled) - eventing (register, getEventValues, decodeValues, getUserInput, createUniqueComponentID) - screenflow (getDynamicPage, getDynamicPane, getTargetControl, getCommand) - resource-handling (getResource, getResourceContext, getUri, getHabitat, isPreviewEnabled When several implementations of this interface are running at the same time with one instance A holding another instance B, this inner instance B should return A in its getTargetControl method to ensure caching consistency and event-handling.

Since:
EP5 SP6 and EP6 SP1

Field Summary
static java.lang.String DISPATCH_EVENT
           
static java.lang.String HTMLB_PREFIX
          constant that can be used to filter out parameters in the URL that are only needed for htmlb.
static java.lang.String ON_DELEGATED_CLICK
           
static java.lang.String ON_EXECUTE
          constant to use as a target for the creation of Events through the WdfEventDispatcher for IUICommand
static java.lang.String ON_MASS_EXECUTE
          constant to use as a target for the creation of Events through the WdfEventDispatcher for IUIMassCommand
static java.lang.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
static RID ROOT_RID
           
 
Method Summary
 void addControlStatus(java.lang.String key, IControlStatus status)
          acts as a wrapper around the ControlStatusService.
 java.lang.String createDispatchableID(java.lang.String handler, java.util.ArrayList values)
          creates an id that contains dispatch information.
 java.lang.String createDispatchableID(java.lang.String handler, java.lang.String value)
          creates an id that contains dispatch information.
 java.lang.String createNavigationTarget(ICollection p0)
          creates the needed information for a Link or Button to offer navigation to the given ICollection.
 java.lang.String createUniqueComponentId(java.lang.String idpart)
          adds a string to the given parameter to ensure a unique id within a DynPage under certain conditions:
the idpart given is unique within this proxy.
 java.util.List decodeValues(com.sapportals.htmlb.event.Event p0)
          Returns the values created via the createDispatchableID methods and returns the list of parameters in the same order they were when submitting them.
 void deleteControlStatus(java.lang.String key)
          deletes the instance of the IControlStatus that was created with the given key.
 IUIBaseCommand getCommand()
           
 IControlStatus getControlStatus(java.lang.String key)
          returns the IControlStatus that has been added to the proxy using its addControlStatus method.
 com.sapportals.htmlb.page.DynPage getDynamicPage()
          returns the DynPage the proxy is created in
 java.lang.String getDynamicPane()
          returns the name of the PaneElement that holds the PaneElement that can be replaced with a dynamic screenflow.
 com.sapportals.wcm.control.base.Habitat getHabitat()
          returns the current position of the user within the navigation of the underlying RepositoryFramework.
 java.util.Hashtable getParameters()
           
 IResource getResource()
          returns the present resource of the proxy or null.
 IResourceContext getResourceContext()
          returns the context of the implementing class
 ISearchSession getSearchSession()
          returns the search session attribute of the proxy.
 java.lang.String getStartUri()
          returns the starturi of the control or null.
 IProxy getTargetControl()
          returns the event handler control.
 java.lang.String getUri()
          returns the uri of the control.
 java.lang.String getUserInput(java.lang.String key)
          returns the input from the http-request that was specified in a field with the given field
 boolean isPreviewEnabled()
          returns a flag, if the layout configured inside this instance supports the viewing of documents within the same browser-window or not.
 java.lang.String register(IDelegatedReceiver p0)
          registers the given receiver with the implementing class of this interface.
 
Methods inherited from interface com.sapportals.wcm.rendering.base.IAmalgamationProvider
getAmalgamation
 

Field Detail

ON_EXECUTE

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

ON_MASS_EXECUTE

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

ON_NAVIGATE

public static final java.lang.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

ON_DELEGATED_CLICK

public static final java.lang.String ON_DELEGATED_CLICK

HTMLB_PREFIX

public static final java.lang.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

DISPATCH_EVENT

public static final java.lang.String DISPATCH_EVENT

ROOT_RID

public static final RID ROOT_RID
Method Detail

getDynamicPane

public java.lang.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, might be null

createNavigationTarget

public java.lang.String createNavigationTarget(ICollection p0)
                                        throws WcmException
creates the needed information for a Link or Button to offer navigation to the given ICollection. Depending on the used screenflow-engine, the String might be different for the same collection. The String must contain the encoded URI of the collection to navigate to and should contain the start-Path to this collection, also encoded. The start-path is the furthest ancestor of the collection that should be visible. Note, that if navigating to a collection by links, the linked URI of the collection and not its standard URI should be used. So instead of ICollection.getRID() use ICollection.getAccessRID
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 IDCounter.currentID().
Parameters:
collection - the folder to navigate to
Returns:
the information needed to create a navigation link to the given folder
Throws:
WcmException - if an exception occurs in the repository framework or the WDF. The exception can contain a wrapped WdfException

getTargetControl

public IProxy getTargetControl()
returns the event handler control. If the implementing class does not want to act as the proxy itself, it must specify another IProxy that assumes responsibility. If it wants to act on its own, it must return a handle to itself here:
return this
If a proxy has another proxy around itself, it should always reference that proxy here to ensure event-handling and caching.
Returns:
an IProxy that is used e.g. as target for the event-handling

getParameters

public java.util.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. Implmenting classes might choose to add parameters to this table. It is recommended to add a parameter with key ICustomizingContollerSettings.MODE_508 and the value "true", if the implementing class can recognize, if 508-compliant rendering is needed

getCommand

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

getUri

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

getStartUri

public java.lang.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. The interface's getHabitat returns the same combination of getUri and getStartUri only as RID representation

isPreviewEnabled

public boolean isPreviewEnabled()
returns a flag, if the layout configured inside this instance supports the viewing of documents within the same browser-window or not.
Returns:
true if documents can be previewed within the same browser-window

getResource

public IResource getResource()
returns the present resource of the proxy or null.

getUserInput

public java.lang.String getUserInput(java.lang.String key)
returns the input from the http-request that was specified in a field with the given field
Parameters:
key - - the key that was used as ID when creating the field in the http-response
Returns:
 
Since:
EP6, SP1

addControlStatus

public void addControlStatus(java.lang.String key,
                             IControlStatus status)
acts as a wrapper around the ControlStatusService. The class that calls this method must be able to reproduce the key at a later time to retrieve the status provided here. The implementation must map the keys returned by the ControlStatusService to the key provided here. The method will raise a NullPointerException if any of the parameters is null
Parameters:
key - - the key the calling class will use to retrieve the given status through the proxy's getControlStatus method. Must not be null
status - - the status the calling class wants to store. Must not be null

getControlStatus

public IControlStatus getControlStatus(java.lang.String key)
returns the IControlStatus that has been added to the proxy using its addControlStatus method. The calling class must be aware of the fact, that this method might return null, even if the status has been created with this key before. This can have several reasons. First of all, the ControlStatusService might have removed the status due to a too long idle time or a too high server load. Also, certain events within the interaction (e.g. the navigation to another resource) can trigger the deletion of all status' registered with that proxy.
Parameters:
key - the key of the status to retrieve, must not be null
Returns:
 

deleteControlStatus

public void deleteControlStatus(java.lang.String key)
deletes the instance of the IControlStatus that was created with the given key. If no instance for this key can be found, the implementing class should log this fact.
Parameters:
key - the id of the status to delete as it was specified by the calling class in the addControlStatus method of this interface

register

public java.lang.String register(IDelegatedReceiver p0)
registers the given receiver with the implementing class of this interface. If this method is called several times during the same http-request by the same class, it will always return the same String instance. After a server-roundtrip, the IProxy will recreate all receivers from the previous trip and therefore all of these receivers will register with the same IDs again. This ensures, that a receiver will be identified when an Event is received by the proxy
Parameters:
p0 -  
Returns:
 

getSearchSession

public ISearchSession getSearchSession()
returns the search session attribute of the proxy. As the proxy-implementation itself might not offer any persistency mechanisms, classes that are interested in this search session might have to take care of persistency for this attribute themselves.
Returns:
the search session attribute or null

createDispatchableID

public java.lang.String createDispatchableID(java.lang.String handler,
                                             java.util.ArrayList values)
                                      throws WcmException
creates an id that contains dispatch information. When an Event is raised with this id, the event will be send to the implementing class, using the information of the given parameters.
Parameters:
handler - The method that will be called when the event with this id is fired.
values - The objects of this list will be encoded using their toString() method and will be available in the handler method when the event is received
Returns:
String The dispatchableControlID, usable as ID for a Component.
Throws:
WcmException - Exception raised in failure situation
<{WcmException}> -  

createDispatchableID

public java.lang.String createDispatchableID(java.lang.String handler,
                                             java.lang.String value)
                                      throws WcmException
creates an id that contains dispatch information. When an Event is raised with this id, the event will be send to the implementing class, using the information of the given parameters.
Parameters:
handler - The method that will be called when the event with this id is fired.
value - The value will be available in the handler method when the event is received. This value will not be encoded
Returns:
String The dispatchableControlID, usable as ID for a Component.
Throws:
WcmException - Exception raised in failure situation
<{WcmException}> -  

decodeValues

public java.util.List decodeValues(com.sapportals.htmlb.event.Event p0)
Returns the values created via the createDispatchableID methods and returns the list of parameters in the same order they were when submitting them. There will be no en- or decoding done to take care of special characters. If the createDispatchableID(String, String) method is used, a List with only one entry will be returned.
Parameters:
event - The event that contains the encoded values.
Returns:
String (cardinality = 1)

getDynamicPage

public com.sapportals.htmlb.page.DynPage getDynamicPage()
returns the DynPage the proxy is created in
Returns:
the DynPage the proxy is created in

getHabitat

public com.sapportals.wcm.control.base.Habitat getHabitat()
returns the current position of the user within the navigation of the underlying RepositoryFramework. The habitat will include the RID of the current IResource as well as a second RID that marks the lowest ancestor of that resource that should be visible within the navigation views for the user. This ancestor is comparable to a mount-point. If no ancestor is specified for the given view, the implementing class must return the current IResource's RID as ancestor.
Returns:
the habitat describing the current position of the user within the navigation.

createUniqueComponentId

public java.lang.String createUniqueComponentId(java.lang.String idpart)
adds a string to the given parameter to ensure a unique id within a DynPage under certain conditions:
the idpart given is unique within this proxy. This means, that no two elements that are rendered by any classes that are again rendered within this proxy must call this method with the same parameter. If several proxies are rendered within one DynPage, the page itself must ensure that the proxies are configured to create different strings to add to the given parameters. So, if Class A, rendered within proxy B calls this method, submitting String S1, the resulting String Unique1 must be different from the String Unique2, that is created when Class A, rendered within proxy C calls this method, submitting String S1
Parameters:
idpart, - must not be null.
Returns:
 

getResourceContext

public IResourceContext getResourceContext()
returns the context of the implementing class
Returns:
the context of the implementing class, might be null

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
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.