private void updateStackAfterCopyIteration(
      UUID jobId,
      String jobIdPrefix,
      ContainerResource exportContainerResource,
      int copyIteration,
      ContinuationData continuationData) {

    // NOTE: order is important below: we process next page before sub-resources, so we push them
    // on the stack in reverse order.

    if (null != continuationData) {
      // Start processing sub-resources
      if (continuationData.getContainerResources() != null
          && !continuationData.getContainerResources().isEmpty()) {
        List<ContainerResource> subResources = continuationData.getContainerResources();
        for (int i = subResources.size() - 1; i >= 0; i--) {
          monitor.debug(
              () ->
                  jobIdPrefix
                      + "Pushing to the stack a new copy iteration with a new container resource, copy iteration: "
                      + copyIteration);
          exportInfoStack.push((new ExportInformation(null, subResources.get(i))));
        }
      }

      // Push the next page of items onto the stack
      if (null != continuationData.getPaginationData()) {
        monitor.debug(
            () ->
                jobIdPrefix
                    + "Pushing to the stack a new copy iteration with pagination info, copy iteration: "
                    + copyIteration);
        exportInfoStack.push(
            new ExportInformation(continuationData.getPaginationData(), exportContainerResource));
      }
    }
    jobStore.storeJobStack(jobId, (Stack<ExportInformation>) exportInfoStack.clone());
  }
Transfers data from the given {@code exporter} optionally starting at the point specified in
the provided {@code exportInformation}. Imports the data using the provided {@code importer}.
If there is more data to required to be exported, recursively copies using the specific {@link
ExportInformation} to continue the process.

@param exportAuthData The auth data for the export
@param importAuthData The auth data for the import
@param exportInfo Any pagination or resource information to use for subsequent calls.
extensions/copier/portability-stack-copier/src/main/java/org/datatransferproject/copier/stack/PortabilityStackInMemoryDataCopier.java