boolean fileAttachedToPayload = false; if (outboundPayload == null) { outboundPayload = PayloadImpl.Outbound.newInstance();
attachContainedFilesRecursively( file.toURI(), fileURI,
if (f.isDirectory()) { enhancedProps.setProperty("last-modified", Long.toString(f.lastModified())); attachFilesRecursively( actualBaseDirAbsURI, targetBaseDirRelURI,
Payload.Outbound outboundPayload = PayloadImpl.Outbound.newInstance();
outboundPayload = PayloadImpl.Outbound.newInstance();
outboundPayload = PayloadImpl.Outbound.newInstance(); retrieveArtifacts = true;
outboundPayload = PayloadImpl.Outbound.newInstance();
attachContainedFilesRecursively( file.toURI(), fileURI,
attachContainedFilesRecursively( file.toURI(), fileURI,
if (f.isDirectory()) { enhancedProps.setProperty("last-modified", Long.toString(f.lastModified())); attachFilesRecursively( actualBaseDirAbsURI, targetBaseDirRelURI,
attachFilesRecursively( file.getParentFile().toURI(), URI.create(relativeURIPath),
attachFilesRecursively( file.getParentFile().toURI(), URI.create(relativeURIPath),
if (f.isDirectory()) { enhancedProps.setProperty("last-modified", Long.toString(f.lastModified())); attachFilesRecursively( actualBaseDirAbsURI, targetBaseDirRelURI,
File retrieve = retrieveOpt != null ? new File(retrieveOpt) : null; if (retrieve != null && retrieve.exists()) { outboundPayload = PayloadImpl.Outbound.newInstance(); inv.outbound(outboundPayload);
private void attachFilesRecursively( final URI actualBaseDirAbsURI, final URI targetBaseDirRelURI, final URI dirFileURI, final String dataRequestName, final Properties enhancedProps, final File dirFile) throws FileNotFoundException, IOException { final String dirFileURIPath = dirFileURI.getRawPath(); parts.add(Part.newInstance( "application/octet-stream", /* for the directory itself */ dirFileURIPath + (dirFileURIPath.endsWith("/") ? "" : "/"), enhancedProps, (InputStream) null)); /* * The enhanced properties contains a setting for the data-request-name * which will be used to inject as a paramter if the receiver is * a command. We don't want lower-level directories to appear to be * the injectable value when in fact the higher-level directory is * the correct value. */ enhancedProps.remove("data-request-name"); attachContainedFilesRecursively( actualBaseDirAbsURI, targetBaseDirRelURI, dataRequestName, enhancedProps, dirFile); }
@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; } }
attachFilesRecursively( file.getParentFile().toURI(), URI.create(relativeURIPath),
@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; } }
private void attachFilesRecursively( final URI actualBaseDirAbsURI, final URI targetBaseDirRelURI, final URI dirFileURI, final String dataRequestName, final Properties enhancedProps, final File dirFile) throws FileNotFoundException, IOException { final String dirFileURIPath = dirFileURI.getRawPath(); parts.add(Part.newInstance( "application/octet-stream", /* for the directory itself */ dirFileURIPath + (dirFileURIPath.endsWith("/") ? "" : "/"), enhancedProps, (InputStream) null)); /* * The enhanced properties contains a setting for the data-request-name * which will be used to inject as a paramter if the receiver is * a command. We don't want lower-level directories to appear to be * the injectable value when in fact the higher-level directory is * the correct value. */ enhancedProps.remove("data-request-name"); attachContainedFilesRecursively( actualBaseDirAbsURI, targetBaseDirRelURI, dataRequestName, enhancedProps, dirFile); }
File retrieve = retrieveOpt != null ? new File(retrieveOpt) : null; if (retrieve != null && retrieve.exists()) { outboundPayload = PayloadImpl.Outbound.newInstance(); inv.outbound(outboundPayload);