Examples of URLApplicationResource


Examples of org.apache.tiles.request.locale.URLApplicationResource

        Set<String> elementSet = new HashSet<String>();
        elementSet.add("/WEB-INF/pom.xml");
        EasyMock.expect(servletContext.getResourcePaths("/WEB-INF/")).andReturn(elementSet);
        EasyMock.replay(servletContext);

        assertEquals(new URLApplicationResource(u.toExternalForm(), u), context.getResource(url));
        assertEquals(new URLApplicationResource(pomUrl.toExternalForm(), pomUrl), context.getResource("/WEB-INF/*.xml"));
        assertEquals(TEST_PROPERTIES_SIZE, context.getResources(
                "classpath*:/test.properties").size());

        assertEquals(1, context.getResources(
                "classpath*:/org/apache/tiles/request/servlet/wildcard/*Test.class").size());
 
View Full Code Here

Examples of org.apache.tiles.request.locale.URLApplicationResource

        Set<String> elementSet = new HashSet<String>();
        elementSet.add("/WEB-INF/pom.xml");
        EasyMock.expect(portletContext.getResourcePaths("/WEB-INF/")).andReturn(elementSet);
        EasyMock.replay(portletContext);

        assertEquals(new URLApplicationResource(u.toExternalForm(), u), context.getResource("/" + url));
        assertEquals(new URLApplicationResource(pomUrl.toExternalForm(), pomUrl), context.getResource("/WEB-INF/*.xml"));
        assertEquals(TEST_PROPERTIES_SIZE, context.getResources(
                "classpath*:/test.properties").size());

        assertEquals(TEST_TEST_SIZE, context.getResources(
                "classpath*:/org/apache/tiles/request/portlet/wildcard/*Test.class").size());
 
View Full Code Here

Examples of org.apache.tiles.request.locale.URLApplicationResource

        Set<String> elementSet = new HashSet<String>();
        elementSet.add("/WEB-INF/pom.xml");
        EasyMock.expect(servletContext.getResourcePaths("/WEB-INF/")).andReturn(elementSet).anyTimes();
        EasyMock.replay(servletContext);

        assertEquals(new URLApplicationResource(u.toExternalForm(), u), context.getResource(url));
        assertEquals(new URLApplicationResource(pomUrl.toExternalForm(), pomUrl), context.getResource("/WEB-INF/*.xml"));
        assertEquals(TEST_PROPERTIES_SIZE, context.getResources(
                "classpath*:/test.properties").size());

        assertEquals(1, context.getResources(
                "classpath*:/org/apache/tiles/request/servlet/wildcard/*Test.class").size());
 
View Full Code Here

Examples of org.apache.tiles.request.locale.URLApplicationResource

    /** {@inheritDoc} */
    public ApplicationResource getResource(String localePath) {
        try {
            URL url = servletContext.getResource(localePath);
            if (url != null) {
                return new URLApplicationResource(localePath, url);
            } else {
                return null;
            }
        } catch (MalformedURLException e) {
            return null;
View Full Code Here

Examples of org.apache.tiles.request.locale.URLApplicationResource

    /** {@inheritDoc} */
    public ApplicationResource getResource(ApplicationResource base, Locale locale) {
        try {
            URL url = servletContext.getResource(base.getLocalePath(locale));
            if (url != null) {
                return new URLApplicationResource(base.getPath(), locale, url);
            } else {
                return null;
            }
        } catch (MalformedURLException e) {
            return null;
View Full Code Here

Examples of org.apache.tiles.request.locale.URLApplicationResource

    /** {@inheritDoc} */
    public ApplicationResource getResource(String localePath) {
        try {
            URL url = context.getResource(localePath);
            if (url != null) {
                return new URLApplicationResource(localePath, url);
            } else {
                return null;
            }
        } catch (MalformedURLException e) {
            return null;
View Full Code Here

Examples of org.apache.tiles.request.locale.URLApplicationResource

    /** {@inheritDoc} */
    public ApplicationResource getResource(ApplicationResource base, Locale locale) {
        try {
            URL url = context.getResource(base.getLocalePath(locale));
            if (url != null) {
                return new URLApplicationResource(base.getPath(), locale, url);
            } else {
                return null;
            }
        } catch (MalformedURLException e) {
            return null;
View Full Code Here

Examples of org.apache.tiles.request.locale.URLApplicationResource

        if (resources != null && resources.length > 0) {
            for (int i = 0; i < resources.length; i++) {
                URL url;
                try {
                    url = resources[i].getURL();
                    resourceList.add(new URLApplicationResource(url.toExternalForm(), url));
                } catch (IOException e) {
                    // shouldn't happen with the kind of resources we're using
                    throw new IllegalArgumentException("no URL for " + resources[i].toString(), e);
                }
            }
View Full Code Here

Examples of org.apache.tiles.request.locale.URLApplicationResource

        Set<String> elementSet = new HashSet<String>();
        elementSet.add("/WEB-INF/pom.xml");
        EasyMock.expect(portletContext.getResourcePaths("/WEB-INF/")).andReturn(elementSet).anyTimes();
        EasyMock.replay(portletContext);

        assertEquals(new URLApplicationResource(u.toExternalForm(), u), context.getResource("/" + url));
        assertEquals(new URLApplicationResource(pomUrl.toExternalForm(), pomUrl), context.getResource("/WEB-INF/*.xml"));
        assertEquals(TEST_PROPERTIES_SIZE, context.getResources(
                "classpath*:/test.properties").size());

        assertEquals(TEST_TEST_SIZE, context.getResources(
                "classpath*:/org/apache/tiles/request/portlet/wildcard/*Test.class").size());
 
View Full Code Here

Examples of org.apache.tiles.request.locale.URLApplicationResource

        if (resources != null && resources.length > 0) {
            for (int i = 0; i < resources.length; i++) {
                URL url;
                try {
                    url = resources[i].getURL();
                    resourceList.add(new URLApplicationResource(url.toExternalForm(), url));
                } catch (IOException e) {
                    // shouldn't happen with the kind of resources we're using
                    throw new IllegalArgumentException("no URL for " + resources[i].toString(), e);
                }
            }
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.