com.sap.aii.af.sample.module
Class ConvertCRLFfromToLF0
java.lang.Object
com.sap.aii.af.sample.module.ConvertCRLFfromToLF0
- All Implemented Interfaces:
- com.sap.aii.af.lib.mp.module.Module
public class ConvertCRLFfromToLF0
- extends Object
- implements com.sap.aii.af.lib.mp.module.Module
ConvertCRLFfromToLF represents a XI Adapter Framework (AF) compliant
module that can be called by the XI AF Module Processor (MP). The XI AF MP concept
allows to implement customer exits as well as extensions for arbitrary adapters.
A conceptual description can be found in the XI AF API documentation, see
the NetWeaver Online help.
In general a AF module is a pojo module.
This particualr module can be simply used with module name
com.sap.aii.adapter.sample.module.ConvertCRLFfromToLF0
and module type java class.
| Fields inherited from interface com.sap.aii.af.lib.mp.module.Module |
MODULE_TYPE_CLASS, MODULE_TYPE_LOCALBEAN, MODULE_TYPE_REMOTEBEAN |
|
Method Summary |
com.sap.aii.af.lib.mp.module.ModuleData |
process(com.sap.aii.af.lib.mp.module.ModuleContext moduleContext,
com.sap.aii.af.lib.mp.module.ModuleData inputModuleData)
The main method of AF modules is the process() method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConvertCRLFfromToLF0
public ConvertCRLFfromToLF0()
process
public com.sap.aii.af.lib.mp.module.ModuleData process(com.sap.aii.af.lib.mp.module.ModuleContext moduleContext,
com.sap.aii.af.lib.mp.module.ModuleData inputModuleData)
throws com.sap.aii.af.lib.mp.module.ModuleException
- The main method of AF modules is the
process() method. It takes the XI message, changes it
according to some module specific rules and forwards it in the module chain. If this module is the last
module in the chain before the adapter is being called it must ensure that in case of synchronous messages
a response message is sent back in the return ModuleDate parameter.
This sample here converts carriage return line feeds (CRLF) to line feeds (LF) and vice versa for all
text or XML attachments of the XI message.
- Specified by:
process in interface com.sap.aii.af.lib.mp.module.Module
- Parameters:
moduleContext - Contains data of the module processor that might be important for the module implementation
such as current channel IDinputModuleData - Contains the input XI message as principal data plus eventual set supplemental data
- Returns:
- ModuleData Contains the (changed) output XI message. Might be the response message if the module
is the last in the chain.
- Throws:
com.sap.aii.af.lib.mp.module.ModuleException - Describes the cause of the exception and indicates whether an retry is sensible or not.
Copyright © 2012. All Rights Reserved.