package com.google.enterprise.connector.sp2cloud;

import com.google.enterprise.connector.sp2c_migration.Document;
import com.google.enterprise.connector.sp2c_migration.Folder;

import java.io.InputStream;
import java.util.List;

public class MockCloudPusher implements CloudPusher {

  @Override
  public void pushDocument(Folder parent, Document document,  List<CloudAce> cloudAcl, 
      InputStream inputStream) throws Exception {
    System.out.println("Document - name: '" + document.getName() + "'  id: " + document.getId() + "  parent id: " + document.getParentId() + "  owner: " + document.getOwner());
  }

  @Override
  public void pushFolder(Folder parent, Folder folder, List<CloudAce> cloudAcl) throws Exception {
    System.out.println("Folder - name: '" + folder.getName() + "'  id: " + folder.getId() + "  parent id: " + folder.getParentId() + "  owner: " + folder.getOwner());
  }

}

@@ -155,25 +155,37 @@
 sp2c
-_migration
+loud.FolderManager
 .Folder
+Info
 ;%0A%0Ai
@@ -214,31 +214,8 @@
 eam;
-%0Aimport java.util.List;
 %0A%0Apu
@@ -266,17 +266,16 @@
 usher %7B%0A
-%0A
   @Overr
@@ -305,31 +305,16 @@
 ocument(
-Folder parent, 
 Document
@@ -324,31 +324,24 @@
 cument, 
- List%3C
 CloudAc
-e%3E
+l
  cloudAc
@@ -347,15 +347,8 @@
 cl, 
-%0A      
 Inpu
@@ -367,16 +367,22 @@
 tStream)
+%0A     
  throws 
@@ -449,32 +449,40 @@
 cument.getName()
+%0A       
  + %22'  id: %22 + d
@@ -488,32 +488,40 @@
 document.getId()
+%0A       
  + %22  parent id:
@@ -539,32 +539,40 @@
 nt.getParentId()
+%0A       
  + %22  owner: %22 +
@@ -568,32 +568,32 @@
  owner: %22 + 
-document
+cloudAcl
 .getOwner())
@@ -646,75 +646,145 @@
 lder
- parent, Folder folder, List%3CCloudAce%3E cloudAcl) throws Exception %7B
+Info folderInfo) throws Exception %7B%0A    String parentId = folderInfo.getParent() == null ?%0A        null : folderInfo.getParent().getId();
 %0A   
@@ -826,24 +826,28 @@
  '%22 + folder
+Info
 .getName() +
@@ -844,16 +844,24 @@
 etName()
+%0A       
  + %22'  i
@@ -873,24 +873,28 @@
 + folder
+Info
 .getId()
  + %22  pa
@@ -881,24 +881,32 @@
 Info.getId()
+%0A       
  + %22  parent
@@ -918,28 +918,24 @@
 %22 + 
-folder.getParentId()
+parentId%0A       
  + %22
@@ -953,16 +953,34 @@
 + folder
+Info.getCloudAcl()
 .getOwne
@@ -989,11 +989,10 @@
 ));%0A  %7D%0A
-%0A
 %7D%0A

Update MockCloudPusher to conform to new CloudPusher api