com.sapportals.wcm.service.xmlforms

Interface IXFTransformation


public interface IXFTransformation

Copyright 2004 SAP AG


Field Summary
static String TRANSFORMATION_TYPE_DISPLAY
          Constant for retrieving the default display transformation with the IXFProject.getDefaultTransformation() method
static String TRANSFORMATION_TYPE_EDIT
          Constant for retrieving the default edit transformation with the IXFProject.getDefaultTransformation() method
static String TRANSFORMATION_TYPE_ITEMLIST
          Constant for retrieving the default item list transformation with the IXFProject.getDefaultTransformation() method
 
Method Summary
 boolean generatesFragment()
          Checks if this transformation generates a HTML fragment
 String getDisplayConfiguration()
          Configuration that should be used render an item with this resource in a new browser window
 String getDisplayName(Locale clientlocale)
          Gets a localized descritive name of the transformation
 String getEncoding()
          Gets the character encoding of the generated output
 String getID()
          Gets the projectwide unique identifier of the transformation
 Date getLastModified()
          Gets the modification time of the transformation
 String getMimeType()
          Gets the mime type of the generated output
 String getTransformationProperty(String key)
          Gets a transformation property
 InputStream render(IResource item, Hashtable parameters)
          Apply transformation on an XML item to generate HTML
 InputStream render(ISaveResult result, IResourceContext context, Hashtable parameters)
          Apply transformation on result, if the saveItem() method of IXFProject failed to validate or post the data.
 InputStream render(String resid, IResourceContext context, Hashtable parameters)
          Apply transformation on an XML item to generate HTML
 InputStream renderItemOrTemplate(String resid, String dstPath, IResourceContext context, Hashtable parameters)
          Apply transformation on an XML item.
 InputStream renderTemplate(String dstPath, IResourceContext context, Hashtable parameters)
          Apply transformation on XML template item to generate HTML
 InputStream renderWithPreview(IResource previewItem, String dstPath, Hashtable parameters)
          Apply transformation on a temporary (author preview) XML item to generate HTML
 InputStream renderWithPreview(String previewItem, IResourceContext context, String dstPath, Hashtable parameters)
          Apply transformation on a temporary (author preview) XML item to generate HTML
 

Field Detail

TRANSFORMATION_TYPE_EDIT

public static final String TRANSFORMATION_TYPE_EDIT
Constant for retrieving the default edit transformation with the IXFProject.getDefaultTransformation() method

See Also:
Constant Field Values

TRANSFORMATION_TYPE_DISPLAY

public static final String TRANSFORMATION_TYPE_DISPLAY
Constant for retrieving the default display transformation with the IXFProject.getDefaultTransformation() method

See Also:
Constant Field Values

TRANSFORMATION_TYPE_ITEMLIST

public static final String TRANSFORMATION_TYPE_ITEMLIST
Constant for retrieving the default item list transformation with the IXFProject.getDefaultTransformation() method

See Also:
Constant Field Values
Method Detail

getID

public String getID()
Gets the projectwide unique identifier of the transformation

Returns:
the transformation ID

getDisplayName

public String getDisplayName(Locale clientlocale)
Gets a localized descritive name of the transformation

Parameters:
clientlocale - the Locale to use for localisation
Returns:
a localized transformation name, if it is available. If no localized name is available, null is returned.

getDisplayConfiguration

public String getDisplayConfiguration()
Configuration that should be used render an item with this resource in a new browser window

Returns:
a String, that can be passed to a JavaScript window.open() call as third parameter

generatesFragment

public boolean generatesFragment()
Checks if this transformation generates a HTML fragment

Returns:
true if this transformation generates a HTML fragment only, false if it generates a whole page

render

public InputStream render(IResource item,
                          Hashtable parameters)
                   throws XFException
Apply transformation on an XML item to generate HTML

Parameters:
item - the XML item to transform
parameters - external parameters for the transformation
Returns:
an InputStream containing HTML data
Throws:
XFException - if an error occurred during the render process

render

public InputStream render(String resid,
                          IResourceContext context,
                          Hashtable parameters)
                   throws XFException
Apply transformation on an XML item to generate HTML

Parameters:
resid - the ID of the XML item to transform
context - the context to use
parameters - external parameters for the transformation
Returns:
an InputStream containing HTML data
Throws:
XFException - if an error occurred during the render process

render

public InputStream render(ISaveResult result,
                          IResourceContext context,
                          Hashtable parameters)
                   throws XFException
Apply transformation on result, if the saveItem() method of IXFProject failed to validate or post the data. The result contains additional error information, which can be used to highlight incorrect data.

Parameters:
result - the ISaveResult instance, which was returned by saveItem()
context - the context to use
parameters - external parameters for the transformation
Returns:
an InputStream containing HTML data, or null if result was the result of a successfull operation
Throws:
XFException - if an error occurred during the render process

renderTemplate

public InputStream renderTemplate(String dstPath,
                                  IResourceContext context,
                                  Hashtable parameters)
                           throws XFException
Apply transformation on XML template item to generate HTML

Parameters:
dstPath - the path where a new item will be created
context - the context of the user, who wants to create a new item. It is necessary for default values. That context is not used to read the template XML.
parameters - external parameters for the transformation
Returns:
an InputStream containing HTML data
Throws:
XFException - if an error occurred during the transformation process

renderItemOrTemplate

public InputStream renderItemOrTemplate(String resid,
                                        String dstPath,
                                        IResourceContext context,
                                        Hashtable parameters)
                                 throws XFException
Apply transformation on an XML item. If the item does not exist, render the template by calling renderTemplate().

Parameters:
resid - the ID of the XML item to render
dstPath - if the item specified with resid does not exist, a new item will be created in the path specified by dstPath
context - the context to use
parameters - external parameters for the transformation
Returns:
an InputStream containing HTML data
Throws:
XFException - XFException if an error occurred during the transformation process

renderWithPreview

public InputStream renderWithPreview(IResource previewItem,
                                     String dstPath,
                                     Hashtable parameters)
                              throws XFException
Apply transformation on a temporary (author preview) XML item to generate HTML

Parameters:
previewItem - the temporary item containing XML data
dstPath - full path of the item to create, if save button is pressed
parameters - external parameters for the transformation
Returns:
an InputStream containing HTML data
Throws:
XFException - if an error occurred during the transformation process

renderWithPreview

public InputStream renderWithPreview(String previewItem,
                                     IResourceContext context,
                                     String dstPath,
                                     Hashtable parameters)
                              throws XFException
Apply transformation on a temporary (author preview) XML item to generate HTML

Parameters:
previewItem - the RID of the temporary item containing XML data
context - the context to use
dstPath - full path of the item to create, if save button is pressed
parameters - external parameters for the transformation
Returns:
an InputStream containing HTML data
Throws:
XFException - if an error occurred during the transformation process

getTransformationProperty

public String getTransformationProperty(String key)
Gets a transformation property

Parameters:
key - the property key
Returns:
the property value

getMimeType

public String getMimeType()
Gets the mime type of the generated output

Returns:
the mime type

getEncoding

public String getEncoding()
Gets the character encoding of the generated output

Returns:
the character encoding

getLastModified

public Date getLastModified()
Gets the modification time of the transformation

Returns:
the modification time of the XSL item


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.