Class SapFunctionFacade
java.lang.Object
org.frankframework.extensions.sap.jco3.SapFunctionFacade
- All Implemented Interfaces:
FrankElement,HasApplicationContext,HasName,HasPhysicalDestination,IConfigurable,IScopeProvider,NameAware,ISapFunctionFacade,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
SapListenerImpl,SapSenderBase
@DestinationType(SAP)
public abstract class SapFunctionFacade
extends Object
implements ISapFunctionFacade, FrankElement, NameAware
Wrapper round SAP-functions, either SAP calling Ibis, or Ibis calling SAP.
N.B. If no requestFieldIndex or requestFieldName is specified, input is converted from/to xml;
If no replyFieldIndex or replyFieldName is specified, output is converted from/to xml.
- Since:
- 5.0
- Author:
- Gerrit van Brakel, Jaco de Groot
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcalculateStaticFieldIndices(com.sap.conn.jco.JCoFunctionTemplate ft) This method must be called from configure().voidvoidConfigure this component.protected intfindFieldIndex(com.sap.conn.jco.JCoParameterList params, int index, String name) Calculate the index of the field that corresponds with the message as a whole.functionCall2message(com.sap.conn.jco.JCoFunction function) functionResult2message(com.sap.conn.jco.JCoFunction function) getCorrelationIdFromField(com.sap.conn.jco.JCoFunction function) protected abstract StringListeners and IdocSenders don't use a functionNameprotected com.sap.conn.jco.JCoFunctionTemplatecom.sap.conn.jco.JCoFunctionTemplategetFunctionTemplate(SapSystemImpl sapSystem, String functionName) protected StringgetSapSystem(String systemName) voidmessage2FunctionCall(com.sap.conn.jco.JCoFunction function, String request, String correlationId, ParameterValueList pvl) voidmessage2FunctionResult(com.sap.conn.jco.JCoFunction function, String result) voidvoidsetCorrelationIdFieldIndex(int i) Index of the field in the ImportParameterList of the RFC function that contains the correlationIdvoidsetCorrelationIdFieldName(String string) Name of the field in the ImportParameterList of the RFC function that contains the correlationIdvoidName of the Ibis-objectprotected static voidsetParameters(com.sap.conn.jco.JCoParameterList inputOrOutputParameterList, com.sap.conn.jco.JCoParameterList tableParameterList, String message, int fieldIndex) voidsetReplyFieldIndex(int i) Index of the field in the ExportParameterList of the RFC function that contains the whole reply message contentsvoidsetReplyFieldName(String string) Name of the field in the ExportParameterList of the RFC function that contains the whole reply message contentsvoidsetRequestFieldIndex(int i) Index of the field in the ImportParameterList of the RFC function that contains the whole request message contentsvoidsetRequestFieldName(String string) Name of the field in the ImportParameterList of the RFC function that contains the whole request message contentsvoidsetSapSystemName(String string) Name of theSapSystemused by this objectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
-
Field Details
-
log
protected static org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
SapFunctionFacade
public SapFunctionFacade()
-
-
Method Details
-
getLogPrefix
-
configure
Description copied from interface:IConfigurableConfigure this component.configure()is called once at startup of the framework in the configure method of the owner of thisIConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure(), to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configurein interfaceIConfigurable- Throws:
ConfigurationException- in case it was not able to configure the component.
-
openFacade
- Throws:
SapException
-
closeFacade
public void closeFacade() -
getPhysicalDestinationName
- Specified by:
getPhysicalDestinationNamein interfaceHasPhysicalDestination
-
setParameters
protected static void setParameters(com.sap.conn.jco.JCoParameterList inputOrOutputParameterList, com.sap.conn.jco.JCoParameterList tableParameterList, String message, int fieldIndex) throws SapException - Throws:
SapException
-
calculateStaticFieldIndices
protected void calculateStaticFieldIndices(com.sap.conn.jco.JCoFunctionTemplate ft) This method must be called from configure().- Parameters:
ft-
-
findFieldIndex
Calculate the index of the field that corresponds with the message as a whole. return values >0 : the required index 0 : no index found, convert all fields to/from xml. -
getCorrelationIdFromField
-
functionCall2message
-
functionResult2message
-
message2FunctionCall
public void message2FunctionCall(com.sap.conn.jco.JCoFunction function, String request, String correlationId, ParameterValueList pvl) throws SapException - Throws:
SapException
-
message2FunctionResult
public void message2FunctionResult(com.sap.conn.jco.JCoFunction function, String result) throws SapException - Throws:
SapException
-
getSapSystem
- Throws:
SapException
-
getSapSystem
- Throws:
SapException
-
getFunctionTemplate
- Throws:
SapException
-
getFunctionTemplate
public com.sap.conn.jco.JCoFunctionTemplate getFunctionTemplate(SapSystemImpl sapSystem, String functionName) throws SapException - Throws:
SapException
-
setName
Name of the Ibis-object -
setSapSystemName
Name of theSapSystemused by this object- Specified by:
setSapSystemNamein interfaceISapFunctionFacade
-
setCorrelationIdFieldIndex
public void setCorrelationIdFieldIndex(int i) Index of the field in the ImportParameterList of the RFC function that contains the correlationId- Specified by:
setCorrelationIdFieldIndexin interfaceISapFunctionFacade- Default value
- 0
-
setCorrelationIdFieldName
Name of the field in the ImportParameterList of the RFC function that contains the correlationId- Specified by:
setCorrelationIdFieldNamein interfaceISapFunctionFacade
-
setRequestFieldIndex
public void setRequestFieldIndex(int i) Index of the field in the ImportParameterList of the RFC function that contains the whole request message contents- Specified by:
setRequestFieldIndexin interfaceISapFunctionFacade- Default value
- 0
-
setRequestFieldName
Name of the field in the ImportParameterList of the RFC function that contains the whole request message contents- Specified by:
setRequestFieldNamein interfaceISapFunctionFacade
-
setReplyFieldIndex
public void setReplyFieldIndex(int i) Index of the field in the ExportParameterList of the RFC function that contains the whole reply message contents- Specified by:
setReplyFieldIndexin interfaceISapFunctionFacade- Default value
- 0
-
setReplyFieldName
Name of the field in the ExportParameterList of the RFC function that contains the whole reply message contents- Specified by:
setReplyFieldNamein interfaceISapFunctionFacade
-
getFunctionName
Listeners and IdocSenders don't use a functionName
-