final ArchiveModel archiveModel, boolean subArchivesOnly) checkCancelled(event);
final ArchiveModel archiveModel, boolean subArchivesOnly) checkCancelled(event);
@Override public void perform(GraphRewrite event, EvaluationContext context, ArchiveModel payload) { if (new WindupJavaConfigurationService(event.getGraphContext()).checkIfIgnored(event, payload)) return; LOG.info("Unzipping archive: " + payload.toPrettyString()); File zipFile = payload.asFile(); if (zipFile == null || !zipFile.isFile()) { throw new WindupException("Input path doesn't point to a file: " + (zipFile == null ? "null" : zipFile.getAbsolutePath())); } final GraphContext graphContext = event.getGraphContext(); checkCancelled(event); // Create a folder for all archive contents. Path unzippedArchiveDir = getArchivesDirLocation(graphContext); ensureDirIsCreated(unzippedArchiveDir); // Collect the malformed archives here. Object badArchives = event.getRewriteContext().get(KEY_BAD_ARCHIVES); if (null == badArchives) event.getRewriteContext().put(KEY_BAD_ARCHIVES, new ArrayList<String>()); unzipToTempDirectory(event, context, unzippedArchiveDir, zipFile, payload, false); }
@Override public void perform(GraphRewrite event, EvaluationContext context, ArchiveModel payload) { if (new WindupJavaConfigurationService(event.getGraphContext()).checkIfIgnored(event, payload)) return; LOG.info("Unzipping archive: " + payload.toPrettyString()); File zipFile = payload.asFile(); if (zipFile == null || !zipFile.isFile()) { throw new WindupException("Input path doesn't point to a file: " + (zipFile == null ? "null" : zipFile.getAbsolutePath())); } final GraphContext graphContext = event.getGraphContext(); checkCancelled(event); // Create a folder for all archive contents. Path unzippedArchiveDir = getArchivesDirLocation(graphContext); ensureDirIsCreated(unzippedArchiveDir); // Collect the malformed archives here. Object badArchives = event.getRewriteContext().get(KEY_BAD_ARCHIVES); if (null == badArchives) event.getRewriteContext().put(KEY_BAD_ARCHIVES, new ArrayList<String>()); unzipToTempDirectory(event, context, unzippedArchiveDir, zipFile, payload, false); }
FileModel parentFileModel, boolean subArchivesOnly) checkCancelled(event);
FileModel parentFileModel, boolean subArchivesOnly) checkCancelled(event);