2
0
Fork 0

Split backend to backend api.

This commit is contained in:
Willem Cazander 2014-03-02 19:45:22 +01:00
parent 4bd244f4e5
commit a13719f008
116 changed files with 1029 additions and 815 deletions

View file

@ -45,8 +45,9 @@ import net.forwardfire.vasc.demo.server.tomcat.TomcatService;
* @author Willem Cazander
* @version 1.0 May 3, 2012
*/
public class VascTechDemoStartup {
public enum VascTechDemoStartup {
INSTANCE;
private Logger logger = null;
private ServerConfigService serverConfigService = null;
private DatabaseService databaseService = null;
@ -54,16 +55,15 @@ public class VascTechDemoStartup {
private VascControllerService vascControllerService = null;
private ServerGuiService swingGuiService = null;
private VascTechDemoBuildInfo buildInfo = null;
static private VascTechDemoStartup instance = null;
private volatile boolean shutdownOnce = false;
/**
* Starts this VascTechDemo instance
* @param args
*/
static public void main(String[] args) {
instance = new VascTechDemoStartup();
instance.initialize(args);
instance.startup();
INSTANCE.initialize(args);
INSTANCE.startup();
}
/**
@ -220,10 +220,10 @@ public class VascTechDemoStartup {
}
public void shutdown() {
if (instance==null) {
if (shutdownOnce) {
return;
}
shutdownOnce = true;
Thread t = new Thread(new Runnable() {
public void run() {
try {
@ -238,8 +238,6 @@ public class VascTechDemoStartup {
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
} finally {
instance = null;
}
}
});
@ -248,7 +246,7 @@ public class VascTechDemoStartup {
}
static public VascTechDemoStartup getInstance() {
return instance;
return INSTANCE;
}
public boolean isMavenRun() {

View file

@ -105,7 +105,7 @@ public class VascControllerService {
VascDriver driver = VascDriver.getInstance();
X4OReader<VascController> reader = driver.createReader();
driver.addVascController(reader, vascController);
reader.readResource("net/forwardfire/vasc/lib/editor/vasc-edit.xml");
reader.readResource("net/forwardfire/vasc/opt/editor/vasc-editor.xml");
DefaultVascFactory.fillVascControllerLocalEntries((VascEntryControllerLocal) vascController.getVascEntryController(), vascController);
vascController.getVascEventChannelController().fireEvent(VascEventControllerType.LOAD_ENTRIES_AFTER, vascController);

View file

@ -36,7 +36,7 @@ import javax.swing.JLabel;
import javax.swing.JPanel;
import net.forwardfire.vasc.backend.metamodel.MetaModelDataContextCsv;
import net.forwardfire.vasc.backend.metamodel.MetaModelSchemaAutoEntry;
import net.forwardfire.vasc.opt.metamodel.MetaModelSchemaAutoEntry;
/**
* JDialogMetaCsv Add and runs MetaModel Schema Auto Entry code.

View file

@ -24,7 +24,6 @@ package net.forwardfire.vasc.demo.server.ui.load;
import net.forwardfire.vasc.backend.metamodel.MetaModelDataContextJdbc;
import net.forwardfire.vasc.backend.metamodel.MetaModelDataContextMongodb;
import net.forwardfire.vasc.backend.metamodel.MetaModelSchemaAutoEntry;
import net.forwardfire.vasc.backend.metamodel.MetaModelVascBackend;
import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.core.VascEntry;
@ -33,6 +32,7 @@ import net.forwardfire.vasc.core.VascEntryFieldType;
import net.forwardfire.vasc.core.VascEntryLink;
import net.forwardfire.vasc.core.VascEntryLinkType;
import net.forwardfire.vasc.impl.ui.VascSelectItemModelEntry;
import net.forwardfire.vasc.opt.metamodel.MetaModelSchemaAutoEntry;
import org.x4o.xml.io.sax.ext.ContentWriterXml;
import org.xml.sax.SAXException;
@ -68,7 +68,6 @@ public class LoadVascXmlWriter {
autoEntry.setEntryPrefix(model.name);
autoEntry.setDataContextProvider(model.dcProvider);
autoEntry.getTables().addAll(model.tables);
autoEntry.autoFillResult(vc);
xmlWriter.startDocument();