SAP NetWeaver '04

com.sapportals.wcm.service.xmlforms
Interface IXFTransformation

[contained in: com.sap.km.cm.service.base.par - km.shared.service.xmlforms_api.jar]
public interface IXFTransformation

Copyright 2004 SAP AG


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

Field Detail

TRANSFORMATION_TYPE_EDIT

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

TRANSFORMATION_TYPE_DISPLAY

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

TRANSFORMATION_TYPE_ITEMLIST

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

getID

public java.lang.String getID()
Gets the projectwide unique identifier of the transformation
Returns:
the transformation ID

getDisplayName

public java.lang.String getDisplayName(java.util.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 java.lang.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 java.io.InputStream render(IResource item,
                                  java.util.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 java.io.InputStream render(java.lang.String resid,
                                  IResourceContext context,
                                  java.util.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 java.io.InputStream render(ISaveResult result,
                                  IResourceContext context,
                                  java.util.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 java.io.InputStream renderTemplate(java.lang.String dstPath,
                                          IResourceContext context,
                                          java.util.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 java.io.InputStream renderItemOrTemplate(java.lang.String resid,
                                                java.lang.String dstPath,
                                                IResourceContext context,
                                                java.util.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 java.io.InputStream renderWithPreview(IResource previewItem,
                                             java.lang.String dstPath,
                                             java.util.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 java.io.InputStream renderWithPreview(java.lang.String previewItem,
                                             IResourceContext context,
                                             java.lang.String dstPath,
                                             java.util.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 java.lang.String getTransformationProperty(java.lang.String key)
Gets a transformation property
Parameters:
key - the property key
Returns:
the property value

getMimeType

public java.lang.String getMimeType()
Gets the mime type of the generated output
Returns:
the mime type

getEncoding

public java.lang.String getEncoding()
Gets the character encoding of the generated output
Returns:
the character encoding

getLastModified

public java.util.Date getLastModified()
Gets the modification time of the transformation
Returns:
the modification time of the XSL item

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.