Class DefaultSLDRegSenderService

java.lang.Object
de.hybris.datasupplier.services.impl.DefaultSLDRegSenderService
All Implemented Interfaces:
DSSenderService

public class DefaultSLDRegSenderService extends Object implements DSSenderService
An implementation of the DSSenderService which uses sldReg(part of SAP Agent Host) to deliver data to the SLD. It requires the some properties to be configured in the system: Command which runs sldreg datasupplier.sldreg.exe.cmd=C:/Program Files/SAP/hostctrl/exe/sldreg.exe On linux it may be following datasupplier.reg.exe.cmd=/usr/sap/hostctrl/exe/sldreg Path to the sldreg configuration file. sldreg doesn't cope with white spaces in the path. So please make sure that the path to config file doesn't contain such. datasupplier.sldreg.config.path=C:/sldreg/sldtest.cfg On linux it may be following datasupplier.reg.config.path=/usr/sap/hostctrl/exe/sldtest.cfg Message returned by sldreg when the payload delivery has succeed datasupplier.sldreg.msg.success=Data send status: true
  • Field Details

    • SLD_REG_EXE_PATH

      public static final String SLD_REG_EXE_PATH
      The Constant SLD_REG_EXE_PATH.
      See Also:
    • SLD_REG_CONFIG_PATH

      public static final String SLD_REG_CONFIG_PATH
      The Constant SLD_REG_CONFIG_PATH.
      See Also:
    • SLD_SEND_SUCCESSFUL_MSG

      public static final String SLD_SEND_SUCCESSFUL_MSG
      The Constant SLD_SEND_SUCCESSFUL_MSG.
      See Also:
  • Constructor Details

    • DefaultSLDRegSenderService

      public DefaultSLDRegSenderService()
  • Method Details

    • send

      public boolean send(String payload) throws DSSenderException
      Description copied from interface: DSSenderService
      Sends payload to the SLD system
      Specified by:
      send in interface DSSenderService
      Parameters:
      payload - is send to SLD
      Returns:
      the status of send process
      Throws:
      DSSenderException - is SLD command parameter hansn't been find
    • removePayloadFile

      protected void removePayloadFile(String path)
      Removes the payload file.
      Parameters:
      path - the path
    • createTempFileWithPayload

      protected String createTempFileWithPayload(String payload) throws DSSenderException
      Creates the temp file with payload.
      Parameters:
      payload - the payload
      Returns:
      the string
      Throws:
      DSSenderException - the DS sender exception
    • getAndCheckThePath

      protected String getAndCheckThePath(String paramKey) throws DSSenderException
      Gets the and check the path.
      Parameters:
      paramKey - the param key
      Returns:
      the and check the path
      Throws:
      DSSenderException - the DS sender exception