Examples of createContext()


Examples of org.apache.struts2.views.velocity.VelocityManager.createContext()

        if (LOG.isDebugEnabled()) {
            LOG.debug("Rendering template " + templateName);
        }

        Context context = velocityManager.createContext(templateContext.getStack(), req, res);

        Writer outputWriter = templateContext.getWriter();
        context.put("tag", templateContext.getTag());
        context.put("parameters", templateContext.getParameters());
View Full Code Here

Examples of org.apache.tapestry.services.ExpressionEvaluator.createContext()

        ec.setEvaluator(evaluator);
       
        BasicObject target = new BasicObject();
        OgnlContext context = new OgnlContext();
       
        expect(evaluator.createContext(target)).andReturn(context);
       
        replay();
       
        Node e1 = (Node)ec.getCompiledExpression(target, "value");
       
View Full Code Here

Examples of org.apache.tomcat.core.ContextManager.createContext()

        // Need to find all the "config" that
        // was read from server.xml.
        // So far we work as if the admin interface was
        // used to remove/add the context.
        // Or like the deploytool in J2EE.
        Context ctx1=cm.createContext();
        ctx1.setContextManager( cm );
        ctx1.setPath(ctx.getPath());
        ctx1.setDocBase(ctx.getDocBase());
        ctx1.setReloadable( ctx.getReloadable());
        ctx1.setDebug( ctx.getDebug());
View Full Code Here

Examples of org.apache.tuscany.core.builder.ContextFactory.createContext()

            }
            scopeContext.registerFactory(source);
        }
        for (Component component : components) {
            ContextFactory config = (ContextFactory) component.getContextFactory();
            Context context = config.createContext();
            if ("source".equals(component.getName())) {
                ModuleScopeComponent source = (ModuleScopeComponent) context.getInstance(null);
                Assert.assertNotNull(source);
                GenericComponent gComp = source.getGenericComponent();
                gComp.getString();
View Full Code Here

Examples of org.apache.tuscany.core.extension.ExternalServiceContextFactory.createContext()

    public void testCreateExternalServiceContextFactory() {
        ExternalWebServiceBuilder builder = new ExternalWebServiceBuilder();
        ExternalService es = createMockExternalService();
        ExternalServiceContextFactory cf = builder.createExternalServiceContextFactory(es);
        assertNotNull(cf);
        Axis2ServiceInvoker si = (Axis2ServiceInvoker) cf.createContext().getHandler();
        assertNotNull(si);
    }

    protected void setUp() throws Exception {
        super.setUp();
View Full Code Here

Examples of org.apache.velocity.tools.ToolManager.createContext()

    private static ToolContext toolbox = null;

    public static @BeforeClass void initGenericToolsTests() throws Exception {
        ToolManager manager = new ToolManager(false);
        manager.configure(TOOLBOX_PATH);
        toolbox = manager.createContext();
    }

    public @Test void testAlternatorTool() {
        AlternatorTool alternatorTool = (AlternatorTool)toolbox.get("alternator");
        assertNotNull(alternatorTool);
View Full Code Here

Examples of org.apache.velocity.tools.view.VelocityView.createContext()

        Template template = createMock(Template.class);
        Writer writer = createMock(Writer.class);

        expect(request.getRequest()).andReturn(httpRequest);
        expect(request.getResponse()).andReturn(response);
        expect(view.createContext(httpRequest, response)).andReturn(context);
        expect(view.getTemplate("/test.vm")).andReturn(template);
        expect(request.getWriter()).andReturn(writer);
        view.merge(template, context, writer);

        replay(view, request, httpRequest, response, context, template, writer);
View Full Code Here

Examples of org.drools.core.rule.Accumulate.createContext()

            AccumulateContext accresult = new AccumulateContext();


            leftTuple.setObject(accresult);

            accresult.context = accumulate.createContext();

            accumulate.init(am.workingMemoryContext,
                            accresult.context,
                            leftTuple,
                            wm);
View Full Code Here

Examples of org.drools.core.rule.EvalCondition.createContext()

        final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );

        final LeftTupleImpl tuple = new LeftTupleImpl( f0, sink, true );
        f0.removeLeftTuple(tuple);
       
        Object evalContext = eval.createContext();

        assertTrue( eval.isAllowed( tuple,
                                    wm,
                                    evalContext ) );
View Full Code Here

Examples of org.drools.core.world.impl.WorldImpl.createContext()

         KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();

        ksession = kbase.newStatefulKnowledgeSession();
        ExecutionResultImpl localKresults = new ExecutionResultImpl();
        WorldImpl worldImpl = new WorldImpl();
        worldImpl.createContext("__TEMP__");
        worldImpl.getContext("__TEMP__").set("__TEMP__", new ContextImpl("__TEMP__", null));
        ResolvingKnowledgeCommandContext kContext = new ResolvingKnowledgeCommandContext(worldImpl);
        kContext.set("localResults", localKresults);
        kContext.set("ksession", ksession);
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.