/** * @see de.matrixweb.smaller.resource.Resource#apply(de.matrixweb.vfs.VFS, * de.matrixweb.smaller.resource.Processor, java.util.Map) */ @Override public Resource apply(final VFS vfs, final Processor processor, final Map<String, Object> options) throws IOException { return processor.execute(vfs, this, options); }
/** * @see de.matrixweb.smaller.resource.Resource#apply(de.matrixweb.vfs.VFS, * de.matrixweb.smaller.resource.Processor, java.util.Map) */ @Override public Resource apply(final VFS vfs, final Processor processor, final Map<String, Object> options) throws IOException { if (processor instanceof MultiResourceProcessor) { return processor.execute(vfs, this, options); } final List<Resource> list = new ArrayList<Resource>(); for (final Resource resource : this.resources) { list.add(resource.apply(vfs, processor, options)); } this.resources.clear(); this.resources.addAll(list); return this; }
/** * @see de.matrixweb.smaller.resource.Resource#apply(de.matrixweb.vfs.VFS, * de.matrixweb.smaller.resource.Processor, java.util.Map) */ @Override public Resource apply(final VFS vfs, final Processor processor, final Map<String, Object> options) throws IOException { // Version 1.1.0 handling if (this.resources.isEmpty()) { LOGGER.info("Found empty input-ResourcesGroup; Processor '" + processor + "' will decide what to process"); return processor.execute(vfs, null, options); } if (processor instanceof MultiResourceProcessor) { LOGGER.info("MultiResourceProcessor '" + processor + "' execution on " + this); final Resource result = processor.execute(vfs, this, options); this.resources.clear(); this.resources.add(result); return result; } final List<Resource> list = new ArrayList<Resource>(); for (final Resource resource : this.resources) { LOGGER.info("Processor '" + processor + "' execution on " + resource); list.add(resource.apply(vfs, processor, options)); } this.resources.clear(); this.resources.addAll(list); return this; }
.getName()); LOGGER.info("Executing processor {}", proc.getName()); final Resource result = processor.execute( vfs, input == null ? null : resolver.resolve(input),