Package com.asakusafw.windgate.core

Examples of com.asakusafw.windgate.core.DriverScript


            return "testing";
        }

        @Override
        public DriverScript getDriverScript() {
            DriverScript driver = new DriverScript(
                    "file",
                    Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
            return driver;
        }
View Full Code Here


        configuration.put(JdbcProcess.TABLE.key(), table);
        configuration.put(JdbcProcess.COLUMNS.key(), JdbcDescriptionUtil.join(columns));
        configuration.put(JdbcProcess.JDBC_SUPPORT.key(), supportClass.getName());
        configuration.put(JdbcProcess.OPERATION.key(), JdbcProcess.OperationKind.INSERT_AFTER_TRUNCATE.value());

        return new DriverScript(Constants.JDBC_RESOURCE_NAME, configuration);
    }
View Full Code Here

        FsDescriptionUtil.checkCommonConfig(descriptionClass, modelType, supportClass, path);

        Map<String, String> configuration = new HashMap<String, String>();
        configuration.put(FileProcess.FILE.key(), path);
        configuration.put(StreamProcess.STREAM_SUPPORT.key(), supportClass.getName());
        return new DriverScript(Constants.LOCAL_FILE_RESOURCE_NAME, configuration);
    }
View Full Code Here

        Properties profile = context.getTemplate();
        profile.setProperty("resource.file", FileResourceProvider.class.getName());
        context.put("testing", profile);

        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateExporterDescription description = new MockExporterDescription(
                String.class,
                "testing",
View Full Code Here

        Properties profile = context.getTemplate();
        profile.setProperty("resource.file", FileResourceProvider.class.getName());
        context.put("testing", profile);

        File file = folder.newFile("file");
        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateExporterDescription description = new MockExporterDescription(
                String.class,
                "testing",
View Full Code Here

            out.close();
        } finally {
            output.close();
        }

        DriverScript driver = new DriverScript(
                "file",
                Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
        WindGateExporterDescription description = new MockExporterDescription(
                String.class,
                "testing",
View Full Code Here

        configuration.put(JdbcProcess.COLUMNS.key(), JdbcDescriptionUtil.join(columns));
        configuration.put(JdbcProcess.JDBC_SUPPORT.key(), supportClass.getName());
        if (JdbcDescriptionUtil.isEmpty(condition) == false) {
            configuration.put(JdbcProcess.CONDITION.key(), condition);
        }
        return new DriverScript(Constants.JDBC_RESOURCE_NAME, configuration);
    }
View Full Code Here

        FsDescriptionUtil.checkCommonConfig(descriptionClass, modelType, supportClass, path);

        Map<String, String> configuration = new HashMap<String, String>();
        configuration.put(FileProcess.FILE.key(), path);
        configuration.put(StreamProcess.STREAM_SUPPORT.key(), supportClass.getName());
        return new DriverScript(Constants.LOCAL_FILE_RESOURCE_NAME, configuration);
    }
View Full Code Here

     * simple case.
     */
    @Test
    public void simple() {
        Mock desc = new Mock("example", StringSupport.class);
        DriverScript script = desc.getDriverScript();
        assertThat(script.getResourceName(), is(Constants.LOCAL_FILE_RESOURCE_NAME));
        assertThat(script.getConfiguration().get(FileProcess.FILE.key()), is("example"));
        assertThat(script.getConfiguration().get(StreamProcess.STREAM_SUPPORT.key()), is(StringSupport.class.getName()));
    }
View Full Code Here

        }
        throw new AssertionError(name);
    }

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

TOP

Related Classes of com.asakusafw.windgate.core.DriverScript

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.