Package org.apache.sling.servlets.resolver.internal.helper

Examples of org.apache.sling.servlets.resolver.internal.helper.ResourceCollector


        try {
            // find the error handler component
            Resource resource = getErrorResource(request);

            // find a servlet for the status as the method name
            ResourceCollector locationUtil = new ResourceCollector(String.valueOf(status),
                    ServletResolverConstants.ERROR_HANDLER_PATH, resource,
                    this.executionPaths);
            Servlet servlet = getServletInternal(locationUtil, request, scriptResolver);

            // fall back to default servlet if none
View Full Code Here


            Resource resource = getErrorResource(request);

            Class<?> tClass = throwable.getClass();
            while (servlet == null && tClass != Object.class) {
                // find a servlet for the simple class name as the method name
                ResourceCollector locationUtil = new ResourceCollector(tClass.getSimpleName(),
                        ServletResolverConstants.ERROR_HANDLER_PATH, resource,
                        this.executionPaths);
                servlet = getServletInternal(locationUtil, request, scriptResolver);

                // go to the base class
View Full Code Here

            final Resource resource,
            final ResourceResolver resolver) {

        // find a default error handler according to the resource type
        // tree of the given resource
        final ResourceCollector locationUtil = new ResourceCollector(
            ServletResolverConstants.DEFAULT_ERROR_HANDLER_NAME,
            ServletResolverConstants.ERROR_HANDLER_PATH, resource,
            this.executionPaths);
        final Servlet servlet = getServletInternal(locationUtil, request, resolver);
        if (servlet != null) {
View Full Code Here

                    final Collection<Resource> servlets;
                    Resource resource = resourceResolver.resolve(requestPathInfo.getResourcePath());
                    if (resource.adaptTo(Servlet.class) != null) {
                        servlets = Collections.singleton(resource);
                    } else {
                        final ResourceCollector locationUtil = ResourceCollector.create(
                                resource,
                                requestPathInfo.getExtension(),
                                executionPaths,
                                defaultExtensions,
                                method,
                                requestPathInfo.getSelectors());
                        servlets = locationUtil.getServlets(resourceResolver);
                    }
                    tr(pw);
                    tdLabel(pw, "&nbsp;");
                    tdContent(pw);
View Full Code Here

            }
        }

        // the resource type is not absolute, so lets go for the deep search
        if (servlet == null) {
            ResourceCollector locationUtil = ResourceCollector.create(request);
            servlet = getServlet(locationUtil, request, resource);

            if(log.isDebugEnabled()) {
              log.debug("getServlet returns Servlet {}", RequestUtil.getServletName(servlet));
            }
View Full Code Here

            // find the error handler component
            Resource resource = getErrorResource(request);

            // find a servlet for the status as the method name
            ResourceCollector locationUtil = new ResourceCollector(
                String.valueOf(status),
                ServletResolverConstants.ERROR_HANDLER_PATH);
            Servlet servlet = getServlet(locationUtil, request, resource);

            // fall back to default servlet if none
View Full Code Here

            Resource resource = getErrorResource(request);

            Class<?> tClass = throwable.getClass();
            while (servlet == null && tClass != Object.class) {
                // find a servlet for the simple class name as the method name
                ResourceCollector locationUtil = new ResourceCollector(
                    tClass.getSimpleName(),
                    ServletResolverConstants.ERROR_HANDLER_PATH);
                servlet = getServlet(locationUtil, request, resource);

                // go to the base class
View Full Code Here

TOP

Related Classes of org.apache.sling.servlets.resolver.internal.helper.ResourceCollector

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.