org.disl.workflow.DislLauncher.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of disl Show documentation
Show all versions of disl Show documentation
disl = data integration specific language. Goal of this project is to implement groovy based domain specific language supporting modelling of data integration projects. Disl will support data modeling and data mapping including support for MDA transformations and unit testing.
/*
* Copyright 2015 Karel H?bl .
*
* This file is part of disl.
*
* Disl is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Disl is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Disl. If not, see .
*/
package org.disl.workflow
import org.disl.meta.Context
import org.disl.meta.MetaFactory
/**
* Launcher for data integration processes implemented in DISL.
* */
class DislLauncher {
String[] arguments
String className
String contextName="default"
/**
* Main methods expecting 2 arguments.
* First argument is className of Executable implementing DISL data integration process.
* Second argument is name of context which will be used for execution. This argument is optional, default context will be used by default.
* */
public static void main(String[] args) {
new DislLauncher(arguments: args).execute()
}
public void execute() {
init()
Context.setContextName(getContextName());
def executable=MetaFactory.create(Class.forName(getClassName()))
executable.execute()
}
protected void init() {
if (arguments.length<1 || arguments.length>2) {
throw new IllegalArgumentException("Invalid argument count. Usage: [className] ([contextName])");
}
className=arguments[0]
if (arguments.length==2) {
contextName=arguments[1]
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy