Examples of PullSynchronizer


Examples of org.atomojo.app.sync.PullSynchronizer

                  app.setRoot(dbDir.toURI());

                  SyncTarget target = new SyncTarget(db,"");
                  SyncProcess proc = new SyncProcess(db,"restore",true,target,app,null);

                  PullSynchronizer restore = new PullSynchronizer(getLogger(),getApplication().getMetadataService(),user,db,storage,proc);
                  restore.setAdditive(false);
                  try {
                     restore.sync();
                     if (restore.getErrorCount()>0) {
                        ok = false;
                        getLogger().severe("Restore failed on "+db.getName());
                        failures.add(db.getName());
                     }
                  } catch (SyncException ex) {
View Full Code Here

Examples of org.atomojo.app.sync.PullSynchronizer

         SyncProcess proc = new SyncProcess(db,"restore",true,target,app,null);
        
         User user = (User)getRequest().getAttributes().get(App.USER_ATTR);
        
         try {
            PullSynchronizer restore = new PullSynchronizer(getContext().getLogger(),getApplication().getMetadataService(),user,db,storage,proc);
            restore.setAdditive(false);
            restore.sync();
            if (restore.getErrorCount()>0) {
               getResponse().setStatus(Status.SERVER_ERROR_INTERNAL);
               return new StringRepresentation("There were "+restore.getErrorCount()+" errors.  See the log for details.");
            } else {
               getResponse().setStatus(Status.SUCCESS_NO_CONTENT);
               return null;
            }
         } catch (SyncException ex) {
View Full Code Here

Examples of org.atomojo.app.sync.PullSynchronizer

     
      if (proc!=null) {
         Synchronizer sync = null;
         if (proc.isPullSynchronization()) {
            User user = (User)getRequest().getAttributes().get(App.USER_ATTR);
            sync = new PullSynchronizer(getContext().getLogger(),getApplication().getMetadataService(),user,db,storage,proc);
            ((PullSynchronizer)sync).setAdditive(proc.isAdditive());
         } else {
            sync = new PushSynchronizer(getContext().getLogger(),db,storage,proc);
         }
         try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.