Package org.atomojo.app.sync

Examples of org.atomojo.app.sync.PullSynchronizer.sync()


                  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());
                     }
View Full Code Here


         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);
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.