Examples of DefaultResourceLoader


Examples of org.springframework.core.io.DefaultResourceLoader

       
        /*
         * 1. initialize script engine by script engine name
         */
       
        PortletContext portletContext = new MockPortletContext(new DefaultResourceLoader());
        MockPortletConfig portletConfig = new MockPortletConfig(portletContext);
        portletConfig.addInitParameter(ScriptPortlet.ENGINE, scriptEngine);
        if (evalPortletKey != null)
        {
            portletConfig.addInitParameter(ScriptPortlet.EVAL_KEY, evalPortletKey);
        }
        portletConfig.addInitParameter(ScriptPortlet.SOURCE, scriptSource);
       
        ScriptPortlet helloScriptPortlet = new ScriptPortlet();
       
        try
        {
            helloScriptPortlet.init(portletConfig);
            assertTrue(helloScriptPortlet.getScriptSourceLastEvaluated() > 0L);
        }
        catch (PortletException e)
        {
            e.printStackTrace();
            fail("Failed to initialize portlet: " + e);
        }
       
        /*
         * 2. initialize script engine by script file extension
         */
       
        portletContext = new MockPortletContext(new DefaultResourceLoader());
        portletConfig = new MockPortletConfig(portletContext);
        if (evalPortletKey != null)
        {
            portletConfig.addInitParameter(ScriptPortlet.EVAL_KEY, evalPortletKey);
        }
        portletConfig.addInitParameter(ScriptPortlet.SOURCE, scriptSource);
       
        helloScriptPortlet = new ScriptPortlet();
       
        try
        {
            helloScriptPortlet.init(portletConfig);
            assertTrue(helloScriptPortlet.getScriptSourceLastEvaluated() > 0L);
        }
        catch (PortletException e)
        {
            e.printStackTrace();
            fail("Failed to initialize portlet: " + e);
        }
       
        /*
         * 3. initialize script engine by script mime type
         */
       
        portletContext = new MockPortletContext(new DefaultResourceLoader())
        {
            @Override
            public String getMimeType(String filePath)
            {
                return getScriptMimeType();
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

    }

    protected void setUp() throws Exception {
        request = new MockHttpServletRequest();
        response = new MockHttpServletResponse();
        servletContext = new MockServletContext(new DefaultResourceLoader());

        result = new XSLTResult();
        stack = ValueStackFactory.getFactory().createValueStack();
        ActionContext.getContext().setValueStack(stack);
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

   * Create a new PathMatchingResourcePatternResolver with a DefaultResourceLoader.
   * <p>ClassLoader access will happen via the thread context class loader.
   * @see org.springframework.core.io.DefaultResourceLoader
   */
  public PathMatchingResourcePatternResolver() {
    this.resourceLoader = new DefaultResourceLoader();
  }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

   * @param classLoader the ClassLoader to load classpath resources with,
   * or <code>null</code> for using the thread context class loader
   * @see org.springframework.core.io.DefaultResourceLoader
   */
  public PathMatchingResourcePatternResolver(ClassLoader classLoader) {
    this.resourceLoader = new DefaultResourceLoader(classLoader);
  }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

                LocationConstants.BOOTSTRAP_LOCATIONS_RESOURCE_PARAM);
        return bootstrapLocationsResource;
    }
   
    protected ResourceLoader getResourceLoader() {
        return new DefaultResourceLoader();
    }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

    moduleDefinitionSource.setResource(resource);
    return moduleDefinitionSource;
  }

  protected ResourceLoader getResourceLoader() {
    return new DefaultResourceLoader();
  }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

    String bootstrapLocationsResource = System.getProperty(LocationConstants.BOOTSTRAP_LOCATIONS_RESOURCE_PARAM);
    return bootstrapLocationsResource;
  }
 
  protected ResourceLoader getResourceLoader() {
    return new DefaultResourceLoader();
  }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

        String bootstrapLocationsResource = System.getProperty(LocationConstants.BOOTSTRAP_LOCATIONS_RESOURCE_PARAM);
        return bootstrapLocationsResource;
    }
   
    protected ResourceLoader getResourceLoader() {
        return new DefaultResourceLoader();
    }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

        moduleDefinitionSource.setResource(resource);
        return moduleDefinitionSource;
    }

    protected ResourceLoader getResourceLoader() {
        return new DefaultResourceLoader();
    }
View Full Code Here

Examples of org.springframework.core.io.DefaultResourceLoader

        moduleDefinitionSource.setResource(resource);
        return moduleDefinitionSource;
    }

    protected ResourceLoader getResourceLoader() {
        return new DefaultResourceLoader();
    }
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.