Camel
  1. Camel
  2. CAMEL-6137

Send siteCommand(s) without uploading files

    Details

    • Type: New Feature New Feature
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.10.4
    • Fix Version/s: Future
    • Component/s: camel-ftp
    • Labels:
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Moderate

      Description

      Currently, Camel sends FTP SITE commands only after log-in and before uploading a file.

      In general, SITE commands can be virtually anything: We now got a use case where we need to communicate with an FTP server in terms of SITE commands, most of the time without the need to upload anything. I.e., send a SITE command, capture the reply and hand it back to the application.

      In camel-ftp, this could be done with a new property which tells the component to not upload a file and get the server response, e.g. in the body or as a header attribute. This is only needed for the producer side.

      We'd like to provide the code for this.

        Issue Links

          Activity

          Hide
          Carsten Erker added a comment -

          Why is this ticket marked as resolved?

          I am sorry about this, I thought I read somewhere that the issue should be set to "fixed" after providing a patch; this was the only way to do so. After taking another look on Camel's contributing page: It doesn't actually say so. Just reopened the issue.

          Show
          Carsten Erker added a comment - Why is this ticket marked as resolved? I am sorry about this, I thought I read somewhere that the issue should be set to "fixed" after providing a patch; this was the only way to do so. After taking another look on Camel's contributing page: It doesn't actually say so. Just reopened the issue.
          Hide
          Claus Ibsen added a comment -

          Why is this ticket marked as resolved? I don't think we have added any of the patches to the code base.

          Show
          Claus Ibsen added a comment - Why is this ticket marked as resolved? I don't think we have added any of the patches to the code base.
          Hide
          Carsten Erker added a comment - - edited

          Just sent a pull request on Github: https://github.com/apache/camel/pull/16

          Changes:

          Part 1

          • Added a new option "upload" to the producer which works according to option "download" in the FTP consumer: If false, no file will be uploaded, no temporary file will be created, no done file will be created, but the Exchange.FILE_NAME_PRODUCED header will be set. Defaults to true.
          • Since I wanted the "upload" option to work similar as the "download" option, I added an isUploadFile() method to the GenericFileProducer in camel-core. This is the only change in camel-core.

          Part 2

          • Added a new option "siteCommandCapture" to the RemoteFileConfiguration: if true, the output of the site commands will be returned in the exchange's body as a List<String> with the output of each executed site command as a list element in order of execution. If false, the body remains untouched. Defaults to false.

          The default behaviour remains as before.

          Show
          Carsten Erker added a comment - - edited Just sent a pull request on Github: https://github.com/apache/camel/pull/16 Changes: Part 1 Added a new option "upload" to the producer which works according to option "download" in the FTP consumer: If false, no file will be uploaded, no temporary file will be created, no done file will be created, but the Exchange.FILE_NAME_PRODUCED header will be set. Defaults to true. Since I wanted the "upload" option to work similar as the "download" option, I added an isUploadFile() method to the GenericFileProducer in camel-core. This is the only change in camel-core. Part 2 Added a new option "siteCommandCapture" to the RemoteFileConfiguration: if true, the output of the site commands will be returned in the exchange's body as a List<String> with the output of each executed site command as a list element in order of execution. If false, the body remains untouched. Defaults to false. The default behaviour remains as before.
          Hide
          Claus Ibsen added a comment -

          Patches is welcome

          Show
          Claus Ibsen added a comment - Patches is welcome

            People

            • Assignee:
              Unassigned
              Reporter:
              Carsten Erker
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development