2
0
Fork 0

Refactored internal api

This commit is contained in:
Willem Cazander 2012-06-04 22:49:12 +02:00
parent 3f31bb8a3a
commit 6ccd763d1f
361 changed files with 23049 additions and 4498 deletions

View file

@ -2,11 +2,14 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>vasc-test</artifactId>
<groupId>net.forwardfire.vasc</groupId>
<groupId>net.forwardfire.vasc.test</groupId>
<version>0.3.5-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>vasc-test-frontend-data</artifactId>
<packaging>jar</packaging>
<name>vasc-test-frontend-data</name>
<description>vasc-test-frontend-data</description>
<dependencies>
<dependency>
<groupId>net.forwardfire.vasc</groupId>

View file

@ -27,8 +27,10 @@ import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryControllerLocal;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.VascEntryLocal;
import net.forwardfire.vasc.impl.DefaultVascEntry;
import net.forwardfire.vasc.impl.DefaultVascEntryField;
import net.forwardfire.vasc.impl.DefaultVascEntryListOption;
import net.forwardfire.vasc.impl.DefaultVascFactory;
/**
@ -40,7 +42,7 @@ import net.forwardfire.vasc.impl.DefaultVascFactory;
public class TestModelData {
public VascController getTestVascController() throws Exception {
VascController c = DefaultVascFactory.getDefaultVascController(1234L,"Nice UserName","user","role_admin");
VascController c = DefaultVascFactory.getDefaultVascController();
// for test
TestModelVascDataSource backends = new TestModelVascDataSource();
@ -55,16 +57,16 @@ public class TestModelData {
return c;
}
public VascEntry getTestEntry(VascController vc) {
return vc.getVascEntryController().getVascEntryById("orderModel");
public VascEntryLocal getTestEntry(VascController vc) {
return (VascEntryLocal)vc.getVascEntryController().getVascEntryById("orderModel");
}
public void createVascEntries(VascController vc,VascEntryControllerLocal vecl) throws Exception {
VascEntry ve = new DefaultVascEntry();
DefaultVascEntry ve = new DefaultVascEntry();
ve.setId("orderModel");
ve.setBackendId("orderModelBackend");
VascEntryField field = new DefaultVascEntryField();
DefaultVascEntryField field = new DefaultVascEntryField();
field.setId("name");
ve.addVascEntryField(field);
@ -93,13 +95,13 @@ public class TestModelData {
ve.addVascEntryField(field);
// table options
field = new DefaultVascEntryField();
field.setId("active");
field.setVascEntryFieldType(vc.getVascEntryFieldTypeController().getVascEntryFieldTypeById("BooleanField"));
field.setBackendName("active");
field.setDefaultValue("true"); // obj does also work ! we are first need to fix string defaults.
DefaultVascEntryListOption option = new DefaultVascEntryListOption();
option.setId("active");
option.setVascEntryFieldType(vc.getVascEntryFieldTypeController().getVascEntryFieldTypeById("BooleanField"));
option.setBackendName("active");
option.setDefaultValue("true"); // obj does also work ! we are first need to fix string defaults.
ve.addListOption(field);
ve.addVascEntryListOption(option);
vecl.addVascEntry(ve);

View file

@ -32,7 +32,7 @@ import java.util.ResourceBundle;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.VascEntryFieldSet;
import net.forwardfire.vasc.core.VascLinkEntry;
import net.forwardfire.vasc.core.VascEntryLink;
import net.forwardfire.vasc.core.actions.VascAction;
@ -76,12 +76,12 @@ public class VascBundleCheckEntryKeys {
keys.put(s.getDescription(), s.getId());
keys.put(s.getImage(), s.getId());
}
for (VascEntryField vef:ve.getListOptions()) {
for (VascEntryField vef:ve.getVascEntryListOptions()) {
keys.put(vef.getName(), vef.getId());
keys.put(vef.getImage(), vef.getId());
keys.put(vef.getDescription(), vef.getId());
}
for (VascLinkEntry vef:ve.getVascLinkEntries()) {
for (VascEntryLink vef:ve.getVascEntryLinks()) {
keys.put(vef.getName(), vef.getId());
}
for (VascAction a:ve.getGlobalActions()) {