Examples of DriverScript


Examples of com.asakusafw.windgate.core.DriverScript

    protected abstract SshConnection openConnection(SshProfile sshProfile, List<String> command) throws IOException;

    private List<String> getPath(ProcessScript<?> proc, DriverScript.Kind kind) throws IOException {
        assert proc != null;
        assert kind != null;
        DriverScript script = proc.getDriverScript(kind);
        String pathString = script.getConfiguration().get(FILE.key());
        if (pathString == null) {
            WGLOG.error("E11001",
                    getName(),
                    proc.getName(),
                    kind.prefix,
View Full Code Here

Examples of com.asakusafw.windgate.core.DriverScript

    private <T> JdbcScript<T> createOppositeJdbcScript(
            ProcessScript<T> process,
            DriverScript.Kind kind) throws IOException {
        assert process != null;
        assert kind != null;
        DriverScript driver = process.getDriverScript(kind);
        if (driver.getResourceName().equals(getName()) == false) {
            throw new IllegalArgumentException(MessageFormat.format(
                    "Invalid resource: {0} (direction={1})",
                    process.getName(),
                    kind.prefix));
        }
View Full Code Here

Examples of com.asakusafw.windgate.core.DriverScript

        rebuilt.remove(JdbcProcess.OPERATION.key());
        return new ProcessScript<T>(
                script.getName(),
                script.getProcessType(),
                script.getDataClass(),
                new DriverScript(script.getDrainScript().getResourceName(), rebuilt),
                script.getSourceScript());
    }
View Full Code Here

Examples of com.asakusafw.windgate.core.DriverScript

        return new ProcessScript<T>(
                script.getName(),
                script.getProcessType(),
                script.getDataClass(),
                script.getDrainScript(),
                new DriverScript(script.getSourceScript().getResourceName(), rebuilt));
    }
View Full Code Here

Examples of com.asakusafw.windgate.core.DriverScript

            buf.append(" ");
        }
        return new ProcessScript<Text>(
                "testing", "default", Text.class,
                d(resource, buf.toString().trim()),
                new DriverScript("DUMMY", Collections.<String, String>emptyMap()));
    }
View Full Code Here

Examples of com.asakusafw.windgate.core.DriverScript

            buf.append(file);
            buf.append(" ");
        }
        return new ProcessScript<Text>(
                "testing", "default", Text.class,
                new DriverScript("DUMMY", Collections.<String, String>emptyMap()),
                d(resource, buf.toString().trim()));
    }
View Full Code Here

Examples of com.asakusafw.windgate.core.DriverScript

                new DriverScript("DUMMY", Collections.<String, String>emptyMap()),
                d(resource, buf.toString().trim()));
    }

    private DriverScript d(String name, String file) {
        return new DriverScript(
                name,
                file == null ?
                        Collections.<String, String>emptyMap() :
                            Collections.singletonMap(FileProcess.FILE.key(), file));
    }
View Full Code Here

Examples of com.asakusafw.windgate.core.DriverScript

                d(sourceName, sourceFile),
                d(drainName, drainFile));
    }

    private DriverScript d(String name, String file) {
        return new DriverScript(
                name,
                file == null ?
                        Collections.<String, String>emptyMap() :
                            Collections.singletonMap(FileProcess.FILE.key(), file));
    }
View Full Code Here

Examples of com.asakusafw.windgate.core.DriverScript

        provider.execute(factory, script); // no exceptions
    }

    private DriverScript driver(String name) {
        return new DriverScript(name, Collections.<String, String>emptyMap());
    }
View Full Code Here

Examples of com.asakusafw.windgate.core.DriverScript

     * Simple case.
     */
    @Test
    public void simple() {
        Mock mock = new Mock(String.class, "testing", StringSupport.class, "TESTING", "VALUE");
        DriverScript script = mock.getDriverScript();
        assertThat(script.getResourceName(), is(Constants.JDBC_RESOURCE_NAME));
        Map<String, String> conf = script.getConfiguration();
        assertThat(conf.size(), is(4));
        assertThat(conf.get(JdbcProcess.TABLE.key()), is("TESTING"));
        assertThat(conf.get(JdbcProcess.COLUMNS.key()), equalToIgnoringWhiteSpace("VALUE"));
        assertThat(conf.get(JdbcProcess.JDBC_SUPPORT.key()), is(StringSupport.class.getName()));
        assertThat(conf.get(JdbcProcess.OPERATION.key()), is(not(nullValue())));
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.