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
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 void
calculateStaticFieldIndices
(com.sap.conn.jco.JCoFunctionTemplate ft) This method must be called from configure().void
void
Configure this component.protected int
findFieldIndex
(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 String
Listeners and IdocSenders don't use a functionNameprotected com.sap.conn.jco.JCoFunctionTemplate
com.sap.conn.jco.JCoFunctionTemplate
getFunctionTemplate
(SapSystemImpl sapSystem, String functionName) protected String
getSapSystem
(String systemName) void
message2FunctionCall
(com.sap.conn.jco.JCoFunction function, String request, String correlationId, ParameterValueList pvl) void
message2FunctionResult
(com.sap.conn.jco.JCoFunction function, String result) void
void
setCorrelationIdFieldIndex
(int i) Index of the field in the ImportParameterList of the RFC function that contains the correlationIdvoid
setCorrelationIdFieldName
(String string) Name of the field in the ImportParameterList of the RFC function that contains the correlationIdvoid
Name of the Ibis-objectprotected static void
setParameters
(com.sap.conn.jco.JCoParameterList inputOrOutputParameterList, com.sap.conn.jco.JCoParameterList tableParameterList, String message, int fieldIndex) void
setReplyFieldIndex
(int i) Index of the field in the ExportParameterList of the RFC function that contains the whole reply message contentsvoid
setReplyFieldName
(String string) Name of the field in the ExportParameterList of the RFC function that contains the whole reply message contentsvoid
setRequestFieldIndex
(int i) Index of the field in the ImportParameterList of the RFC function that contains the whole request message contentsvoid
setRequestFieldName
(String string) Name of the field in the ImportParameterList of the RFC function that contains the whole request message contentsvoid
setSapSystemName
(String string) Name of theSapSystem
used by this objectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.HasPhysicalDestination
getDomain
-
Field Details
-
log
protected static org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
SapFunctionFacade
public SapFunctionFacade()
-
-
Method Details
-
getLogPrefix
-
configure
Description copied from interface:IConfigurable
Configure 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:
configure
in interfaceIConfigurable
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
openFacade
- Throws:
SapException
-
closeFacade
public void closeFacade() -
getPhysicalDestinationName
- Specified by:
getPhysicalDestinationName
in 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 theSapSystem
used by this object- Specified by:
setSapSystemName
in interfaceISapFunctionFacade
-
setCorrelationIdFieldIndex
public void setCorrelationIdFieldIndex(int i) Index of the field in the ImportParameterList of the RFC function that contains the correlationId- Specified by:
setCorrelationIdFieldIndex
in interfaceISapFunctionFacade
- Default value
- 0
-
setCorrelationIdFieldName
Name of the field in the ImportParameterList of the RFC function that contains the correlationId- Specified by:
setCorrelationIdFieldName
in 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:
setRequestFieldIndex
in 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:
setRequestFieldName
in 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:
setReplyFieldIndex
in 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:
setReplyFieldName
in interfaceISapFunctionFacade
-
getFunctionName
Listeners and IdocSenders don't use a functionName
-