Class JCoRecFunctionDecorator

java.lang.Object
de.hybris.platform.sap.core.jco.rec.impl.JCoRecFunctionDecorator
All Implemented Interfaces:
com.sap.conn.jco.JCoFunction, Serializable, Cloneable

public class JCoRecFunctionDecorator extends Object implements com.sap.conn.jco.JCoFunction, Cloneable
Design of this class follows the decorator pattern although it is not exactly the class hierarchy mentioned in http://en.wikipedia.org/wiki/Decorator_pattern.
Execution of the actual backend calls is delegated to decoratedFunction, the execution against the XML repository is implemented here.
See Also:
  • Constructor Details

    • JCoRecFunctionDecorator

      public JCoRecFunctionDecorator(com.sap.conn.jco.JCoFunction function, int counter, JCoRecMode mode)
      Constructor.
      Parameters:
      function - this function will be delegated/wrapped.
      counter - the execution counter of the wrapped function.
      mode - the current mode of the JCoRecorder.
  • Method Details

    • getDecoratedFunction

      public com.sap.conn.jco.JCoFunction getDecoratedFunction()
      Getter for the delegated function.
      Returns:
      Returns the delegated function.
    • setDecoratedFunction

      protected void setDecoratedFunction(com.sap.conn.jco.JCoFunction function)
      Setter for the delegated function.
      Parameters:
      function - the new value for the delegated function.
    • execute

      public void execute(com.sap.conn.jco.JCoDestination destination) throws com.sap.conn.jco.JCoException
      Specified by:
      execute in interface com.sap.conn.jco.JCoFunction
      Throws:
      com.sap.conn.jco.JCoException
    • execute

      public void execute(com.sap.conn.jco.JCoDestination destination, String tid) throws com.sap.conn.jco.JCoException
      Unsupported method.
      Specified by:
      execute in interface com.sap.conn.jco.JCoFunction
      Parameters:
      destination - Unsupported method.
      tid - Unsupported method.
      Throws:
      com.sap.conn.jco.JCoException - Unsupported method.
      See Also:
      • JCoFunction.execute(com.sap.conn.jco.JCoDestination, java.lang.String)
    • execute

      public void execute(com.sap.conn.jco.JCoDestination destination, String tid, String queueName) throws com.sap.conn.jco.JCoException
      Unsupported method.
      Specified by:
      execute in interface com.sap.conn.jco.JCoFunction
      Parameters:
      destination - Unsupported method.
      tid - Unsupported method.
      queueName - Unsupported method.
      Throws:
      com.sap.conn.jco.JCoException - Unsupported method.
      See Also:
      • JCoFunction.execute(com.sap.conn.jco.JCoDestination, java.lang.String, java.lang.String)
    • getImportParameterList

      public com.sap.conn.jco.JCoParameterList getImportParameterList()
      Specified by:
      getImportParameterList in interface com.sap.conn.jco.JCoFunction
    • getExportParameterList

      public com.sap.conn.jco.JCoParameterList getExportParameterList()
      Specified by:
      getExportParameterList in interface com.sap.conn.jco.JCoFunction
    • getChangingParameterList

      public com.sap.conn.jco.JCoParameterList getChangingParameterList()
      Specified by:
      getChangingParameterList in interface com.sap.conn.jco.JCoFunction
    • getTableParameterList

      public com.sap.conn.jco.JCoParameterList getTableParameterList()
      Specified by:
      getTableParameterList in interface com.sap.conn.jco.JCoFunction
    • getException

      public com.sap.conn.jco.AbapException getException(String arg0)
      Specified by:
      getException in interface com.sap.conn.jco.JCoFunction
    • getExceptionList

      public com.sap.conn.jco.AbapException[] getExceptionList()
      Specified by:
      getExceptionList in interface com.sap.conn.jco.JCoFunction
    • getFunctionTemplate

      public com.sap.conn.jco.JCoFunctionTemplate getFunctionTemplate()
      Specified by:
      getFunctionTemplate in interface com.sap.conn.jco.JCoFunction
    • toXML

      public String toXML()
      Specified by:
      toXML in interface com.sap.conn.jco.JCoFunction
    • getFunctionKey

      public String getFunctionKey()
      Generates the function key for this instance.
      Returns:
      Returns the result from RecorderUtils.getFunctionKey(String, int) with the name of the decorated function and the local counter as parameter.
    • getName

      public String getName()
      Specified by:
      getName in interface com.sap.conn.jco.JCoFunction
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isAbapClassExceptionEnabled

      public boolean isAbapClassExceptionEnabled()
      Specified by:
      isAbapClassExceptionEnabled in interface com.sap.conn.jco.JCoFunction
    • setAbapClassExceptionMode

      public void setAbapClassExceptionMode(com.sap.conn.jco.AbapClassException.Mode arg0)
      Specified by:
      setAbapClassExceptionMode in interface com.sap.conn.jco.JCoFunction
    • clone

      public JCoRecFunctionDecorator clone()
      Specified by:
      clone in interface com.sap.conn.jco.JCoFunction
      Overrides:
      clone in class Object