Package org.restlet.ext.jaxrs.internal.wrappers

Examples of org.restlet.ext.jaxrs.internal.wrappers.RootResourceClass


        }
        // (d)
        if (eAndCs.isEmpty())
            excHandler.rootResourceNotFound();
        // (e) and (f)
        RootResourceClass tClass = getFirstByNoOfLiteralCharsNoOfCapturingGroups(eAndCs);
        // (f)
        PathRegExp rMatch = tClass.getPathRegExp();
        MatchingResult matchResult = rMatch.match(u);
        u = matchResult.getFinalCapturingGroup();
        addPathVarsToMap(matchResult, tlContext.get());
        ResourceObject o = instantiateRrc(tClass);
        return new RroRemPathAndMatchedPath(o, u, matchResult.getMatched());
View Full Code Here


    private static final ResourceClasses resourceClasses = new ResourceClasses(
            new ThreadLocalizedContext(), null, null, Engine
                    .getAnonymousLogger());

    public void testIllegalMethodPath() throws Exception {
        final RootResourceClass rrc = RootResourceClassTest
                .getPerRequestRootClassWrapper(resourceClasses,
                        IllegalMethPathRrc.class);
        @SuppressWarnings("unused")
        Collection<ResourceMethod> rms;
        rms = rrc.getMethodsForPath(new RemainingPath("abc"));
        rms = rrc.getMethodsForPath(new RemainingPath(""));
        rms = rrc.getMethodsForPath(new RemainingPath("subpath"));
    }
View Full Code Here

        rms = rrc.getMethodsForPath(new RemainingPath("subpath"));
    }

    public void testIllegalRrcPath() throws Exception {
        try {
            final RootResourceClass rrc = RootResourceClassTest
                    .getPerRequestRootClassWrapper(resourceClasses,
                            IllegalRrcPathRrc.class);
            fail("must fail");
        } catch (IllegalPathOnClassException iae) {
            // good
View Full Code Here

                    IllegalPathService1.class);
            fail("must not pass");
        } catch (AssertionFailedError e) {
            // wonderful
        }
        final RootResourceClass rrc = getPerRequestRootClassWrapper(
                resourceClasses, IllegalPathService2.class);
        PathRegExp rrcRegExp = rrc.getPathRegExp();
        assertEquals("/afsdf:use", rrcRegExp.getPathTemplateDec());
    }
View Full Code Here

TOP

Related Classes of org.restlet.ext.jaxrs.internal.wrappers.RootResourceClass

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.