Package de.matrixweb.smaller.resource

Examples of de.matrixweb.smaller.resource.Processor


    String input = processDescription.getInputFile();
    for (final de.matrixweb.smaller.common.ProcessDescription.Processor proc : processDescription
        .getProcessors()) {
      MDC.put("processor", proc.getName());
      try {
        final Processor processor = this.processorFactory.getProcessor(proc
            .getName());
        LOGGER.info("Executing processor {}", proc.getName());
        final Resource result = processor.execute(
            vfs,
            input == null ? null : resolver.resolve(input),
            injectGlobalOptionsFallback(version, manifest, proc.getName(),
                proc.getOptions()));
        input = result == null ? null : result.getPath();
View Full Code Here


    boolean hasJsMerger = false;
    boolean hasCssMerger = false;
    final String processors = task.getProcessor();
    LOGGER.info("Building processor chain: {}", processors);
    for (final String name : processors.split(",")) {
      final Processor processor = this.processorFactory.getProcessor(name);
      if (processor != null) {
        hasJsMerger |= processor instanceof MergingProcessor
            && processor.supportsType(Type.JS);
        hasCssMerger |= processor instanceof MergingProcessor
            && processor.supportsType(Type.CSS);
        list.add(new ProcessorOptions(name, processor, addVersionToOptions(
            task.getOptionsFor(name), version)));
      }
    }
    // Since version 1.0.0 no implicit merger
View Full Code Here

   * @see de.matrixweb.smaller.resource.ProcessorFactory#getProcessor(java.lang.String,
   *      java.lang.String)
   */
  @Override
  public Processor getProcessor(final String name, final String version) {
    Processor processor = null;
    try {
      final String nameFilter = "(name=" + name + ")";
      String versionFilter = null;
      if (version != null) {
        versionFilter = "(version=" + version + ")";
View Full Code Here

  public Processor getProcessor(final String name) {
    if (name.indexOf(':') > -1) {
      final String[] parts = name.split(":");
      return getProcessor(parts[0], parts[1]);
    }
    Processor processor = this.processors.get(name);
    if (processor == null) {
      final String lname = name.toLowerCase();
      final String pname = StringUtils.capitalize(lname) + "Processor";
      try {
        processor = (Processor) Class.forName(
View Full Code Here

TOP

Related Classes of de.matrixweb.smaller.resource.Processor

Copyright © 2018 www.massapicom. 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.