Examples of DefaultResourceLoader


Examples of ch.entwine.weblounge.common.impl.request.DefaultResourceLoader

   * @param resourceLoader
   *          the ResourceLoader to use (or null for the default)
   */
  public MockServletContext(String resourceBasePath,
      ResourceLoader resourceLoader) {
    this.resourceLoader = (resourceLoader != null ? resourceLoader : new DefaultResourceLoader());
    this.resourceBasePath = (resourceBasePath != null ? resourceBasePath : "");

    // Use JVM temp dir as ServletContext temp dir.
    String tempDir = System.getProperty(TEMP_DIR_SYSTEM_PROPERTY);
    if (tempDir != null) {
View Full Code Here

Examples of net.sf.pipet.resources.DefaultResourceLoader

    else if (!base.equals("/") && base.endsWith("/"))
      base = base.substring(0, base.length()-1);
   
    ServletContextHandler ctx = new ServletContextHandler(server, base);
    Configuration cfg = ServerConfig.loadPipelineConfiguration(configfile);
    cfg.setResourceLoader(new DefaultResourceLoader(configfile.getParentFile()));
    reporter.info("Setting up pipelines: "+base);
    ctx.addServlet(new ServletHolder(new Servlet(cfg, new PrefixMessenger(base+": ", reporter))), "/*");
    return ctx;
  }
View Full Code Here

Examples of org.jboss.weld.resources.DefaultResourceLoader

    private ResourceLoader getResourceLoader() {
        return DefaultResourceLoader.INSTANCE;
    }

    private ResourceLoader getResourceLoaderHidingJsf20Classes() {
        return new DefaultResourceLoader() {

            @Override
            public Class<?> classForName(String name) {
                if ("javax.faces.component.behavior.Behavior".equals(name)) {
                    throw new ResourceLoadingException("Hidden class");
View Full Code Here

Examples of org.raml.parser.loader.DefaultResourceLoader

        new Validator().validate(args);
    }

    private void validate(String[] resources) throws FileNotFoundException
    {
        ResourceLoader loader = new DefaultResourceLoader();
        for (String ramlResource : resources)
        {
            System.out.format("Validation Results for %s:\n", ramlResource);
            String ramlResourceToFetch = ramlResource;
            if (ramlResource.startsWith("/"))
            {
                ramlResourceToFetch = "file://" + ramlResource;
            }
            List<ValidationResult> results = new ArrayList<ValidationResult>();
            InputStream content = loader.fetchResource(ramlResourceToFetch);
            if (content != null)
            {
                results = RamlValidationService.createDefault().validate(content, ramlResourceToFetch);
            }
            else
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

            return context;
        } catch (ClassNotFoundException e) {
            // create generic application context
            GenericApplicationContext context = new GenericApplicationContext(parent);
            context.setClassLoader(classLoader);
            ResourceLoader resourceLoader = new DefaultResourceLoader(classLoader);
            context.setResourceLoader(resourceLoader);
            BeanDefinitionReader reader = new XmlBeanDefinitionReader(context);
            for (String resource : resources) {
                reader.loadBeanDefinitions(resourceLoader.getResource(resource));
            }
            context.refresh();
            return context;
        }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

  @Before
  public void setUp() {

    AnnotationMetadata annotationMetadata = new StandardAnnotationMetadata(SampleConfiguration.class, true);
    environment = new StandardEnvironment();
    resourceLoader = new DefaultResourceLoader();
    source = new AnnotationRepositoryConfigurationSource(annotationMetadata, EnableRepositories.class, resourceLoader,
        environment);
  }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

   * @see DATACMNS-47
   */
  @Test
  public void evaluatesExcludeFiltersCorrectly() {

    Collection<BeanDefinition> candidates = source.getCandidates(new DefaultResourceLoader());
    assertThat(candidates, hasSize(1));

    BeanDefinition candidate = candidates.iterator().next();
    assertThat(candidate.getBeanClassName(), is(MyRepository.class.getName()));
  }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

  }

  static class DummyRegistrar extends RepositoryBeanDefinitionRegistrarSupport {

    DummyRegistrar() {
      setResourceLoader(new DefaultResourceLoader());
    }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

  public static void setupTestData(final DataSource dataSource) throws LiquibaseException {
    log.info("Setting up database for testing");
    SpringLiquibase liquibase = new SpringLiquibase();
    liquibase.setChangeLog("classpath:liquibase.xml");
    liquibase.setDataSource(dataSource);
    liquibase.setResourceLoader(new DefaultResourceLoader());
    liquibase.setDropFirst(true);
    liquibase.afterPropertiesSet();
  }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

        }
       
        factory.setRepositoryName("jeceira-repo");
        factory.resolveConfigurationResource();
        ConfigManager config = factory.getConfigManager();
        DefaultResourceLoader loader = new DefaultResourceLoader();
        Resource res = loader.getResource("/jeceira.xml");
        assertEquals(res, factory.getConfiguration());
       
        factory = new RepositoryFactoryBean();
        factory.setConfigManager(config);
        factory.setRepositoryName("jeceira-repo");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.