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 Details

    • log

      protected static org.apache.logging.log4j.Logger log
  • Constructor Details

    • SapFunctionFacade

      public SapFunctionFacade()
  • Method Details

    • getLogPrefix

      protected String getLogPrefix()
    • configure

      public void configure() throws ConfigurationException
      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 this IConfigurable. 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 the configure(), to improve performance.

      In the case of a container, this will propagate the configure signal to all components that apply.

      Specified by:
      configure in interface IConfigurable
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • openFacade

      public void openFacade() throws SapException
      Throws:
      SapException
    • closeFacade

      public void closeFacade()
    • getPhysicalDestinationName

      public String getPhysicalDestinationName()
      Specified by:
      getPhysicalDestinationName in interface HasPhysicalDestination
    • 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

      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. return values >0 : the required index 0 : no index found, convert all fields to/from xml.
    • getCorrelationIdFromField

      public String getCorrelationIdFromField(com.sap.conn.jco.JCoFunction function)
    • functionCall2message

      public Message functionCall2message(com.sap.conn.jco.JCoFunction function)
    • functionResult2message

      public Message functionResult2message(com.sap.conn.jco.JCoFunction function)
    • 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

      public SapSystemImpl getSapSystem() throws SapException
      Throws:
      SapException
    • getSapSystem

      public SapSystemImpl getSapSystem(String systemName) throws SapException
      Throws:
      SapException
    • getFunctionTemplate

      protected com.sap.conn.jco.JCoFunctionTemplate getFunctionTemplate() throws SapException
      Throws:
      SapException
    • getFunctionTemplate

      public com.sap.conn.jco.JCoFunctionTemplate getFunctionTemplate(SapSystemImpl sapSystem, String functionName) throws SapException
      Throws:
      SapException
    • setName

      public void setName(String string)
      Name of the Ibis-object
      Specified by:
      setName in interface NameAware
    • setSapSystemName

      public void setSapSystemName(String string)
      Name of the SapSystem used by this object
      Specified by:
      setSapSystemName in interface ISapFunctionFacade
    • 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 interface ISapFunctionFacade
      Default value
      0
    • setCorrelationIdFieldName

      public void setCorrelationIdFieldName(String string)
      Name of the field in the ImportParameterList of the RFC function that contains the correlationId
      Specified by:
      setCorrelationIdFieldName in interface ISapFunctionFacade
    • 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 interface ISapFunctionFacade
      Default value
      0
    • setRequestFieldName

      public void setRequestFieldName(String string)
      Name of the field in the ImportParameterList of the RFC function that contains the whole request message contents
      Specified by:
      setRequestFieldName in interface ISapFunctionFacade
    • 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 interface ISapFunctionFacade
      Default value
      0
    • setReplyFieldName

      public void setReplyFieldName(String string)
      Name of the field in the ExportParameterList of the RFC function that contains the whole reply message contents
      Specified by:
      setReplyFieldName in interface ISapFunctionFacade
    • getFunctionName

      protected abstract String getFunctionName()
      Listeners and IdocSenders don't use a functionName