com.sap.portal.admin.editor

Interface IDataHandler

All Known Implementing Classes:
PCMDataHandler

public interface IDataHandler

IDataHandler API for load and save the data That this editor is dealing.


Method Summary
 void loadData(IEditorContext ctx, IPrincipal principal, PPLogger logger)
          The data should be loaded and stored in the editor context Using the API: public void setProperty(String key,Object value); Tip: The keys of the stored data can be the same keys as the UI components value path.
 void saveData(IEditorContext ctx, IPrincipal principal, PPLogger logger)
          Save the edited data of this editor
 

Method Detail

loadData

public void loadData(IEditorContext ctx,
                     IPrincipal principal,
                     PPLogger logger)
              throws EditorDataException,
                     EditorResourceException
The data should be loaded and stored in the editor context Using the API: public void setProperty(String key,Object value);

Tip: The keys of the stored data can be the same keys as the UI components value path. That will cause the UI to be initialized without any special treatment!
For Example: If there is input field with target value path: "pane1.input1", Then the loaded data should be- setProperty("pane1.input1",data), and when the editor will be loaded, The input field will have the data inside it.

Parameters:
ctx - current editor context (must be used for save the loaded data)
principal - The security principal that load the data
logger - Logger to send log messages
Throws:
EditorDataException - data could not be loaded or no permissions- The editor framework presents an end user message,read only mode will be set, but the editor UI will be presented.
EditorResourceException - an error occured regarding the resource that this editor deals with. This exception is a showstopper for the editor- The editor framework will present the given end user message instead of the regular editor UI.

saveData

public void saveData(IEditorContext ctx,
                     IPrincipal principal,
                     PPLogger logger)
              throws EditorDataException,
                     EditorResourceException
Save the edited data of this editor

Parameters:
ctx - Current editor context
principal - The security principal that save the data
logger - Logger to send log messages (can be used for any locking considerations during save)
Throws:
EditorDataException - data could not be saved or no permissions- The editor framework presents an end user message, but the editor UI will be presented.
EditorResourceException - an error occured regarding the resource that this editor deals with. This exception is a showstopper for the editor- The editor framework will present the given end user message instead of the regular editor UI.


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.