Examples of prepare()


Examples of org.apache.karaf.shell.commands.basic.DefaultActionPreparator.prepare()

    static void execute(InstanceCommandSupport command, File storageFile, String[] args) throws Exception {
        DefaultActionPreparator dap = new DefaultActionPreparator();
        List<Object> params = new ArrayList<Object>(Arrays.asList(args));
        params.remove(0); // this is the actual command name

        if (!dap.prepare(command, null, params)) {
            return;
        }

        InstanceServiceImpl instanceService = new InstanceServiceImpl();
        instanceService.setStorageLocation(storageFile);
View Full Code Here

Examples of org.apache.karaf.shell.impl.action.command.DefaultActionPreparator.prepare()

            ByteArrayInputStream bais = new ByteArrayInputStream("1\n2\n3\n4\n5\n6\n7\n8\n9\n".getBytes());
            System.setIn(bais);

            GrepAction grep = new GrepAction();
            DefaultActionPreparator preparator = new DefaultActionPreparator();
            preparator.prepare(grep, null, Arrays.<Object>asList("-C", "100", "2"));
            grep.execute();
        } finally {
            System.setIn(input);
        }
    }
View Full Code Here

Examples of org.apache.maven.continuum.release.ContinuumReleaseManager.prepare()

                    executable = m2Home + File.separator + "bin" + File.separator + executable;
                }
            }

            releaseId =
                releaseManager.prepare( project, getReleaseProperties(), getRelVersionMap(), getDevVersionMap(), listener,
                                        workingDirectory, environments, executable );
        }
       
        AuditLog event = new AuditLog( "Release id=" + releaseId, AuditLogConstants.PREPARE_RELEASE );
        event.setCategory( AuditLogConstants.PROJECT );
View Full Code Here

Examples of org.apache.oozie.util.db.SqlStatement.prepare()

        List<Map<Object, Object>> maps = new ArrayList<Map<Object, Object>>();
        SqlStatement insert = insertInto(TEST_TABLE).value(TEST_LONG, "1").value(TEST_STRING, "2").value(TEST_BOOLEAN,
                                                                                                         true);
        SqlStatement update = update(TEST_TABLE).set(TEST_BOOLEAN, false).where(
                and(isEqual(TEST_LONG, "1"), isEqual(TEST_STRING, "2")));
        PreparedStatement pUpdate = update.prepare(conn);
        PreparedStatement pInsert = insert.prepare(conn);
        for (i = 0; i < 4; i++) {
            Map<Object, Object> values = new HashMap<Object, Object>();
            values.put("1", i);
            values.put("2", names[i]);
View Full Code Here

Examples of org.apache.pivot.wtk.effects.Decorator.prepare()

            DecoratorSequence decorators = display.getDecorators();
            int n = decorators.getLength();
            for (int i = n - 1; i >= 0; i--) {
                Decorator decorator = decorators.get(i);
                decoratedGraphics = decorator.prepare(display, decoratedGraphics);
            }

            graphics.setRenderingHint(RenderingHints.KEY_RENDERING,
                RenderingHints.VALUE_RENDER_SPEED);
            display.paint(graphics);
View Full Code Here

Examples of org.apache.solr.handler.component.QueryComponent.prepare()

        // creating a request here... make sure to close it!
        checkResponse.req = new LocalSolrQueryRequest(ultimateResponse.req.getCore(), params);
        checkResponse.rsp = new SolrQueryResponse();

        try {
          queryComponent.prepare(checkResponse);
          queryComponent.process(checkResponse);
          hits = (Integer) checkResponse.rsp.getToLog().get("hits");
        } catch (Exception e) {
          LOG.warn("Exception trying to re-query to check if a spell check possibility would return any hits.", e);
        } finally {
View Full Code Here

Examples of org.apache.tiles.TilesContainer.prepare()

        modelBody.evaluateWithoutWriting();
        expect(request.getApplicationContext()).andReturn(applicationContext).times(2);
        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
        expect(request.getWriter()).andReturn(writer);
        container.prepare("myPreparer", request);
        expect(resolver.computeAttribute(container, attribute, "myName", "myRole", false, "myDefaultValue",
                "myDefaultValueRole", "myDefaultValueType", request)).andReturn(attribute);
        expect(container.startContext(request)).andReturn(attributeContext);
        writer.write("myValue");
        container.endContext(request);
View Full Code Here

Examples of org.apache.tuscany.core.implementation.composite.CompositeComponentImpl.prepare()

        AtomicComponent sourceComponent = builder.build(parent, sourceComponentDefinition, deploymentContext);
        AtomicComponent targetComponent = builder.build(parent, targetComponentDefinition, deploymentContext);

        parent.register(sourceComponent);
        parent.register(targetComponent);
        parent.prepare();
        parent.start();
        scope.onEvent(new CompositeStart(this, parent));
        Source source = (Source) parent.getSystemChild("source").getServiceInstance();
        assertNotNull(source);
        Target target = (Target) parent.getSystemChild("target").getServiceInstance();
View Full Code Here

Examples of org.apache.tuscany.core.wire.InboundInvocationChainImpl.prepare()

        InboundInvocationChain chain = new InboundInvocationChainImpl(operation);
        MockSyncInterceptor interceptor = new MockSyncInterceptor();
        chain.addInterceptor(interceptor);
        chain.addInterceptor(new InvokerInterceptor());
        chain.setTargetInvoker(invoker);
        chain.prepare();
        chains.put(echo, chain);
        WorkContext workContext = EasyMock.createNiceMock(WorkContext.class);
        EasyMock.replay(workContext);
        JDKInboundInvocationHandler handler = new JDKInboundInvocationHandler(chains, workContext);
        assertEquals("foo", handler.invoke(echo, new String[]{"foo"}));
View Full Code Here

Examples of org.apache.tuscany.spi.component.Component.prepare()

        Component component = (Component) build(parent, componentDefinition, deploymentContext);
        if (component instanceof CompositeComponent) {
            CompositeComponent composite = (CompositeComponent) component;
            composite.setScopeContainer(moduleScope);
        }
        component.prepare();
        parent.register(component);
        return component;
    }

    /**
 
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.