Examples of ChildContext


Examples of com.noelios.restlet.component.ChildContext

        application = (Application) getWebApplicationContext().getBean(
                applicationBeanName);

        if (application != null) {
            // Set the context based on the Servlet's context
            application.setContext(new ChildContext(new ServletContextAdapter(
                    this, parentContext)));
            final ChildContext applicationContext = (ChildContext) application
                    .getContext();

            // Copy all the servlet parameters into the context
            String initParam;

            // Copy all the Web component initialization parameters
            final javax.servlet.ServletConfig servletConfig = getServletConfig();
            for (final Enumeration<String> enum1 = servletConfig
                    .getInitParameterNames(); enum1.hasMoreElements();) {
                initParam = enum1.nextElement();
                applicationContext.getParameters().add(initParam,
                        servletConfig.getInitParameter(initParam));
            }

            // Copy all the Web Application initialization parameters
            for (final Enumeration<String> enum1 = getServletContext()
                    .getInitParameterNames(); enum1.hasMoreElements();) {
                initParam = enum1.nextElement();
                applicationContext.getParameters().add(initParam,
                        getServletContext().getInitParameter(initParam));
            }

        } else {
            application = super.createApplication(parentContext);
View Full Code Here

Examples of com.noelios.restlet.component.ChildContext

     */
    @Override
    public void fireContextChanged(Restlet restlet, Context context) {
        if (context != null) {
            if (context instanceof ChildContext) {
                ChildContext childContext = (ChildContext) context;

                if (childContext.getChild() == null) {
                    childContext.setChild(restlet);
                }
            } else if (!(restlet instanceof Component)
                    && (context instanceof ComponentContext)) {
                context
                        .getLogger()
View Full Code Here

Examples of com.noelios.restlet.component.ChildContext

     */
    @Override
    public void fireContextChanged(Restlet restlet, Context context) {
        if (context != null) {
            if (context instanceof ChildContext) {
                ChildContext childContext = (ChildContext) context;

                if (childContext.getChild() == null) {
                    childContext.setChild(restlet);
                }
            } else if (!(restlet instanceof Component)
                    && (context instanceof ComponentContext)) {
                context
                        .getLogger()
View Full Code Here

Examples of org.apache.commons.jxpath.ri.axes.ChildContext

            case Compiler.AXIS_ANCESTOR_OR_SELF :
                return new AncestorContext(context, true, nodeTest);
            case Compiler.AXIS_ATTRIBUTE :
                return new AttributeContext(context, nodeTest);
            case Compiler.AXIS_CHILD :
                return new ChildContext(context, nodeTest, false, false);
            case Compiler.AXIS_DESCENDANT :
                return new DescendantContext(context, false, nodeTest);
            case Compiler.AXIS_DESCENDANT_OR_SELF :
                return new DescendantContext(context, true, nodeTest);
            case Compiler.AXIS_FOLLOWING :
                return new PrecedingOrFollowingContext(
                    context,
                    nodeTest,
                    false);
            case Compiler.AXIS_FOLLOWING_SIBLING :
                return new ChildContext(context, nodeTest, true, false);
            case Compiler.AXIS_NAMESPACE :
                return new NamespaceContext(context, nodeTest);
            case Compiler.AXIS_PARENT :
                return new ParentContext(context, nodeTest);
            case Compiler.AXIS_PRECEDING :
                return new PrecedingOrFollowingContext(context, nodeTest, true);
            case Compiler.AXIS_PRECEDING_SIBLING :
                return new ChildContext(context, nodeTest, true, true);
            case Compiler.AXIS_SELF :
                return new SelfContext(context, nodeTest);
        }
        return null; // Never happens
    }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.axes.ChildContext

        case Compiler.AXIS_ANCESTOR_OR_SELF :
            return new AncestorContext(context, true, nodeTest);
        case Compiler.AXIS_ATTRIBUTE :
            return new AttributeContext(context, nodeTest);
        case Compiler.AXIS_CHILD :
            return new ChildContext(context, nodeTest, false, false);
        case Compiler.AXIS_DESCENDANT :
            return new DescendantContext(context, false, nodeTest);
        case Compiler.AXIS_DESCENDANT_OR_SELF :
            return new DescendantContext(context, true, nodeTest);
        case Compiler.AXIS_FOLLOWING :
            return new PrecedingOrFollowingContext(context, nodeTest, false);
        case Compiler.AXIS_FOLLOWING_SIBLING :
            return new ChildContext(context, nodeTest, true, false);
        case Compiler.AXIS_NAMESPACE :
            return new NamespaceContext(context, nodeTest);
        case Compiler.AXIS_PARENT :
            return new ParentContext(context, nodeTest);
        case Compiler.AXIS_PRECEDING :
            return new PrecedingOrFollowingContext(context, nodeTest, true);
        case Compiler.AXIS_PRECEDING_SIBLING :
            return new ChildContext(context, nodeTest, true, true);
        case Compiler.AXIS_SELF :
            return new SelfContext(context, nodeTest);
        default:
            return null; // Never happens
        }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.axes.ChildContext

        case Compiler.AXIS_ANCESTOR_OR_SELF :
            return new AncestorContext(context, true, nodeTest);
        case Compiler.AXIS_ATTRIBUTE :
            return new AttributeContext(context, nodeTest);
        case Compiler.AXIS_CHILD :
            return new ChildContext(context, nodeTest, false, false);
        case Compiler.AXIS_DESCENDANT :
            return new DescendantContext(context, false, nodeTest);
        case Compiler.AXIS_DESCENDANT_OR_SELF :
            return new DescendantContext(context, true, nodeTest);
        case Compiler.AXIS_FOLLOWING :
            return new PrecedingOrFollowingContext(context, nodeTest, false);
        case Compiler.AXIS_FOLLOWING_SIBLING :
            return new ChildContext(context, nodeTest, true, false);
        case Compiler.AXIS_NAMESPACE :
            return new NamespaceContext(context, nodeTest);
        case Compiler.AXIS_PARENT :
            return new ParentContext(context, nodeTest);
        case Compiler.AXIS_PRECEDING :
            return new PrecedingOrFollowingContext(context, nodeTest, true);
        case Compiler.AXIS_PRECEDING_SIBLING :
            return new ChildContext(context, nodeTest, true, true);
        case Compiler.AXIS_SELF :
            return new SelfContext(context, nodeTest);
        }
        return null; // Never happens
    }
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.