Uploaded image for project: 'JAPI'
  1. JAPI
  2. JAPI-117

Dropzone - getting physical files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0.0
    • Component/s: None
    • Labels:

      Description

      In the current implementation there exists two different DropZone objects each one contains different parameters.  These should really be rolled up into a single object.

      Intially I had tried to use dropzone.getFiles() function is just stubbed out and returns an empty list.

      Currently to get the physical files from a dropzone you have to use code as follows.  Since the Dropzone from the fetchLocalDropZones() function doesn't have OS you have to get it by calling platform.getDropZone("mydropzone").getValue()).getOS()

      Platform platform = connection.getPlatform();
      HPCCWsClient connector = platform.getWsClient();
      HPCCFileSprayClient fileSprayClient = connector.getFileSprayClient();

      DropZone[] targetDropZones = fileSprayClient.fetchLocalDropZones();
      DropZone targetDropZone = null;
      for(DropZone dz: targetDropZones) {
      if (dz.getName().equals("mydropzone"))

      { targetDropZone = dz; }

      }

      PhysicalFileStruct[] files = fileSprayClient.listFiles(targetDropZone.getNetAddress(),
      targetDropZone.getPath(),
      platform.getDropZone("mydropzone").getValue()).getOS());

       

        Attachments

          Activity

            People

            Assignee:
            rpastrana Rodrigo Pastrana
            Reporter:
            joe.chambers Joseph Chambers
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: