Package ro.isdc.wro.config.jmx

Examples of ro.isdc.wro.config.jmx.WroConfiguration


    }));
  }

  @Test
  public void shouldAuthorizeResourcesFromModelWhenInDebugMode() {
    final WroConfiguration config = new WroConfiguration();
    config.setDebug(true);
    Context.get().setConfig(config);
    final String authorizedResourceUri = "/authorized.js";
    createSampleModel(authorizedResourceUri);

    assertTrue(authManager.isAuthorized(authorizedResourceUri));
View Full Code Here


    assertFalse(authManager.isAuthorized("/notAuthorized.js"));
  }

  @Test
  public void shouldNotAuthorizeResourcesFromModelWhenNotInDebugMode() {
    final WroConfiguration config = new WroConfiguration();
    config.setDebug(false);
    Context.get().setConfig(config);
    final String authorizedResourceUri = "/authorized.js";
    createSampleModel(authorizedResourceUri);

    assertFalse(authManager.isAuthorized(authorizedResourceUri));
View Full Code Here

  {
    return new ObjectFactory<WroConfiguration>()
    {
      public WroConfiguration create()
      {
        WroConfiguration wroConfiguration= new WroConfiguration();
        //        wroConfiguration.setDisableCache(true);
        wroConfiguration.setResourceWatcherAsync(true);
        wroConfiguration.setResourceWatcherUpdatePeriod(1);
        return wroConfiguration;
      }
    };
  }
View Full Code Here

      cacheGzippedContent = true;
      gzipEnabled = true;
      disableCache = false;
      modelUpdatePeriod = 0;
    }
    WroConfiguration configuration = new WroConfiguration();
    configuration.setCacheGzippedContent(env.getProperty(
        "wro.cacheGzippedContent", Boolean.class, cacheGzippedContent));
    configuration.setCacheUpdatePeriod(env.getProperty(
        "wro.cacheUpdatePeriod", Long.class, cacheUpdatePeriod));
    configuration.setConnectionTimeout(env.getProperty(
        "wro.connectionTimeout", Integer.class,
        WroConfiguration.DEFAULT_CONNECTION_TIMEOUT));
    configuration.setDebug(debug);
    configuration.setDisableCache(env.getProperty(
        "wro.disableCache", Boolean.class, disableCache));
    configuration.setEncoding(env.getProperty(
        "wro.encoding", String.class, WroConfiguration.DEFAULT_ENCODING));
    configuration.setGzipEnabled(env.getProperty(
        "wro.gzipEnabled", Boolean.class, gzipEnabled));
    configuration.setHeader(env.getProperty("wro.header"));
    configuration.setIgnoreEmptyGroup(env.getProperty(
        "wro.ignoreEmptyGroup", Boolean.class, true));
    configuration.setIgnoreMissingResources(env.getProperty(
        "wro.ignoreMissingResources", Boolean.class, true));
    configuration.setJmxEnabled(env.getProperty(
        "wro.jmxEnabled", Boolean.class, false));
    configuration.setMbeanName(env.getProperty("wro.mbeanName"));
    configuration.setModelUpdatePeriod(env.getProperty(
        "wro.modelUpdatePeriod", Long.class, modelUpdatePeriod));
    configuration.setParallelPreprocessing(env.getProperty(
        "wro.parallelPreprocessing", Boolean.class, parallelPreprocessing));
    return configuration;
  }
View Full Code Here

TOP

Related Classes of ro.isdc.wro.config.jmx.WroConfiguration

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.