Examples of RightHandPathRule


Examples of com.sun.jersey.server.impl.uri.rules.RightHandPathRule

            return;

        // Configure meta-data
        wa.initiateResource(WadlResource.class);

        rules.put(p, new RightHandPathRule(
                resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT),
                p.getTemplate().endsWithSlash(),
                new ResourceClassRule(p.getTemplate(), WadlResource.class)));
    }
View Full Code Here

Examples of com.sun.jersey.server.impl.uri.rules.RightHandPathRule

    }

    private void addRule(final String path, final Class c) {
        final PathPattern p = getPattern(path, c);
        if (isPatternValid(p, c)) {
            rules.put(p, new RightHandPathRule(
                        resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT),
                        p.getTemplate().endsWithSlash(),
                        new ResourceClassRule(p.getTemplate(), c)));
        }
    }
View Full Code Here

Examples of com.sun.jersey.server.impl.uri.rules.RightHandPathRule

    }

    private void addRule(final String path, final Object o) {
        final PathPattern p = getPattern(path, o.getClass());
        if (isPatternValid(p, o.getClass())) {
            rules.put(p, new RightHandPathRule(
                        resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT),
                        p.getTemplate().endsWithSlash(),
                        new ResourceObjectRule(p.getTemplate(), o)));
        }
    }
View Full Code Here

Examples of com.sun.jersey.server.impl.uri.rules.RightHandPathRule

                    FilterFactory.getResponseFilters(resourceFilters),
                    dispatchingListener,
                    locator);

            rulesMap.put(p,
                    new RightHandPathRule(
                            resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT),
                            p.getTemplate().endsWithSlash(),
                            r));
        }
    }
View Full Code Here

Examples of com.sun.jersey.server.impl.uri.rules.RightHandPathRule

            processOptions(rmm, resource, p);

            rmm.sort();

            rulesMap.put(p,
                    new RightHandPathRule(
                            resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT),
                            p.getTemplate().endsWithSlash(),
                            new HttpMethodRule(rmm, true, dispatchingListener)));
        }
    }
View Full Code Here

Examples of com.sun.jersey.server.impl.uri.rules.RightHandPathRule

            ResourceClass r = getResourceClass(ar);
            rootResources.add(r.resource);

            PathPattern p = new PathPattern(t);

            rulesMap.put(p, new RightHandPathRule(
                        resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT),
                        t.endsWithSlash(),
                        new ResourceObjectRule(t, o)));
        }
       
        for (Class<?> c : classes) {
            AbstractResource ar = getAbstractResource(c);
            if (!ar.isRootResource()) {
                LOGGER.warning("The class, " + c + ", registered as a root resource class " +
                        "of the ResourceConfig is not a root resource class" +
                        ". This class will be ignored");
                continue;
            }
            // TODO this should be moved to the validation
            // as such classes are not root resource classes
            int modifiers = c.getModifiers();
            if (Modifier.isAbstract(modifiers) && !Modifier.isInterface(modifiers)) {
                LOGGER.warning("The " + c + ", registered as a root resource class " +
                        "of the ResourceConfig cannot be instantiated" +
                        ". This class will be ignored");
                continue;
            } else if (Modifier.isInterface(modifiers)) {
                LOGGER.warning("The " + c + ", registered as a root resource class " +
                        "of the ResourceConfig cannot be instantiated" +
                        ". This interface will be ignored");
                continue;
            }

            UriTemplate t = new PathTemplate(ar.getPath().getValue());
            ensureTemplateUnused(t, ar, uriTemplatesUsed);

            ResourceClass r = getResourceClass(ar);
            rootResources.add(r.resource);

            PathPattern p = new PathPattern(t);

            rulesMap.put(p, new RightHandPathRule(
                    resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT),
                    t.endsWithSlash(),
                    new ResourceClassRule(t, c)));
        }
View Full Code Here

Examples of com.sun.jersey.server.impl.uri.rules.RightHandPathRule

        // Preload wadl resource runtime meta data
        getResourceClass(WadlResource.class);
        UriTemplate t = new PathTemplate("application.wadl");
        PathPattern p = new PathPattern(t);

        rulesMap.put(p, new RightHandPathRule(
                resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT),
                false,
                new ResourceObjectRule(t, wr)));
    }
View Full Code Here

Examples of com.sun.jersey.server.impl.uri.rules.RightHandPathRule

            final PathPattern p = e.getKey();
            final ResourceMethodMap rmm = e.getValue();
           
            rmm.sort();
            rulesMap.put(p,
                    new RightHandPathRule(
                    config.getFeature(ResourceConfig.FEATURE_REDIRECT),                   
                    p.getTemplate().endsWithSlash(),
                    new HttpMethodRule(rmm, implictProduces, true)));
        }
View Full Code Here

Examples of com.sun.jersey.server.impl.uri.rules.RightHandPathRule

                    injectableContext.getInjectable(locator.getParameters(), ComponentScope.PerRequest),
                    ff.getRequestFilters(resourceFilters),
                    ff.getResponseFilters(resourceFilters));

            rulesMap.put(p,
                    new RightHandPathRule(
                    config.getFeature(ResourceConfig.FEATURE_REDIRECT),
                    t.endsWithSlash(),
                    r));
        }
    }
View Full Code Here

Examples of com.sun.jersey.server.impl.uri.rules.RightHandPathRule

            return;

        // Configure meta-data
        wa.initiateResource(WadlResource.class);

        rules.put(p, new RightHandPathRule(
                resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT),
                p.getTemplate().endsWithSlash(),
                new ResourceClassRule(p.getTemplate(), WadlResource.class)));
    }
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.