/** * Return a SyncRequest with the mod times for all the * files in the specified directory. */ private SyncRequest getModTimes(String dir, SyncLevel level) { SyncRequest sr = new SyncRequest(); sr.instance = instanceName; sr.dir = dir; File fdir = new File(instanceDir, dir); if (!fdir.exists()) return sr; getFileModTimes(fdir, fdir, sr, level); return sr; }
sr = new SyncRequest(); sr.instance = instanceName; sr.dir = "config-specific";
@Override public void execute(AdminCommandContext context) { report = context.getActionReport(); report.setActionExitCode(ExitCode.SUCCESS); logger = context.getLogger(); // we use our own private payload. Don't use the one in the context! payload = PayloadImpl.Outbound.newInstance(); try { if (!isValid()) return; if (!setSyncBundleExportFile()) return; syncRequest = new SyncRequest(); syncRequest.instance = cluster_instance; if (!sync()) return; // write to the das or temp file write(); //all OK...download local file if (isRetrieve) pumpItOut(context); } catch (Exception e) { setError(Strings.get("export.sync.bundle.fail", e.toString())); logger.log(Level.SEVERE, Strings.get("export.sync.bundle.fail", e.toString()), e); return; } }
@Override public void execute(AdminCommandContext context) { report = context.getActionReport(); report.setActionExitCode(ExitCode.SUCCESS); logger = context.getLogger(); // we use our own private payload. Don't use the one in the context! payload = PayloadImpl.Outbound.newInstance(); try { if (!isValid()) return; if (!setSyncBundleExportFile()) return; syncRequest = new SyncRequest(); syncRequest.instance = cluster_instance; if (!sync()) return; // write to the das or temp file write(); //all OK...download local file if (isRetrieve) pumpItOut(context); } catch (Exception e) { setError(Strings.get("export.sync.bundle.fail", e.toString())); logger.log(Level.SEVERE, Strings.get("export.sync.bundle.fail", e.toString()), e); return; } }