wip made remote ejb working over http
This commit is contained in:
parent
d4e537a2bf
commit
2a0d992642
393 changed files with 8916 additions and 3872 deletions
|
|
@ -3,18 +3,23 @@
|
|||
<parent>
|
||||
<artifactId>vasc</artifactId>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<version>0.3.5-SNAPSHOT</version>
|
||||
<version>0.4.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<artifactId>vasc-core</artifactId>
|
||||
<version>0.3.5-SNAPSHOT</version>
|
||||
<version>0.4.1-SNAPSHOT</version>
|
||||
<name>vasc-core</name>
|
||||
<description>vasc-core</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.x4o</groupId>
|
||||
<artifactId>x4o-core</artifactId>
|
||||
<version>${x4o-core.version}</version>
|
||||
<version>${x4o.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.x4o</groupId>
|
||||
<artifactId>x4o-meta</artifactId>
|
||||
<version>${x4o.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
|
|
@ -38,5 +43,11 @@
|
|||
<version>${hibernate-validator.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.odysseus.juel</groupId>
|
||||
<artifactId>juel</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -26,9 +26,9 @@ import java.io.Serializable;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.ui.VascSelectItem;
|
||||
import net.forwardfire.vasc.core.ui.VascSelectItemModel;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.backend;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* AbstractVascBackendControllerLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 5, 2012
|
||||
*/
|
||||
abstract public class AbstractVascBackendControllerLocal implements VascBackendControllerLocal {
|
||||
|
||||
private Map<String,VascBackend> backends = null;
|
||||
|
||||
public AbstractVascBackendControllerLocal() {
|
||||
backends = new HashMap<String,VascBackend>(1000);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackendController#getVascBackendById(java.lang.String)
|
||||
*/
|
||||
public VascBackend getVascBackendById(String id) {
|
||||
return backends.get(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackendController#getVascBackendIds()
|
||||
*/
|
||||
public List<String> getVascBackendIds() {
|
||||
List<String> result = new ArrayList<String>(50);
|
||||
for (String id:backends.keySet()) {
|
||||
result.add(id);
|
||||
}
|
||||
Collections.sort(result); // lets do abc for consistance behauvior.
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackendControllerLocal#addVascBackend(net.forwardfire.vasc.backend.VascBackend)
|
||||
*/
|
||||
public void addVascBackend(VascBackend backend) {
|
||||
if (backend==null) {
|
||||
throw new NullPointerException("backend must not be null.");
|
||||
}
|
||||
if (backend.getId()==null) {
|
||||
throw new IllegalArgumentException("The backend must have an id.");
|
||||
}
|
||||
backend.startBackend();
|
||||
backends.put(backend.getId(), backend);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackendControllerLocal#removeVascBackendById(java.lang.String)
|
||||
*/
|
||||
public void removeVascBackendById(String backendId) {
|
||||
VascBackend backend = getVascBackendById(backendId);
|
||||
if (backend==null) {
|
||||
throw new NullPointerException("Could not find backend to remove with id: "+backendId);
|
||||
}
|
||||
backend.stopBackend();
|
||||
backends.remove(backendId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackendControllerLocal#clearAndStopBackends()
|
||||
*/
|
||||
public void clearAndStopBackends() {
|
||||
for (String backendId:getVascBackendIds()) {
|
||||
removeVascBackendById(backendId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -27,9 +27,9 @@ import java.util.Map;
|
|||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryRecordCreator;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ import net.forwardfire.vasc.core.VascEntryLinkLocal;
|
|||
import net.forwardfire.vasc.core.VascEntryListOption;
|
||||
import net.forwardfire.vasc.core.VascEntryListOptionLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.VascEntryLink;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryRecordCreator;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.impl.DefaultVascEntry;
|
||||
import net.forwardfire.vasc.impl.DefaultVascEntryField;
|
||||
import net.forwardfire.vasc.impl.DefaultVascEntryFieldSet;
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
package net.forwardfire.vasc.backend.data;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
import org.x4o.xml.impl.DefaultElementObjectPropertyValue;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ package net.forwardfire.vasc.backend.data;
|
|||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryRecordCreator;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* BeanVascEntryRecordCreator creates a new backend record based on class object.
|
||||
|
|
@ -47,7 +48,13 @@ public class BeanVascEntryRecordCreator implements VascEntryRecordCreator {
|
|||
return resultClass;
|
||||
}
|
||||
|
||||
public Object newRecord(VascEntry entry) throws Exception {
|
||||
return resultClass.newInstance();
|
||||
public Object newRecord(VascEntry entry) throws VascException {
|
||||
try {
|
||||
return resultClass.newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
throw new VascException(e);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new VascException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ package net.forwardfire.vasc.backend.data;
|
|||
import java.util.Map;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* MapVascEntryFieldValue provides get/set support on Map record object.
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import java.util.Map;
|
|||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryRecordCreator;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* MapVascEntryRecordCreator creates a new HashMap for Map based record backends.
|
||||
|
|
@ -42,7 +43,7 @@ public class MapVascEntryRecordCreator implements VascEntryRecordCreator {
|
|||
return Map.class;
|
||||
}
|
||||
|
||||
public Object newRecord(VascEntry entry) throws Exception {
|
||||
public Object newRecord(VascEntry entry) throws VascException {
|
||||
return new HashMap<String,Object>(10);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ import net.forwardfire.vasc.backend.VascBackend;
|
|||
import net.forwardfire.vasc.backend.VascBackendState;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryRecordCreator;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ import java.util.List;
|
|||
import net.forwardfire.vasc.backend.VascBackend;
|
||||
import net.forwardfire.vasc.backend.VascBackendState;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryBackendEventListener;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryBackendEventListener.VascBackendEventType;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* Holds !! and fires the backend event listeners.
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ import java.util.List;
|
|||
|
||||
import net.forwardfire.vasc.backend.VascBackendState;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* Simple text search
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ import java.util.List;
|
|||
import net.forwardfire.vasc.backend.VascBackendState;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascEntryFieldLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* Add an sortware sort an a backend
|
||||
|
|
@ -60,6 +60,15 @@ public class VascBackendProxySort extends AbstractVascBackendProxy {
|
|||
return true;
|
||||
}
|
||||
|
||||
public VascEntryField getVascEntryFieldByBackendName(String linkId) {
|
||||
for (VascEntryField a:entry.getVascEntryFields()) {
|
||||
if (a.getBackendName().equals(linkId)) {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackend#execute(VascBackendState state)
|
||||
*/
|
||||
|
|
@ -71,7 +80,7 @@ public class VascBackendProxySort extends AbstractVascBackendProxy {
|
|||
return result;
|
||||
}
|
||||
try {
|
||||
final VascEntryField field = entry.getVascEntryFieldById(state.getSortField());
|
||||
final VascEntryField field = getVascEntryFieldByBackendName(state.getSortField());
|
||||
final VascEntryFieldValue fieldValue = backend.provideVascEntryFieldValue(((VascEntryFieldLocal)field).clone()); // TODO fixme
|
||||
Collections.sort(result, new Comparator<Object>() {
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* AbstractVascEntryFieldLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 5, 2012
|
||||
*/
|
||||
abstract public class AbstractVascEntryControllerLocal implements VascEntryControllerLocal {
|
||||
|
||||
private Map<String,VascEntryLocal> entries = null;
|
||||
|
||||
public AbstractVascEntryControllerLocal() {
|
||||
entries = new HashMap<String,VascEntryLocal>(1000);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryControllerLocal#addVascEntry(net.forwardfire.vasc.core.VascEntry)
|
||||
*/
|
||||
public void addVascEntry(VascEntryLocal entry) {
|
||||
if (entry==null) {
|
||||
throw new NullPointerException("Can't add null VascEntry.");
|
||||
}
|
||||
if (entry.getId()==null) {
|
||||
throw new NullPointerException("Can't add VascEntry with null Id.");
|
||||
}
|
||||
entries.put(entry.getId(), entry);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryControllerLocal#removeVascEntry(java.lang.String)
|
||||
*/
|
||||
public void removeVascEntry(String entryId) {
|
||||
entries.remove(entryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryController#getVascEntryById(java.lang.String)
|
||||
*/
|
||||
public VascEntry getVascEntryById(String id) {
|
||||
VascEntryLocal entry = entries.get(id);
|
||||
if (entry==null) {
|
||||
throw new NullPointerException("Could not find vasc entry with id: "+id);
|
||||
}
|
||||
try {
|
||||
return entry.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new NullPointerException("Could not clone entry: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryControllerLocal#getMasterVascEntryById(java.lang.String)
|
||||
*/
|
||||
public VascEntryLocal getMasterVascEntryById(String entryId) {
|
||||
VascEntryLocal entry = entries.get(entryId);
|
||||
return entry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryController#getVascEntryIds()
|
||||
*/
|
||||
public List<String> getVascEntryIds() {
|
||||
List<String> result = new ArrayList<String>(entries.keySet());
|
||||
Collections.sort(result); // lets do abc for consistance behauvior.
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -32,6 +32,7 @@ import org.x4o.xml.conv.ObjectConverter;
|
|||
import net.forwardfire.vasc.core.base.AbstractVascBaseIdLocal;
|
||||
import net.forwardfire.vasc.core.ui.VascUIComponent;
|
||||
import net.forwardfire.vasc.core.ui.VascValueModel;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.validators.VascValidator;
|
||||
|
||||
/**
|
||||
|
|
@ -59,7 +60,7 @@ abstract public class AbstractVascEntryFieldTypeLocal extends AbstractVascBaseId
|
|||
|
||||
@Override
|
||||
public VascEntryFieldTypeLocal clone() throws CloneNotSupportedException {
|
||||
Object clone = cloneCreate();
|
||||
Object clone = super.cloneCreate();
|
||||
cloneFields(clone);
|
||||
return (VascEntryFieldTypeLocal)clone;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,29 +52,29 @@ abstract public class AbstractVascEntryLocal extends AbstractVascBaseIdRoleCrudL
|
|||
private String helpId = null;
|
||||
private String image = null;
|
||||
|
||||
private String listDescription = null;
|
||||
private String listImage = null;
|
||||
private String editDescription = null;
|
||||
private String editImage = null;
|
||||
private String deleteDescription = null;
|
||||
private String deleteImage = null;
|
||||
private String createDescription = null;
|
||||
private String createImage = null;
|
||||
|
||||
private String primaryKeyFieldId = null;
|
||||
private String displayNameFieldId = null;
|
||||
private String listDescription = null;
|
||||
private String listImage = null;
|
||||
private String editDescription = null;
|
||||
private String editImage = null;
|
||||
private String deleteDescription = null;
|
||||
private String deleteImage = null;
|
||||
private String createDescription = null;
|
||||
private String createImage = null;
|
||||
|
||||
private Boolean vascDisplayOnly = null; // todo rename
|
||||
private Boolean delete = null;
|
||||
private String rolesDelete = null;
|
||||
private String primaryKeyFieldId = null;
|
||||
private String displayNameFieldId = null;
|
||||
|
||||
private Boolean vascDisplayOnly = null; // todo rename
|
||||
private Boolean delete = null;
|
||||
private String rolesDelete = null;
|
||||
|
||||
private List<VascEntryFieldLocal> vascFields = null;
|
||||
private List<RowVascActionLocal> rowActions = null;
|
||||
private List<ColumnVascActionLocal> columnActions = null;
|
||||
private List<GlobalVascActionLocal> globalActions = null;
|
||||
private List<GlobalVascActionLocal> exportActions = null;
|
||||
private List<VascEntryFieldSetLocal> vascEntryFieldSets = null;
|
||||
private List<VascEntryLinkLocal> vascEntryLinks = null;
|
||||
private List<VascEntryFieldLocal> vascFields = null;
|
||||
private List<RowVascActionLocal> rowActions = null;
|
||||
private List<ColumnVascActionLocal> columnActions = null;
|
||||
private List<GlobalVascActionLocal> globalActions = null;
|
||||
private List<GlobalVascActionLocal> exportActions = null;
|
||||
private List<VascEntryFieldSetLocal> vascEntryFieldSets = null;
|
||||
private List<VascEntryLinkLocal> vascEntryLinks = null;
|
||||
|
||||
private Map<String,Object> entryParameters = null;
|
||||
private VascEntryFieldEventChannel vascEntryFieldEventChannel = null;
|
||||
|
|
@ -84,28 +84,28 @@ abstract public class AbstractVascEntryLocal extends AbstractVascBaseIdRoleCrudL
|
|||
private List<VascBackendFilter> backendFilters = null;
|
||||
private Map<String,List<String>> eventEntryFrontendActions = null;
|
||||
|
||||
private String backendId = null;
|
||||
private VascFrontendController vascFrontendData = null;
|
||||
|
||||
public AbstractVascEntryLocal() {
|
||||
vascFields = new ArrayList<VascEntryFieldLocal>(20);
|
||||
|
||||
rowActions = new ArrayList<RowVascActionLocal>(10);
|
||||
columnActions = new ArrayList<ColumnVascActionLocal>(5);
|
||||
globalActions = new ArrayList<GlobalVascActionLocal>(5);
|
||||
exportActions = new ArrayList<GlobalVascActionLocal>(10);
|
||||
|
||||
vascEntryFieldSets = new ArrayList<VascEntryFieldSetLocal>(10);
|
||||
vascEntryLinks = new ArrayList<VascEntryLinkLocal>(10);
|
||||
entryParameters = new HashMap<String,Object>(10);
|
||||
|
||||
eventEntryFrontendActions = new HashMap<String,List<String>>(10);
|
||||
eventEntryFrontendEventListeners = new HashMap<String,List<String>>(10);
|
||||
eventEntryBackendEventListeners = new ArrayList<String>(10);
|
||||
vascEntryListOptions = new ArrayList<VascEntryListOptionLocal>(10);
|
||||
backendFilters = new ArrayList<VascBackendFilter>(3);
|
||||
}
|
||||
|
||||
private String backendId = null;
|
||||
private VascFrontendController vascFrontendData = null;
|
||||
|
||||
public AbstractVascEntryLocal() {
|
||||
vascFields = new ArrayList<VascEntryFieldLocal>(20);
|
||||
|
||||
rowActions = new ArrayList<RowVascActionLocal>(10);
|
||||
columnActions = new ArrayList<ColumnVascActionLocal>(5);
|
||||
globalActions = new ArrayList<GlobalVascActionLocal>(5);
|
||||
exportActions = new ArrayList<GlobalVascActionLocal>(10);
|
||||
|
||||
vascEntryFieldSets = new ArrayList<VascEntryFieldSetLocal>(10);
|
||||
vascEntryLinks = new ArrayList<VascEntryLinkLocal>(10);
|
||||
entryParameters = new HashMap<String,Object>(10);
|
||||
|
||||
eventEntryFrontendActions = new HashMap<String,List<String>>(10);
|
||||
eventEntryFrontendEventListeners = new HashMap<String,List<String>>(10);
|
||||
eventEntryBackendEventListeners = new ArrayList<String>(10);
|
||||
vascEntryListOptions = new ArrayList<VascEntryListOptionLocal>(10);
|
||||
backendFilters = new ArrayList<VascBackendFilter>(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VascEntryLocal clone() throws CloneNotSupportedException {
|
||||
Object clone = cloneCreate();
|
||||
|
|
|
|||
|
|
@ -187,14 +187,15 @@ public interface VascEntry extends VascBaseIdRoleCrud {
|
|||
*/
|
||||
public VascEntryLink getVascEntryLinkById(String linkId);
|
||||
|
||||
public Object getEntryParameter(String key);
|
||||
|
||||
public List<String> getEntryParameterKeys();
|
||||
|
||||
public VascFrontendController getVascFrontendController();
|
||||
|
||||
public String getBackendId();
|
||||
|
||||
public Object getEntryParameter(String key);
|
||||
public void setEntryParameter(String key,Object value);
|
||||
public void removeEntryParameter(String key);
|
||||
public List<String> getEntryParameterKeys();
|
||||
|
||||
public VascFrontendController getVascFrontendController();
|
||||
|
||||
public String getBackendId();
|
||||
|
||||
/**
|
||||
* @return the vascDisplayOnly
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
|||
|
||||
import net.forwardfire.vasc.backend.VascBackend;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryExporter;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* Interface to make default fill/etc config plugable.
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
package net.forwardfire.vasc.core;
|
||||
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* Finalizes the VascEntry so it is ready to use.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import org.x4o.xml.conv.ObjectConverter;
|
|||
import net.forwardfire.vasc.core.base.VascBaseId;
|
||||
import net.forwardfire.vasc.core.ui.VascUIComponent;
|
||||
import net.forwardfire.vasc.core.ui.VascValueModel;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.validators.VascValidator;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -221,9 +221,6 @@ public interface VascEntryLocal extends VascEntry,VascBaseIdRoleCrudLocal {
|
|||
*/
|
||||
public Collection<VascEntryLinkLocal> getVascEntryLinksLocal();
|
||||
|
||||
public void setEntryParameter(String key,Object value);
|
||||
public void removeEntryParameter(String key);
|
||||
|
||||
|
||||
public void setVascFrontendController(VascFrontendController vascFrontendData);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,11 +24,12 @@ package net.forwardfire.vasc.core;
|
|||
|
||||
|
||||
/**
|
||||
* VascEventChannelController
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Oct 27, 2008
|
||||
*/
|
||||
public interface VascEventChannelController {
|
||||
|
||||
public void publishEntryEvent(String entryId);
|
||||
public void fireEvent(VascEventControllerType eventType,Object eventObject);
|
||||
}
|
||||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
package net.forwardfire.vasc.core;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -30,5 +32,9 @@ package net.forwardfire.vasc.core;
|
|||
*/
|
||||
public interface VascEventChannelControllerLocal extends VascEventChannelController {
|
||||
|
||||
List<VascEventControllerListener> getVascEventControllerListeners();
|
||||
|
||||
void addVascEventControllerListener(VascEventControllerListener listener);
|
||||
|
||||
void removeVascEventControllerListener(VascEventControllerListener listener);
|
||||
}
|
||||
|
|
@ -20,19 +20,18 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontend;
|
||||
|
||||
import java.util.EventListener;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
package net.forwardfire.vasc.core;
|
||||
|
||||
|
||||
/**
|
||||
* VascEventControllerListener for backend runtime events.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Aug 12, 2007
|
||||
* @version 1.0 Oct 6, 2012
|
||||
*/
|
||||
public interface VascFrontendExceptionHandler extends EventListener {
|
||||
public interface VascEventControllerListener {
|
||||
|
||||
public void handleException(Exception e,VascFrontend vascFrontend,VascEntry entry);
|
||||
VascEventControllerType[] getVascEventControllerTypes();
|
||||
|
||||
void controllerEvent(VascEventControllerType type,Object eventObject);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core;
|
||||
|
||||
|
||||
/**
|
||||
* VascEventControllerType for backend runtime events.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Oct 6, 2012
|
||||
*/
|
||||
public enum VascEventControllerType {
|
||||
|
||||
LOAD_ENTRIES_BEFORE,
|
||||
LOAD_ENTRIES_AFTER,
|
||||
|
||||
VASC_ENTRY_CLONE
|
||||
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
package net.forwardfire.vasc.core.actions;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -31,5 +32,5 @@ import net.forwardfire.vasc.core.VascEntry;
|
|||
*/
|
||||
public interface GlobalVascAction extends VascAction {
|
||||
|
||||
public void doGlobalAction(VascEntry vascEntry) throws Exception;
|
||||
public void doGlobalAction(VascEntry vascEntry) throws VascException;
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
package net.forwardfire.vasc.core.actions;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -33,6 +34,6 @@ public interface RowVascAction extends VascAction {
|
|||
|
||||
public boolean isMultiRowAction();
|
||||
|
||||
public void doRowAction(VascEntry vascEntry,Object rowObject) throws Exception;
|
||||
public void doRowAction(VascEntry vascEntry,Object rowObject) throws VascException;
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* AbstractVascBaseClone
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
abstract public class AbstractVascBaseClone implements VascBaseClone {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* AbstractVascBaseIdLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
abstract public class AbstractVascBaseIdLocal extends AbstractVascBaseClone implements VascBaseIdLocal {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* AbstractVascBaseIdRoleCrudLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
abstract public class AbstractVascBaseIdRoleCrudLocal extends AbstractVascBaseIdRoleViewLocal implements VascBaseIdRoleCrudLocal {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* AbstractVascBaseIdRoleCrudOrderLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
abstract public class AbstractVascBaseIdRoleCrudOrderLocal extends AbstractVascBaseIdRoleCrudLocal implements VascBaseIdRoleCrudOrderLocal {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* AbstractVascBaseIdRoleCrudOrderMetaLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
abstract public class AbstractVascBaseIdRoleCrudOrderMetaLocal extends AbstractVascBaseIdRoleCrudOrderLocal implements VascBaseIdRoleCrudOrderMetaLocal {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* AbstractVascBaseIdRoleViewLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
abstract public class AbstractVascBaseIdRoleViewLocal extends AbstractVascBaseIdLocal implements VascBaseIdRoleViewLocal {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* AbstractVascBaseIdRoleViewOrderLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
abstract public class AbstractVascBaseIdRoleViewOrderLocal extends AbstractVascBaseIdRoleViewLocal implements VascBaseIdRoleViewOrderLocal {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* AbstractVascBaseIdRoleViewOrderMetaLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
abstract public class AbstractVascBaseIdRoleViewOrderMetaLocal extends AbstractVascBaseIdRoleViewOrderLocal implements VascBaseIdRoleViewOrderMetaLocal {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,35 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* VascBaseClone
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseClone extends Cloneable,Serializable {
|
||||
|
||||
/* moved to abstract for private
|
||||
|
|
|
|||
|
|
@ -1,6 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
|
||||
/**
|
||||
* VascBaseId
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseId extends VascBaseClone {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdLocal extends VascBaseId {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdMetaData
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdMetaData extends VascBaseId {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdMetaDataLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdMetaDataLocal extends VascBaseIdMetaData,VascBaseIdLocal {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleCrudLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleCrud extends VascBaseIdRoleView {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleCrudLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleCrudLocal extends VascBaseIdRoleCrud,VascBaseIdRoleViewLocal,VascBaseIdLocal {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleCrudOrder
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleCrudOrder extends VascBaseIdRoleCrudLocal {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleCrudOrderLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleCrudOrderLocal extends VascBaseIdRoleCrudOrder,VascBaseIdRoleViewOrderLocal {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleCrudOrderMeta
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleCrudOrderMeta extends VascBaseIdRoleCrudOrder,VascBaseIdMetaData {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleView
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleCrudOrderMetaLocal extends VascBaseIdRoleCrudOrderMeta,VascBaseIdRoleCrudOrderLocal,VascBaseIdMetaDataLocal {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleView
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleView extends VascBaseId {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleViewLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleViewLocal extends VascBaseIdLocal,VascBaseIdRoleView {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleViewOrder
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleViewOrder extends VascBaseIdRoleView {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleViewOrderLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleViewOrderLocal extends VascBaseIdRoleViewOrder,VascBaseIdRoleViewLocal {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleViewOrderMeta
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleViewOrderMeta extends VascBaseIdRoleViewOrder,VascBaseIdMetaData {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,33 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.core.base;
|
||||
|
||||
/**
|
||||
* VascBaseIdRoleViewOrderMetaLocal
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Jun 2, 2012
|
||||
*/
|
||||
public interface VascBaseIdRoleViewOrderMetaLocal extends VascBaseIdRoleViewOrderMeta,VascBaseIdRoleViewOrderLocal,VascBaseIdMetaDataLocal {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import net.forwardfire.vasc.core.VascException;
|
|||
|
||||
|
||||
/**
|
||||
* VascEntryFieldValue
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Mar 21, 2007
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ package net.forwardfire.vasc.core.entry;
|
|||
import java.io.Serializable;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ import net.forwardfire.vasc.core.VascEntry;
|
|||
*/
|
||||
public interface VascEntryRecordCreator extends Serializable {
|
||||
|
||||
public Object newRecord(VascEntry entry) throws Exception;
|
||||
public Object newRecord(VascEntry entry) throws VascException;
|
||||
|
||||
public Class<?> getObjectClass();
|
||||
}
|
||||
|
|
@ -26,6 +26,7 @@ import net.forwardfire.vasc.core.VascEntryField;
|
|||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* VascColumnValueModelListener
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Aug 12, 2007
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
package net.forwardfire.vasc.core.ui;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascEntryListOption;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
|
|
@ -47,10 +46,10 @@ public class VascOptionValueModelListener implements VascValueModelListener {
|
|||
String key = vascEntryListOption.getBackendName();
|
||||
Object value = model.getValue();
|
||||
if (value==null && vascEntryListOption.getOptional()!=null && vascEntryListOption.getOptional()) {
|
||||
vascEntryListOption.getVascEntry().getVascFrontendController().getVascEntryState().getVascBackendState().removeDataParameter(key); // null is a value except if optional
|
||||
vascEntryListOption.getVascEntry().removeEntryParameter(key); // null is a value except if optional
|
||||
return;
|
||||
}
|
||||
vascEntryListOption.getVascEntry().getVascFrontendController().getVascEntryState().getVascBackendState().setDataParameter(key, value); // TODO: check this
|
||||
vascEntryListOption.getVascEntry().setEntryParameter(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import net.forwardfire.vasc.core.VascException;
|
|||
|
||||
|
||||
/**
|
||||
* VascValueModel
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Aug 12, 2007
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ import java.util.logging.Logger;
|
|||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
|
||||
|
||||
/**
|
||||
* AbstractVascFrontend
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Aug 2, 2007
|
||||
|
|
@ -55,7 +55,7 @@ abstract public class AbstractVascFrontend implements VascFrontend {
|
|||
/**
|
||||
* @see net.forwardfire.vasc.frontend.VascFrontend#initEntry(net.forwardfire.vasc.core.VascEntry)
|
||||
*/
|
||||
public void initEntry(VascEntry entry) throws Exception {
|
||||
public void initEntry(VascEntry entry) {
|
||||
if (entry.getVascFrontendController().getVascFrontend()==null) {
|
||||
Logger.getLogger(AbstractVascFrontend.class.getName()).fine("Bind frontend: "+this+" to: "+entry.getVascFrontendController()+" entry: "+entry.getId());
|
||||
entry.getVascFrontendController().setVascFrontend(this);
|
||||
|
|
|
|||
|
|
@ -39,13 +39,13 @@ public interface VascFrontend {
|
|||
|
||||
public String getFrontendType();
|
||||
|
||||
public void initEntry(VascEntry entry) throws Exception;
|
||||
public void initEntry(VascEntry entry) throws VascFrontendException;
|
||||
|
||||
public void renderView() throws Exception;
|
||||
public void renderView() throws VascFrontendException;
|
||||
|
||||
public void renderEdit() throws Exception;
|
||||
public void renderEdit() throws VascFrontendException;
|
||||
|
||||
public void renderDelete() throws Exception;
|
||||
public void renderDelete() throws VascFrontendException;
|
||||
|
||||
public void renderExport(VascEntryExporter exporter) throws Exception;
|
||||
public void renderExport(VascEntryExporter exporter) throws VascFrontendException;
|
||||
}
|
||||
|
|
@ -32,23 +32,23 @@ import net.forwardfire.vasc.core.VascEntryField;
|
|||
*/
|
||||
public interface VascFrontendActions extends VascFrontendEntry {
|
||||
|
||||
public void refreshData();
|
||||
public void refreshData() throws VascFrontendException;
|
||||
|
||||
public Object createObject();
|
||||
public Object createObject() throws VascFrontendException;
|
||||
|
||||
public void deleteObject();
|
||||
public void deleteObject() throws VascFrontendException;
|
||||
|
||||
public void persistObject();
|
||||
public void persistObject() throws VascFrontendException;
|
||||
|
||||
public Object mergeObject();
|
||||
public Object mergeObject() throws VascFrontendException;
|
||||
|
||||
public void sortAction(VascEntryField field);
|
||||
public void sortAction(VascEntryField field) throws VascFrontendException;
|
||||
|
||||
public void searchAction(String searchString);
|
||||
public void searchAction(String searchString) throws VascFrontendException;
|
||||
|
||||
public void pageAction(Integer page);
|
||||
public void pageAction(Integer page) throws VascFrontendException;
|
||||
|
||||
public void moveUpAction(Object object);
|
||||
public void moveUpAction(Object object) throws VascFrontendException;
|
||||
|
||||
public void moveDownAction(Object object);
|
||||
public void moveDownAction(Object object) throws VascFrontendException;
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontend;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* VascFrontendException is runtime exception in frontend use.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Sep 18, 2008
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class VascFrontendException extends RuntimeException {
|
||||
|
||||
|
||||
public VascFrontendException() {
|
||||
}
|
||||
|
||||
public VascFrontendException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public VascFrontendException(Exception e) {
|
||||
super(e);
|
||||
}
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ import net.forwardfire.vasc.core.VascEntry;
|
|||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascEntryLink;
|
||||
import net.forwardfire.vasc.core.VascEntryLinkType;
|
||||
import net.forwardfire.vasc.core.actions.GlobalVascAction;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.RowVascAction;
|
||||
|
||||
/**
|
||||
|
|
@ -53,15 +53,13 @@ public interface VascFrontendHelper {
|
|||
|
||||
public List<VascEntryLink> getVascLinkEntryByType(VascEntry entry,VascEntryLinkType type);
|
||||
|
||||
public List<String> validateObjectField(VascEntryField field);
|
||||
public List<String> validateObjectField(VascEntryField field) throws VascException;
|
||||
|
||||
public boolean validateAndSetErrorText(VascEntry entry);
|
||||
public boolean validateAndSetErrorText(VascEntry entry) throws VascException;
|
||||
|
||||
public void headerOptionsCreatedFillData(VascEntry entry);
|
||||
public void headerOptionsCreatedFillData(VascEntry entry) throws VascException;
|
||||
|
||||
public void editReadOnlyUIComponents(VascEntry entry);
|
||||
|
||||
public void handleException(VascEntry entry,Exception exception);
|
||||
|
||||
public List<RowVascAction> getMultiRowActions(VascEntry entry);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,15 +22,7 @@
|
|||
|
||||
package net.forwardfire.vasc.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.forwardfire.vasc.backend.VascBackend;
|
||||
import net.forwardfire.vasc.backend.VascBackendControllerLocal;
|
||||
|
||||
import net.forwardfire.vasc.backend.AbstractVascBackendControllerLocal;
|
||||
|
||||
/**
|
||||
* DefaultVascBackendController stores the vasc backends.
|
||||
|
|
@ -38,65 +30,7 @@ import net.forwardfire.vasc.backend.VascBackendControllerLocal;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 Sep 18, 2008
|
||||
*/
|
||||
public class DefaultVascBackendController implements VascBackendControllerLocal {
|
||||
public class DefaultVascBackendController extends AbstractVascBackendControllerLocal {
|
||||
|
||||
private Map<String,VascBackend> backends = null;
|
||||
|
||||
public DefaultVascBackendController() {
|
||||
backends = new HashMap<String,VascBackend>(7);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackendController#getVascBackendById(java.lang.String)
|
||||
*/
|
||||
public VascBackend getVascBackendById(String id) {
|
||||
return backends.get(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackendController#getVascBackendIds()
|
||||
*/
|
||||
public List<String> getVascBackendIds() {
|
||||
List<String> result = new ArrayList<String>(50);
|
||||
for (String id:backends.keySet()) {
|
||||
result.add(id);
|
||||
}
|
||||
Collections.sort(result); // lets do abc for consistance behauvior.
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackendControllerLocal#addVascBackend(net.forwardfire.vasc.backend.VascBackend)
|
||||
*/
|
||||
public void addVascBackend(VascBackend backend) {
|
||||
if (backend==null) {
|
||||
throw new NullPointerException("backend must not be null.");
|
||||
}
|
||||
if (backend.getId()==null) {
|
||||
throw new IllegalArgumentException("The backend must have an id.");
|
||||
}
|
||||
backend.startBackend();
|
||||
backends.put(backend.getId(), backend);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackendControllerLocal#removeVascBackendById(java.lang.String)
|
||||
*/
|
||||
public void removeVascBackendById(String backendId) {
|
||||
VascBackend backend = getVascBackendById(backendId);
|
||||
if (backend==null) {
|
||||
throw new NullPointerException("Could not find backend to remove with id: "+backendId);
|
||||
}
|
||||
backend.stopBackend();
|
||||
backends.remove(backendId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.VascBackendControllerLocal#clearAndStopBackends()
|
||||
*/
|
||||
public void clearAndStopBackends() {
|
||||
for (String backendId:getVascBackendIds()) {
|
||||
removeVascBackendById(backendId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -40,13 +40,13 @@ import net.forwardfire.vasc.core.VascEntryField;
|
|||
import net.forwardfire.vasc.core.VascEntryFieldLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryState;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.VascInterfaceKey;
|
||||
import net.forwardfire.vasc.core.VascInterfaceKeyFrontend;
|
||||
import net.forwardfire.vasc.core.VascInterfaceLoader;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryExporter;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendControllerLocal;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendEntry;
|
||||
import net.forwardfire.vasc.impl.entry.DefaultVascEntryResourceResolver;
|
||||
|
|
@ -213,15 +213,15 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll
|
|||
state.setVascBackendState(backendState);
|
||||
controller.setVascEntryState(state);
|
||||
controller.setVascController(vascController);
|
||||
entry.setVascFrontendController(controller); // <------ This is the end result.
|
||||
entry.setVascFrontendController(controller); // <------ This is the end result.
|
||||
|
||||
// Add some generic frontend impl code.
|
||||
controller.setVascFrontendPager( loader.createVascFrontendPagerImpl(entry));
|
||||
controller.setVascFrontendActions( loader.createVascFrontendActionsImpl(entry));
|
||||
controller.setVascFrontendDataSelector( loader.createVascFrontendDataSelectorImpl(entry));
|
||||
controller.setVascFrontendUserController( loader.createVascFrontendUserControllerImpl(entry));
|
||||
controller.setVascFrontendUserSettingController( loader.createVascFrontendUserSettingControllerImpl(entry));
|
||||
|
||||
// Add some generic frontend impl code.
|
||||
controller.setVascFrontendPager( loader.createVascFrontendPagerImpl(entry));
|
||||
controller.setVascFrontendActions( loader.createVascFrontendActionsImpl(entry));
|
||||
controller.setVascFrontendDataSelector( loader.createVascFrontendDataSelectorImpl(entry));
|
||||
controller.setVascFrontendUserController( loader.createVascFrontendUserControllerImpl(entry));
|
||||
controller.setVascFrontendUserSettingController( loader.createVascFrontendUserSettingControllerImpl(entry));
|
||||
|
||||
// Config backend state from master template
|
||||
VascBackendState master = getMasterVascBackendState();
|
||||
for (String key:master.getDataParameterKeys()) {
|
||||
|
|
@ -229,8 +229,8 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll
|
|||
}
|
||||
backendState.setPageSize(master.getPageSize());
|
||||
backendState.setPageSizeMax(master.getPageSizeMax());
|
||||
|
||||
// init resource loaders
|
||||
|
||||
// init resource loaders
|
||||
if (getResourceBundle()==null) {
|
||||
controller.setVascEntryResourceResolver(new DefaultVascEntryResourceResolver());
|
||||
} else {
|
||||
|
|
@ -238,14 +238,14 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll
|
|||
controller.setVascEntryResourceResolver(new DefaultVascEntryResourceResolver(ResourceBundle.getBundle(getResourceBundle(), locale)));
|
||||
}
|
||||
controller.setVascFrontendHelper(new DefaultVascFrontendHelper());
|
||||
//vascFrontendData.setVascEntryResourceImageResolver(new ImageResources());
|
||||
|
||||
// Add validators
|
||||
for(VascEntryFieldValidatorService validator:getVascEntryFieldValidatorServices()) {
|
||||
controller.addVascValidatorService(validator);
|
||||
}
|
||||
//vascFrontendData.setVascEntryResourceImageResolver(new ImageResources());
|
||||
|
||||
// Add backend to entry
|
||||
// Add validators
|
||||
for(VascEntryFieldValidatorService validator:getVascEntryFieldValidatorServices()) {
|
||||
controller.addVascValidatorService(validator);
|
||||
}
|
||||
|
||||
// Add backend to entry
|
||||
VascBackend backend = vascController.getVascEntryConfigController().configVascBackendProxied(vascController, entry);
|
||||
controller.getVascEntryState().setVascBackend(backend);
|
||||
controller.getVascEntryState().setVascEntry(entry);
|
||||
|
|
|
|||
|
|
@ -22,15 +22,7 @@
|
|||
|
||||
package net.forwardfire.vasc.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryControllerLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.AbstractVascEntryControllerLocal;
|
||||
|
||||
/**
|
||||
* DefaultVascEntryController holds the VascEntries which we can work with.
|
||||
|
|
@ -38,63 +30,6 @@ import net.forwardfire.vasc.core.VascEntryLocal;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 Sep 18, 2008
|
||||
*/
|
||||
public class DefaultVascEntryController implements VascEntryControllerLocal {
|
||||
public class DefaultVascEntryController extends AbstractVascEntryControllerLocal {
|
||||
|
||||
private Map<String,VascEntryLocal> entries = null;
|
||||
|
||||
public DefaultVascEntryController() {
|
||||
entries = new HashMap<String,VascEntryLocal>();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryControllerLocal#addVascEntry(net.forwardfire.vasc.core.VascEntry)
|
||||
*/
|
||||
public void addVascEntry(VascEntryLocal entry) {
|
||||
if (entry==null) {
|
||||
throw new NullPointerException("Can't add null VascEntry.");
|
||||
}
|
||||
if (entry.getId()==null) {
|
||||
throw new NullPointerException("Can't add VascEntry with null Id.");
|
||||
}
|
||||
entries.put(entry.getId(), entry);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryControllerLocal#removeVascEntry(java.lang.String)
|
||||
*/
|
||||
public void removeVascEntry(String entryId) {
|
||||
entries.remove(entryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryController#getVascEntryById(java.lang.String)
|
||||
*/
|
||||
public VascEntry getVascEntryById(String id) {
|
||||
VascEntryLocal entry = entries.get(id);
|
||||
if (entry==null) {
|
||||
throw new NullPointerException("Could not find vasc entry with id: "+id);
|
||||
}
|
||||
try {
|
||||
return entry.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new NullPointerException("Could not clone entry: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryControllerLocal#getMasterVascEntryById(java.lang.String)
|
||||
*/
|
||||
public VascEntryLocal getMasterVascEntryById(String entryId) {
|
||||
VascEntryLocal entry = entries.get(entryId);
|
||||
return entry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEntryController#getVascEntryIds()
|
||||
*/
|
||||
public List<String> getVascEntryIds() {
|
||||
List<String> result = new ArrayList<String>(entries.keySet());
|
||||
Collections.sort(result); // lets do abc for consistance behauvior.
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEventChannelControllerLocal;
|
||||
import net.forwardfire.vasc.core.VascEventControllerListener;
|
||||
import net.forwardfire.vasc.core.VascEventControllerType;
|
||||
|
||||
/**
|
||||
* DefaultVascEventChannelController handles all vasc events.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Oct 6, 2012
|
||||
*/
|
||||
public class DefaultVascEventChannelController implements VascEventChannelControllerLocal {
|
||||
|
||||
private List<VascEventControllerListener> listeners = null;
|
||||
|
||||
public DefaultVascEventChannelController() {
|
||||
listeners = new ArrayList<VascEventControllerListener>(10);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEventChannelController#fireEvent(net.forwardfire.vasc.core.VascEventControllerType, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void fireEvent(VascEventControllerType eventType, Object eventObject) {
|
||||
if (eventType==null) {
|
||||
throw new NullPointerException("Can't fire event when null type.");
|
||||
}
|
||||
for (int i=0;i<listeners.size();i++) {
|
||||
VascEventControllerListener listener = listeners.get(i);
|
||||
for (VascEventControllerType type:listener.getVascEventControllerTypes()) {
|
||||
if (eventType.equals(type)) {
|
||||
listener.controllerEvent(eventType, eventObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEventChannelControllerLocal#getVascEventControllerListeners()
|
||||
*/
|
||||
@Override
|
||||
public List<VascEventControllerListener> getVascEventControllerListeners() {
|
||||
return listeners;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEventChannelControllerLocal#addVascEventControllerListener(net.forwardfire.vasc.core.VascEventControllerListener)
|
||||
*/
|
||||
@Override
|
||||
public void addVascEventControllerListener(VascEventControllerListener listener) {
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.core.VascEventChannelControllerLocal#removeVascEventControllerListener(net.forwardfire.vasc.core.VascEventControllerListener)
|
||||
*/
|
||||
@Override
|
||||
public void removeVascEventControllerListener(VascEventControllerListener listener) {
|
||||
listeners.remove(listener);
|
||||
}
|
||||
}
|
||||
|
|
@ -30,12 +30,11 @@ import net.forwardfire.vasc.backend.proxy.VascBackendProxySearch;
|
|||
import net.forwardfire.vasc.backend.proxy.VascBackendProxySort;
|
||||
import net.forwardfire.vasc.backend.proxy.VascBackendProxyTimerLogger;
|
||||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryControllerLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.VascInterfaceKey;
|
||||
import net.forwardfire.vasc.core.VascInterfaceKeyFrontend;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.impl.entry.VascValidatorsValidatorService;
|
||||
import net.forwardfire.vasc.impl.entry.config.VascActionsFinalizer;
|
||||
import net.forwardfire.vasc.impl.entry.config.VascDefaultsFinalizer;
|
||||
|
|
@ -115,7 +114,8 @@ public class DefaultVascFactory {
|
|||
c.setVascEntryConfigController(vascConfig);
|
||||
c.setVascBackendController(new DefaultVascBackendController());
|
||||
c.setVascEntryController(new DefaultVascEntryController());
|
||||
c.setVascEntryFieldTypeController(new DefaultVascEntryFieldTypeController());
|
||||
c.setVascEntryFieldTypeController(new DefaultVascEntryFieldTypeController());
|
||||
c.setVascEventChannelController(new DefaultVascEventChannelController());
|
||||
|
||||
// Ready to go
|
||||
return c;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
package net.forwardfire.vasc.impl.actions;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.AbstractVascRowActionLocal;
|
||||
|
||||
/**
|
||||
|
|
@ -41,7 +42,7 @@ public class AddRowAction extends AbstractVascRowActionLocal {
|
|||
}
|
||||
|
||||
|
||||
public void doRowAction(VascEntry entry,Object rowObject) throws Exception {
|
||||
public void doRowAction(VascEntry entry,Object rowObject) throws VascException {
|
||||
entry.getVascFrontendController().getVascEntryState().setEditCreate(true);
|
||||
Object object = entry.getVascFrontendController().getVascFrontendActions().createObject();
|
||||
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(object);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
package net.forwardfire.vasc.impl.actions;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.AbstractVascRowActionLocal;
|
||||
|
||||
/**
|
||||
|
|
@ -40,7 +41,7 @@ public class DeleteRowAction extends AbstractVascRowActionLocal {
|
|||
return ACTION_ID;
|
||||
}
|
||||
|
||||
public void doRowAction(VascEntry entry,Object rowObject) throws Exception {
|
||||
public void doRowAction(VascEntry entry,Object rowObject) throws VascException {
|
||||
if (rowObject==null) {
|
||||
return; // nothing selected
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
package net.forwardfire.vasc.impl.actions;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.AbstractVascRowActionLocal;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener.VascFrontendEventType;
|
||||
|
||||
|
|
@ -42,7 +43,7 @@ public class EditRowAction extends AbstractVascRowActionLocal {
|
|||
}
|
||||
|
||||
|
||||
public void doRowAction(VascEntry entry,Object rowObject) throws Exception {
|
||||
public void doRowAction(VascEntry entry,Object rowObject) throws VascException {
|
||||
if (rowObject==null) {
|
||||
return; // nothing selected
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
package net.forwardfire.vasc.impl.actions;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.AbstractVascGlobalActionLocal;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryExporter;
|
||||
|
||||
|
|
@ -51,7 +52,7 @@ public class ExportDataGlobalAction extends AbstractVascGlobalActionLocal {
|
|||
return exporterId;
|
||||
}
|
||||
|
||||
public void doGlobalAction(VascEntry entry) throws Exception {
|
||||
public void doGlobalAction(VascEntry entry) throws VascException {
|
||||
VascEntryExporter exporter = entry.getVascFrontendController().getVascController().getVascEntryConfigController().getVascEntryExporterById(exporterId);
|
||||
entry.getVascFrontendController().getVascFrontend().renderExport(exporter);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
package net.forwardfire.vasc.impl.actions;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.AbstractVascGlobalActionLocal;
|
||||
|
||||
/**
|
||||
|
|
@ -40,7 +41,7 @@ public class RefreshDataGlobalAction extends AbstractVascGlobalActionLocal {
|
|||
return ACTION_ID;
|
||||
}
|
||||
|
||||
public void doGlobalAction(VascEntry entry) throws Exception {
|
||||
public void doGlobalAction(VascEntry entry) throws VascException {
|
||||
entry.getVascFrontendController().getVascFrontendActions().refreshData(); // this wil also fire the event
|
||||
}
|
||||
}
|
||||
|
|
@ -24,8 +24,8 @@ package net.forwardfire.vasc.impl.entry;
|
|||
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
import org.x4o.xml.impl.DefaultElementObjectPropertyValue;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ package net.forwardfire.vasc.impl.entry;
|
|||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryRecordCreator;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
|
||||
|
||||
|
|
@ -44,8 +45,14 @@ public class BeanVascEntryRecordCreator implements VascEntryRecordCreator {
|
|||
setObjectClass(objectClass);
|
||||
}
|
||||
|
||||
public Object newRecord(VascEntry entry) throws Exception {
|
||||
return objectClass.newInstance();
|
||||
public Object newRecord(VascEntry entry) throws VascException {
|
||||
try {
|
||||
return objectClass.newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
throw new VascException(e);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new VascException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Class<?> getObjectClass() {
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ import java.util.logging.Logger;
|
|||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
import org.hibernate.validator.ClassValidator;
|
||||
import org.hibernate.validator.InvalidValue;
|
||||
|
|
@ -58,33 +58,33 @@ public class HibernateValidatorService implements VascEntryFieldValidatorService
|
|||
@SuppressWarnings("unchecked")
|
||||
public List<String> validateObjectField(VascEntryField field, Object selectedRecord,Object objectValue) throws VascException {
|
||||
List<String> error = new ArrayList<String>(3);
|
||||
try {
|
||||
ClassValidator val = new ClassValidator(selectedRecord.getClass(),new VascHibernateMessage(field.getVascEntry()));
|
||||
InvalidValue[] ival = val.getInvalidValues(selectedRecord);
|
||||
logger.fine("Hiber Validating: "+ival.length);
|
||||
String prop = field.getBackendName();
|
||||
InvalidValue iv = findInvalidValueByProperty(ival,prop);
|
||||
|
||||
if(iv!=null) {
|
||||
error.add(iv.getMessage());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new VascException(e);
|
||||
}
|
||||
return error;
|
||||
try {
|
||||
ClassValidator val = new ClassValidator(selectedRecord.getClass(),new VascHibernateMessage(field.getVascEntry()));
|
||||
InvalidValue[] ival = val.getInvalidValues(selectedRecord);
|
||||
logger.fine("Hiber Validating: "+ival.length);
|
||||
String prop = field.getBackendName();
|
||||
InvalidValue iv = findInvalidValueByProperty(ival,prop);
|
||||
|
||||
if(iv!=null) {
|
||||
error.add(iv.getMessage());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new VascException(e);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
private InvalidValue findInvalidValueByProperty(InvalidValue[] ival,String property) {
|
||||
for(InvalidValue iv:ival) {
|
||||
if(iv.getPropertyName().equals(property)) {
|
||||
return iv;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
class VascHibernateMessage implements MessageInterpolator, Serializable {
|
||||
|
||||
private InvalidValue findInvalidValueByProperty(InvalidValue[] ival,String property) {
|
||||
for(InvalidValue iv:ival) {
|
||||
if(iv.getPropertyName().equals(property)) {
|
||||
return iv;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
class VascHibernateMessage implements MessageInterpolator, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8241727232507976072L;
|
||||
//private static final Logger log = Logger.getLogger(VascHibernateMessage.class.getName());
|
||||
private Map<String, Object> annotationParameters = new HashMap<String, Object>();
|
||||
|
|
@ -122,54 +122,54 @@ public class HibernateValidatorService implements VascEntryFieldValidatorService
|
|||
//do not resolve the property eagerly to allow validator.apply to work wo interpolator
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("unchecked")
|
||||
public String interpolate(String message, Validator validator, MessageInterpolator defaultInterpolator) {
|
||||
if ( annotationMessage!=null && annotationMessage.equals( message ) ) {
|
||||
//short cut
|
||||
if (interpolateMessage == null) {
|
||||
interpolateMessage = replace( annotationMessage );
|
||||
}
|
||||
return interpolateMessage;
|
||||
} else {
|
||||
//TODO keep them in a weak hash map, but this might not even be useful
|
||||
return replace( message );
|
||||
}
|
||||
}
|
||||
|
||||
public String getAnnotationMessage() {
|
||||
return annotationMessage;
|
||||
}
|
||||
|
||||
private String replace(String message) {
|
||||
StringTokenizer tokens = new StringTokenizer( message, "#{}", true );
|
||||
StringBuilder buf = new StringBuilder( 30 );
|
||||
boolean escaped = false;
|
||||
boolean el = false;
|
||||
while ( tokens.hasMoreTokens() ) {
|
||||
String token = tokens.nextToken();
|
||||
if ( !escaped && "#".equals( token ) ) {
|
||||
el = true;
|
||||
}
|
||||
if ( !el && "{".equals( token ) ) {
|
||||
escaped = true;
|
||||
} else if ( escaped && "}".equals( token ) ) {
|
||||
escaped = false;
|
||||
} else if ( !escaped ) {
|
||||
if ( "{".equals( token ) ) el = false;
|
||||
buf.append( token );
|
||||
} else {
|
||||
if ( annotationMessage!=null && annotationMessage.equals( message ) ) {
|
||||
//short cut
|
||||
if (interpolateMessage == null) {
|
||||
interpolateMessage = replace( annotationMessage );
|
||||
}
|
||||
return interpolateMessage;
|
||||
} else {
|
||||
//TODO keep them in a weak hash map, but this might not even be useful
|
||||
return replace( message );
|
||||
}
|
||||
}
|
||||
|
||||
public String getAnnotationMessage() {
|
||||
return annotationMessage;
|
||||
}
|
||||
|
||||
private String replace(String message) {
|
||||
StringTokenizer tokens = new StringTokenizer( message, "#{}", true );
|
||||
StringBuilder buf = new StringBuilder( 30 );
|
||||
boolean escaped = false;
|
||||
boolean el = false;
|
||||
while ( tokens.hasMoreTokens() ) {
|
||||
String token = tokens.nextToken();
|
||||
if ( !escaped && "#".equals( token ) ) {
|
||||
el = true;
|
||||
}
|
||||
if ( !el && "{".equals( token ) ) {
|
||||
escaped = true;
|
||||
} else if ( escaped && "}".equals( token ) ) {
|
||||
escaped = false;
|
||||
} else if ( !escaped ) {
|
||||
if ( "{".equals( token ) ) el = false;
|
||||
buf.append( token );
|
||||
} else {
|
||||
Object variable = annotationParameters.get( token );
|
||||
if ( variable != null ) {
|
||||
buf.append( variable );
|
||||
} else {
|
||||
String string = vascEntry.getVascFrontendController().getVascEntryResourceResolver().getTextValue(token);
|
||||
if ( string != null ) {
|
||||
buf.append(replace(string));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
if ( variable != null ) {
|
||||
buf.append( variable );
|
||||
} else {
|
||||
String string = vascEntry.getVascFrontendController().getVascEntryResourceResolver().getTextValue(token);
|
||||
if ( string != null ) {
|
||||
buf.append(replace(string));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ import javax.persistence.GeneratedValue;
|
|||
import javax.persistence.Id;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.validators.VascObjectNotNullValidator;
|
||||
import net.forwardfire.vasc.validators.VascStringLengthValidator;
|
||||
import net.forwardfire.vasc.validators.VascValidator;
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ import java.util.List;
|
|||
import java.util.logging.Logger;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.validators.VascValidator;
|
||||
import net.forwardfire.vasc.validators.VascValidatorMessages;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ import net.forwardfire.vasc.core.VascEntryFieldLocal;
|
|||
import net.forwardfire.vasc.core.VascEntryLinkLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryListOptionLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.VascEntryLinkType;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* VascDefaultsFinalizer does set some default in objects of entry.
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ import net.forwardfire.vasc.core.VascEntryConfigFinalizer;
|
|||
import net.forwardfire.vasc.core.VascEntryFieldSetLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLinkLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.VascActionLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* VascHelpIdFinalizer copies the (optional)capitalized Id's into helpId field.
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ import net.forwardfire.vasc.core.VascEntryConfigFinalizer;
|
|||
import net.forwardfire.vasc.core.VascEntryFieldSetLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLinkLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.VascActionLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* VascI18NFinalizer fills all missing i18n fields.
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ import net.forwardfire.vasc.core.VascEntryFieldSet;
|
|||
import net.forwardfire.vasc.core.VascEntryConfigFinalizer;
|
||||
import net.forwardfire.vasc.core.VascEntryLinkLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.VascActionLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* VascAutoIdFinalizer fills the missing id automaticly.
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ import net.forwardfire.vasc.core.VascEntryField;
|
|||
import net.forwardfire.vasc.core.VascEntryFieldSet;
|
||||
import net.forwardfire.vasc.core.VascEntryConfigFinalizer;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.VascEntryLink;
|
||||
import net.forwardfire.vasc.core.actions.VascAction;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* VascIdCheckFinalizer Checks the all objects have an ID.
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ import java.io.PrintWriter;
|
|||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryExporter;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* VascEntryExporterCsv writes data to csv output format.
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryExporter;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.lib.jr4o.JR4ODesignManager;
|
||||
import net.forwardfire.vasc.lib.jr4o.JR4ODesignManager.JRExportType;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ import java.io.PrintWriter;
|
|||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryExporter;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
/**
|
||||
* VascEntryExporterXml writes entry data to xml format.
|
||||
|
|
|
|||
|
|
@ -30,9 +30,10 @@ import net.forwardfire.vasc.backend.VascBackendState;
|
|||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendActions;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendException;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -53,40 +54,46 @@ public class DefaultVascFrontendActions implements VascFrontendActions {
|
|||
/**
|
||||
* @see net.forwardfire.vasc.frontend.VascFrontendHelper#initEditObject(net.forwardfire.vasc.core.VascEntry)
|
||||
*/
|
||||
public Object createObject() {
|
||||
public Object createObject() throws VascFrontendException {
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.PRE_CREATE, null);
|
||||
Object object;
|
||||
try {
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.PRE_CREATE, null);
|
||||
Object object = entry.getVascFrontendController().getVascEntryState().getVascBackend().provideVascEntryRecordCreator(((VascEntryLocal)entry).clone()).newRecord(entry); // TODO fixme
|
||||
if (object==null) {
|
||||
throw new IllegalStateException("Can't work with null object for backend storage.");
|
||||
object = entry.getVascFrontendController().getVascEntryState().getVascBackend().provideVascEntryRecordCreator(((VascEntryLocal)entry).clone()).newRecord(entry);
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new VascFrontendException(e);
|
||||
} catch (VascException e) {
|
||||
throw new VascFrontendException(e);
|
||||
}
|
||||
if (object==null) {
|
||||
throw new IllegalStateException("Can't work with null object for backend storage.");
|
||||
}
|
||||
for (VascEntryField field:entry.getVascEntryFields()) {
|
||||
if (field.getDefaultValue()==null) {
|
||||
continue; // no default value to set.
|
||||
}
|
||||
for (VascEntryField field:entry.getVascEntryFields()) {
|
||||
if (field.getDefaultValue()==null) {
|
||||
continue; // no default value to set.
|
||||
try {
|
||||
Object value = field.getVascEntryFieldValue().getValue(field, object);
|
||||
if (value!=null) {
|
||||
continue; // value is already set by backend creator.
|
||||
}
|
||||
Object value = field.getVascEntryFieldValue().getValue(field, object);
|
||||
if (value!=null) {
|
||||
continue; // value is already set by backend creator.
|
||||
}
|
||||
Object defaultValue = field.getDefaultValue();
|
||||
if (defaultValue instanceof String) {
|
||||
String def = (String)defaultValue;
|
||||
if (def.equals("now()")) { // TODO: add default string parsers
|
||||
defaultValue = new Date();
|
||||
}
|
||||
}
|
||||
logger.finer("Setting default value for: "+field.getName()+" def: "+defaultValue);
|
||||
field.getVascEntryFieldValue().setValue(field, object, defaultValue);
|
||||
Object defaultValue = field.getDefaultValue();
|
||||
if (defaultValue instanceof String) {
|
||||
String def = (String)defaultValue;
|
||||
if (def.equals("now()")) { // TODO: add default string parsers
|
||||
defaultValue = new Date();
|
||||
}
|
||||
}
|
||||
logger.finer("Setting default value for: "+field.getName()+" def: "+defaultValue);
|
||||
field.getVascEntryFieldValue().setValue(field, object, defaultValue);
|
||||
} catch (VascException ve) {
|
||||
throw new VascFrontendException(ve);
|
||||
}
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.POST_CREATE, object);
|
||||
return object;
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry,e);
|
||||
return null; /// ?? ,,
|
||||
}
|
||||
}
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.POST_CREATE, object);
|
||||
return object;
|
||||
}
|
||||
|
||||
protected int removeObjectFromDataList(Object object) {
|
||||
protected int removeObjectFromDataList(Object object) throws VascException {
|
||||
int indexOld = entry.getVascFrontendController().getVascEntryState().getEntryDataList().indexOf(object);
|
||||
if (entry.getVascFrontendController().getVascEntryState().getEntryDataList().remove(object)) {
|
||||
return indexOld; // java worked well for use
|
||||
|
|
@ -94,28 +101,24 @@ public class DefaultVascFrontendActions implements VascFrontendActions {
|
|||
|
||||
// remove only work on (jpa)beans with an overrided equals method.
|
||||
// we lets do the search ourselfs here because we should know the primary key value
|
||||
try {
|
||||
VascEntryField field = entry.getVascEntryFieldById(entry.getPrimaryKeyFieldId());
|
||||
Object idObject = field.getVascEntryFieldValue().getValue(field, object);
|
||||
|
||||
// is only null when creating objects
|
||||
if (idObject!=null) {
|
||||
int index = 0;
|
||||
for (Object o:entry.getVascFrontendController().getVascEntryState().getEntryDataList()) {
|
||||
field = entry.getVascEntryFieldById(entry.getPrimaryKeyFieldId());
|
||||
Object id = field.getVascEntryFieldValue().getValue(field, o);
|
||||
if (idObject.equals(id)) {
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if (index<entry.getVascFrontendController().getVascEntryState().getEntryDataList().size()) {
|
||||
entry.getVascFrontendController().getVascEntryState().getEntryDataList().remove(index);
|
||||
return index;
|
||||
VascEntryField field = entry.getVascEntryFieldById(entry.getPrimaryKeyFieldId());
|
||||
Object idObject = field.getVascEntryFieldValue().getValue(field, object);
|
||||
|
||||
// is only null when creating objects
|
||||
if (idObject!=null) {
|
||||
int index = 0;
|
||||
for (Object o:entry.getVascFrontendController().getVascEntryState().getEntryDataList()) {
|
||||
field = entry.getVascEntryFieldById(entry.getPrimaryKeyFieldId());
|
||||
Object id = field.getVascEntryFieldValue().getValue(field, o);
|
||||
if (idObject.equals(id)) {
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if (index<entry.getVascFrontendController().getVascEntryState().getEntryDataList().size()) {
|
||||
entry.getVascFrontendController().getVascEntryState().getEntryDataList().remove(index);
|
||||
return index;
|
||||
}
|
||||
} catch (VascException e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry,e);
|
||||
}
|
||||
return 0; // make better (0=top of list)
|
||||
}
|
||||
|
|
@ -123,44 +126,50 @@ public class DefaultVascFrontendActions implements VascFrontendActions {
|
|||
/**
|
||||
* @see net.forwardfire.vasc.frontend.VascFrontendActions#persistObject()
|
||||
*/
|
||||
public void persistObject() {
|
||||
saveObject(true);
|
||||
public void persistObject() throws VascFrontendException {
|
||||
try {
|
||||
saveObject(true);
|
||||
} catch (VascException e) {
|
||||
throw new VascFrontendException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.frontend.VascFrontendActions#mergeObject()
|
||||
*/
|
||||
public Object mergeObject() {
|
||||
return saveObject(false);
|
||||
public Object mergeObject() throws VascFrontendException {
|
||||
try {
|
||||
return saveObject(false);
|
||||
} catch (VascException e) {
|
||||
throw new VascFrontendException(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected Object saveObject(boolean persist) {
|
||||
protected Object saveObject(boolean persist) throws VascException {
|
||||
Object object = entry.getVascFrontendController().getVascEntryState().getEntryDataObject();
|
||||
Object result = null;
|
||||
try {
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.PRE_UPDATE,object);
|
||||
int index = removeObjectFromDataList(object);
|
||||
|
||||
// save object on backend
|
||||
if (persist) {
|
||||
entry.getVascFrontendController().getVascEntryState().getVascBackend().persist(object);
|
||||
} else {
|
||||
result = entry.getVascFrontendController().getVascEntryState().getVascBackend().merge(object);
|
||||
}
|
||||
|
||||
// put object thrue the filters
|
||||
for (VascBackendFilter filter:entry.getVascBackendFilters()) {
|
||||
result = filter.filterObject(result);
|
||||
}
|
||||
|
||||
// put object back in list
|
||||
entry.getVascFrontendController().getVascEntryState().getEntryDataList().add(index, result);
|
||||
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(null);
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.POST_UPDATE,result);
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry,e);
|
||||
}
|
||||
return result;
|
||||
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.PRE_UPDATE,object);
|
||||
int index = removeObjectFromDataList(object);
|
||||
|
||||
// save object on backend
|
||||
if (persist) {
|
||||
entry.getVascFrontendController().getVascEntryState().getVascBackend().persist(object);
|
||||
} else {
|
||||
result = entry.getVascFrontendController().getVascEntryState().getVascBackend().merge(object);
|
||||
}
|
||||
|
||||
// put object thrue the filters
|
||||
for (VascBackendFilter filter:entry.getVascBackendFilters()) {
|
||||
result = filter.filterObject(result);
|
||||
}
|
||||
|
||||
// put object back in list
|
||||
entry.getVascFrontendController().getVascEntryState().getEntryDataList().add(index, result);
|
||||
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(null);
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.POST_UPDATE,result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -168,43 +177,45 @@ public class DefaultVascFrontendActions implements VascFrontendActions {
|
|||
* @param entry
|
||||
* @param object
|
||||
*/
|
||||
public void deleteObject() {
|
||||
Object object = entry.getVascFrontendController().getVascEntryState().getEntryDataObject();
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.PRE_DELETE, object);
|
||||
public void deleteObject() throws VascFrontendException {
|
||||
try {
|
||||
Object object = entry.getVascFrontendController().getVascEntryState().getEntryDataObject();
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.PRE_DELETE, object);
|
||||
entry.getVascFrontendController().getVascEntryState().getVascBackend().delete(object);
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry,e);
|
||||
|
||||
removeObjectFromDataList(object);
|
||||
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(null);
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.POST_DELETE, object);
|
||||
} catch (VascException ve) {
|
||||
throw new VascFrontendException(ve);
|
||||
}
|
||||
removeObjectFromDataList(object);
|
||||
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(null);
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.POST_DELETE, object);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.frontend.VascFrontendHelper#refreshData(net.forwardfire.vasc.core.VascEntry)
|
||||
*/
|
||||
public void refreshData() {
|
||||
public void refreshData() throws VascFrontendException {
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.PRE_READ, null);
|
||||
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(null);
|
||||
VascBackendState backendState = entry.getVascFrontendController().getVascEntryState().getVascBackendState();
|
||||
|
||||
// check and correct max page size
|
||||
if (backendState.getPageSize() > backendState.getPageSizeMax()) {
|
||||
backendState.setPageSize(backendState.getPageSizeMax());
|
||||
}
|
||||
|
||||
// Clear and copy parameters to backend state for query.
|
||||
backendState.removeDataParameterAll();
|
||||
for (String key:entry.getEntryParameterKeys()) {
|
||||
Object value = entry.getEntryParameter(key);
|
||||
backendState.setDataParameter(key, value);
|
||||
}
|
||||
|
||||
// Update total every time first
|
||||
Long total = entry.getVascFrontendController().getVascEntryState().getVascBackend().fetchTotalExecuteSize(backendState);
|
||||
entry.getVascFrontendController().getVascEntryState().setTotalBackendRecords(total);
|
||||
|
||||
try {
|
||||
// check and correct max page size
|
||||
if (backendState.getPageSize() > backendState.getPageSizeMax()) {
|
||||
backendState.setPageSize(backendState.getPageSizeMax());
|
||||
}
|
||||
|
||||
// Clear and copy parameters to backend state for query.
|
||||
backendState.removeDataParameterAll();
|
||||
for (String key:entry.getEntryParameterKeys()) {
|
||||
Object value = entry.getEntryParameter(key);
|
||||
backendState.setDataParameter(key, value);
|
||||
}
|
||||
|
||||
// Update total every time first
|
||||
Long total = entry.getVascFrontendController().getVascEntryState().getVascBackend().fetchTotalExecuteSize(backendState);
|
||||
entry.getVascFrontendController().getVascEntryState().setTotalBackendRecords(total);
|
||||
|
||||
// Execute to get data.
|
||||
entry.getVascFrontendController().getVascEntryState().setEntryDataList(entry.getVascFrontendController().getVascEntryState().getVascBackend().execute(backendState));
|
||||
|
||||
|
|
@ -215,15 +226,14 @@ public class DefaultVascFrontendActions implements VascFrontendActions {
|
|||
entry.getVascFrontendController().getVascEntryState().setEntryDataList(entry.getVascFrontendController().getVascEntryState().getVascBackend().execute(backendState));
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry, e);
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.POST_READ, null);
|
||||
} catch (VascException ve) {
|
||||
throw new VascFrontendException(ve);
|
||||
}
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.POST_READ, null);
|
||||
}
|
||||
|
||||
|
||||
public void sortAction(VascEntryField field) {
|
||||
public void sortAction(VascEntryField field) throws VascFrontendException {
|
||||
String curSort = entry.getVascFrontendController().getVascEntryState().getVascBackendState().getSortField();
|
||||
if (field.getBackendName().equals(curSort)) {
|
||||
entry.getVascFrontendController().getVascEntryState().getVascBackendState().setSortAscending(!entry.getVascFrontendController().getVascEntryState().getVascBackendState().isSortAscending());
|
||||
|
|
@ -234,14 +244,10 @@ public class DefaultVascFrontendActions implements VascFrontendActions {
|
|||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascEntryFrontendEventListener.VascFrontendEventType.SORT, field);
|
||||
|
||||
refreshData();
|
||||
try {
|
||||
entry.getVascFrontendController().getVascFrontend().renderView();
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry, e);
|
||||
}
|
||||
entry.getVascFrontendController().getVascFrontend().renderView();
|
||||
}
|
||||
|
||||
public void searchAction(String searchString) {
|
||||
public void searchAction(String searchString) throws VascFrontendException {
|
||||
entry.getVascFrontendController().getVascEntryState().getVascBackendState().setSearchString(searchString);
|
||||
entry.getVascFrontendController().getVascEntryState().getVascBackendState().setSortField(null);
|
||||
entry.getVascFrontendController().getVascEntryState().getVascBackendState().setPageIndex(0);
|
||||
|
|
@ -249,14 +255,10 @@ public class DefaultVascFrontendActions implements VascFrontendActions {
|
|||
|
||||
refreshData();
|
||||
|
||||
try {
|
||||
entry.getVascFrontendController().getVascFrontend().renderView();
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry, e);
|
||||
}
|
||||
entry.getVascFrontendController().getVascFrontend().renderView();
|
||||
}
|
||||
|
||||
public void pageAction(Integer pageIndex) {
|
||||
public void pageAction(Integer pageIndex) throws VascFrontendException {
|
||||
if (pageIndex<1) {
|
||||
pageIndex = 0;
|
||||
}
|
||||
|
|
@ -270,52 +272,41 @@ public class DefaultVascFrontendActions implements VascFrontendActions {
|
|||
|
||||
// lets load data;
|
||||
refreshData();
|
||||
|
||||
try {
|
||||
entry.getVascFrontendController().getVascFrontend().renderView();
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry, e);
|
||||
}
|
||||
|
||||
entry.getVascFrontendController().getVascFrontend().renderView();
|
||||
}
|
||||
|
||||
public void moveUpAction(Object record) {
|
||||
public void moveUpAction(Object record) throws VascFrontendException {
|
||||
if (entry.getVascFrontendController().getVascEntryState().getVascBackend().isRecordMoveable()) {
|
||||
try {
|
||||
VascEntryField p = entry.getVascEntryFieldById(entry.getPrimaryKeyFieldId());
|
||||
Object primaryId = p.getVascEntryFieldValue().getValue(p, record);
|
||||
entry.getVascFrontendController().getVascEntryState().getVascBackend().doRecordMoveUpById(entry.getVascFrontendController().getVascEntryState().getVascBackendState(),primaryId);
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry, e);
|
||||
} catch (VascException ve) {
|
||||
throw new VascFrontendException(ve);
|
||||
}
|
||||
|
||||
|
||||
// lets load data;
|
||||
refreshData();
|
||||
}
|
||||
entry.getVascFrontendController().getVascFrontend().renderView();
|
||||
}
|
||||
|
||||
public void moveDownAction(Object record) throws VascFrontendException {
|
||||
if (entry.getVascFrontendController().getVascEntryState().getVascBackend().isRecordMoveable()) {
|
||||
|
||||
try {
|
||||
VascEntryField p = entry.getVascEntryFieldById(entry.getPrimaryKeyFieldId());
|
||||
Object primaryId = p.getVascEntryFieldValue().getValue(p, record);
|
||||
entry.getVascFrontendController().getVascEntryState().getVascBackend().doRecordMoveDownById(entry.getVascFrontendController().getVascEntryState().getVascBackendState(),primaryId);
|
||||
} catch (VascException ve) {
|
||||
throw new VascFrontendException(ve);
|
||||
}
|
||||
|
||||
// lets load data;
|
||||
refreshData();
|
||||
}
|
||||
|
||||
try {
|
||||
entry.getVascFrontendController().getVascFrontend().renderView();
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void moveDownAction(Object record) {
|
||||
if (entry.getVascFrontendController().getVascEntryState().getVascBackend().isRecordMoveable()) {
|
||||
try {
|
||||
VascEntryField p = entry.getVascEntryFieldById(entry.getPrimaryKeyFieldId());
|
||||
Object primaryId = p.getVascEntryFieldValue().getValue(p, record);
|
||||
entry.getVascFrontendController().getVascEntryState().getVascBackend().doRecordMoveDownById(entry.getVascFrontendController().getVascEntryState().getVascBackendState(),primaryId);
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry, e);
|
||||
}
|
||||
// lets load data;
|
||||
refreshData();
|
||||
}
|
||||
|
||||
try {
|
||||
entry.getVascFrontendController().getVascFrontend().renderView();
|
||||
} catch (Exception e) {
|
||||
entry.getVascFrontendController().getVascFrontendHelper().handleException(entry, e);
|
||||
}
|
||||
entry.getVascFrontendController().getVascFrontend().renderView();
|
||||
}
|
||||
}
|
||||
|
|
@ -33,7 +33,6 @@ import net.forwardfire.vasc.core.VascEntryField;
|
|||
import net.forwardfire.vasc.core.VascEntryConfigFinalizer;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryState;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.actions.ColumnVascActionLocal;
|
||||
import net.forwardfire.vasc.core.actions.GlobalVascActionLocal;
|
||||
import net.forwardfire.vasc.core.actions.RowVascActionLocal;
|
||||
|
|
@ -44,6 +43,7 @@ import net.forwardfire.vasc.core.entry.VascEntryResourceImageResolver;
|
|||
import net.forwardfire.vasc.core.entry.VascEntryResourceResolver;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener.VascFrontendEventType;
|
||||
import net.forwardfire.vasc.core.ui.VascUIComponent;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.frontend.VascFrontend;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendActions;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendControllerLocal;
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
package net.forwardfire.vasc.impl.frontend;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
|
|
|
|||
|
|
@ -28,14 +28,13 @@ import java.util.logging.Logger;
|
|||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.VascEntryLink;
|
||||
import net.forwardfire.vasc.core.VascEntryLinkType;
|
||||
import net.forwardfire.vasc.core.actions.RowVascAction;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener.VascFrontendEventType;
|
||||
import net.forwardfire.vasc.core.ui.VascUIComponent;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendHelper;
|
||||
|
||||
/**
|
||||
|
|
@ -76,14 +75,8 @@ public class DefaultVascFrontendHelper implements VascFrontendHelper {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.frontend.VascFrontendHelper#handleException(net.forwardfire.vasc.core.VascEntry,java.lang.Exception)
|
||||
*/
|
||||
public void handleException(VascEntry entry,Exception exception) {
|
||||
entry.getVascFrontendController().fireVascFrontendEvent(entry,VascFrontendEventType.EXCEPTION , exception);
|
||||
}
|
||||
|
||||
public void headerOptionsCreatedFillData(VascEntry entry) {
|
||||
public void headerOptionsCreatedFillData(VascEntry entry) throws VascException {
|
||||
|
||||
// fix conv defs of options to object. ?
|
||||
|
||||
|
|
@ -93,7 +86,7 @@ public class DefaultVascFrontendHelper implements VascFrontendHelper {
|
|||
/**
|
||||
* @see net.forwardfire.vasc.frontend.VascFrontendHelper#validateObjectField(net.forwardfire.vasc.core.VascEntryField, java.lang.Object)
|
||||
*/
|
||||
public List<String> validateObjectField(VascEntryField field) {
|
||||
public List<String> validateObjectField(VascEntryField field) throws VascException {
|
||||
if (field==null) {
|
||||
throw new NullPointerException("Can't validate null field.");
|
||||
}
|
||||
|
|
@ -113,14 +106,10 @@ public class DefaultVascFrontendHelper implements VascFrontendHelper {
|
|||
return error;
|
||||
}
|
||||
|
||||
try {
|
||||
Object objectSelected = entry.getVascFrontendController().getVascEntryState().getEntryDataObject();
|
||||
Object objectValue = field.getVascEntryFieldValue().getValue(field, objectSelected);
|
||||
for (VascEntryFieldValidatorService s:entry.getVascFrontendController().getVascValidatorServices()) {
|
||||
error.addAll(s.validateObjectField(field, objectSelected, objectValue));
|
||||
}
|
||||
} catch (VascException e) {
|
||||
handleException(entry, e);
|
||||
Object objectSelected = entry.getVascFrontendController().getVascEntryState().getEntryDataObject();
|
||||
Object objectValue = field.getVascEntryFieldValue().getValue(field, objectSelected);
|
||||
for (VascEntryFieldValidatorService s:entry.getVascFrontendController().getVascValidatorServices()) {
|
||||
error.addAll(s.validateObjectField(field, objectSelected, objectValue));
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
|
@ -128,31 +117,31 @@ public class DefaultVascFrontendHelper implements VascFrontendHelper {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
public boolean validateAndSetErrorText(VascEntry entry) {
|
||||
public boolean validateAndSetErrorText(VascEntry entry) throws VascException {
|
||||
boolean hadError = false;
|
||||
for (VascEntryField field:entry.getVascEntryFields()) {
|
||||
VascUIComponent comp = entry.getVascFrontendController().getFieldVascUIComponent(field);
|
||||
List<String> error = validateObjectField(field);
|
||||
logger.info("Check field: "+field.getId()+" comp: "+comp+" Errors: "+error.size());
|
||||
if (error.isEmpty()) {
|
||||
if (comp!=null) {
|
||||
comp.setErrorText(null);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (comp==null) {
|
||||
logger.warning("Field: "+field.getId()+" gives errors but no UI component to display.");
|
||||
continue;
|
||||
}
|
||||
hadError=true;
|
||||
StringBuffer buf = new StringBuffer(100);
|
||||
for (String s:error) {
|
||||
buf.append(s);
|
||||
buf.append('\n');
|
||||
}
|
||||
comp.setErrorText(buf.toString());
|
||||
for (VascEntryField field:entry.getVascEntryFields()) {
|
||||
VascUIComponent comp = entry.getVascFrontendController().getFieldVascUIComponent(field);
|
||||
List<String> error = validateObjectField(field);
|
||||
logger.info("Check field: "+field.getId()+" comp: "+comp+" Errors: "+error.size());
|
||||
if (error.isEmpty()) {
|
||||
if (comp!=null) {
|
||||
comp.setErrorText(null);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (comp==null) {
|
||||
logger.warning("Field: "+field.getId()+" gives errors but no UI component to display.");
|
||||
continue;
|
||||
}
|
||||
hadError=true;
|
||||
StringBuffer buf = new StringBuffer(100);
|
||||
for (String s:error) {
|
||||
buf.append(s);
|
||||
buf.append('\n');
|
||||
}
|
||||
comp.setErrorText(buf.toString());
|
||||
}
|
||||
return hadError;
|
||||
return hadError;
|
||||
}
|
||||
|
||||
public void editReadOnlyUIComponents(VascEntry entry) {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import org.xml.sax.SAXException;
|
|||
import org.x4o.xml.conv.DefaultObjectConverterProvider;
|
||||
import org.x4o.xml.conv.ObjectConverter;
|
||||
import org.x4o.xml.core.X4OParser;
|
||||
import org.x4o.xml.core.config.X4OLanguageProperty;
|
||||
import org.x4o.xml.element.Element;
|
||||
|
||||
/**
|
||||
|
|
@ -57,6 +58,7 @@ public class FieldTypeParser extends X4OParser {
|
|||
*/
|
||||
public FieldTypeParser() throws InvalidPropertiesFormatException, IOException {
|
||||
super(FIELD_TYPE_LANGUAGE);
|
||||
setProperty(X4OLanguageProperty.PHASE_SKIP_RELEASE.toUri(), true);
|
||||
}
|
||||
|
||||
public void parseVascFieldTypes() throws IOException, SecurityException, NullPointerException, ParserConfigurationException, SAXException {
|
||||
|
|
@ -66,7 +68,7 @@ public class FieldTypeParser extends X4OParser {
|
|||
public List<VascEntryFieldTypeLocal> getTypes() {
|
||||
List<VascEntryFieldTypeLocal> result = new ArrayList<VascEntryFieldTypeLocal>(40);
|
||||
DefaultObjectConverterProvider convProvider = new DefaultObjectConverterProvider(true);
|
||||
for (Element e:getElementContext().getRootElement().getChilderen()) {
|
||||
for (Element e:getDriver().getElementLanguage().getRootElement().getChilderen()) {
|
||||
VascEntryFieldTypeLocal a = (VascEntryFieldTypeLocal)e.getElementObject();
|
||||
if (a.getObjectConverter()==null && a.getAutoDetectClass()!=null) {
|
||||
ObjectConverter conv = convProvider.getObjectConverterForClass(a.getAutoDetectClass());
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ package net.forwardfire.vasc.impl.type;
|
|||
import java.util.List;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.ui.VascValueModel;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@ import net.forwardfire.vasc.core.VascEntry;
|
|||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascEntryFieldLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.ui.VascSelectItem;
|
||||
import net.forwardfire.vasc.core.ui.VascSelectItemModel;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.impl.DefaultVascBackendState;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.ui.VascSelectItem;
|
||||
import net.forwardfire.vasc.core.ui.VascSelectItemModel;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ import net.forwardfire.vasc.annotations.VascChoices;
|
|||
import net.forwardfire.vasc.annotations.VascChoicesSelectItemModel;
|
||||
import net.forwardfire.vasc.annotations.VascEventListener;
|
||||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascEntryFieldLocal;
|
||||
import net.forwardfire.vasc.core.VascEntryFieldType;
|
||||
import net.forwardfire.vasc.core.VascEntryFieldTypeLocal;
|
||||
|
|
@ -49,7 +47,7 @@ import net.forwardfire.vasc.impl.DefaultVascEntryField;
|
|||
import net.forwardfire.vasc.validators.VascValidator;
|
||||
import net.forwardfire.vasc.validators.VascValidatorClassParser;
|
||||
|
||||
import org.x4o.xml.core.X4OParser;
|
||||
import org.x4o.xml.core.config.X4OLanguageClassLoader;
|
||||
import org.x4o.xml.element.AbstractElement;
|
||||
import org.x4o.xml.element.ElementException;
|
||||
|
||||
|
|
@ -73,7 +71,7 @@ public class AnnotationParserElement extends AbstractElement {
|
|||
|
||||
Class<?> modelClass;
|
||||
try {
|
||||
modelClass = X4OParser.loadClass(className);
|
||||
modelClass = X4OLanguageClassLoader.loadClass(className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new ElementException(e);
|
||||
}
|
||||
|
|
@ -271,7 +269,7 @@ public class AnnotationParserElement extends AbstractElement {
|
|||
field.addVascValidator(v); // todo: merg with already added list of template so we can override.
|
||||
}
|
||||
|
||||
VascController vascController = VascParser.getVascController(this.getElementContext());
|
||||
VascController vascController = VascParser.getVascController(this.getElementLanguage());
|
||||
VascChoices vc = parser.getVascChoices (modelClass, field.getId());
|
||||
if (vc!=null) {
|
||||
VascEntryFieldType type = vascController.getVascEntryFieldTypeController().getVascEntryFieldTypeById("ListField");
|
||||
|
|
|
|||
|
|
@ -39,35 +39,35 @@ import org.x4o.xml.element.ElementBindingHandlerException;
|
|||
* @version 1.0 Apr 02, 2009
|
||||
*/
|
||||
public class SelectItemModelBindingHandler extends AbstractElementBindingHandler {
|
||||
|
||||
|
||||
private final static Class<?>[] CLASSES_CHILD = new Class[] {
|
||||
VascSelectItemModel.class
|
||||
};
|
||||
|
||||
/**
|
||||
* @see org.x4o.xml.element.ElementBindingHandler#canBind(org.x4o.xml.element.Element)
|
||||
* @see org.x4o.xml.element.ElementBindingHandler#getBindParentClass()
|
||||
*/
|
||||
public boolean canBind(Element element) {
|
||||
if (element.getParent()==null) {
|
||||
return false;
|
||||
}
|
||||
Object parent = element.getParent().getElementObject();
|
||||
Object child = element.getElementObject();
|
||||
boolean p = false;
|
||||
boolean c = false;
|
||||
if (parent instanceof VascEntryField) { p=true; }
|
||||
if (child instanceof VascSelectItemModel) { c=true; }
|
||||
if (p&c) { return true; } else { return false; }
|
||||
public Class<?> getBindParentClass() {
|
||||
return VascEntryField.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.x4o.xml.element.ElementBindingHandler#doBind(org.x4o.xml.element.Element)
|
||||
* @see org.x4o.xml.element.ElementBindingHandler#getBindChildClasses()
|
||||
*/
|
||||
public void doBind(Element element) throws ElementBindingHandlerException {
|
||||
Object child = element.getElementObject();
|
||||
Object parentObject = element.getParent().getElementObject();
|
||||
public Class<?>[] getBindChildClasses() {
|
||||
return CLASSES_CHILD;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.x4o.xml.element.ElementBindingHandler#doBind(java.lang.Object, java.lang.Object, org.x4o.xml.element.Element)
|
||||
*/
|
||||
public void doBind(Object parentObject, Object childObject,Element childElement) throws ElementBindingHandlerException {
|
||||
if (parentObject instanceof VascEntryField) {
|
||||
VascEntryField parent = (VascEntryField)parentObject;
|
||||
if (child instanceof VascSelectItemModel) {
|
||||
if (childObject instanceof VascSelectItemModel) {
|
||||
VascEntryFieldType type = parent.getVascEntryFieldType();
|
||||
type.setDataObject(child);
|
||||
type.setDataObject(childObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ package net.forwardfire.vasc.impl.x4o;
|
|||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntryLocal;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
|
||||
import org.x4o.xml.element.AbstractElement;
|
||||
import org.x4o.xml.element.ElementException;
|
||||
|
|
@ -47,7 +47,7 @@ public class SetParameterElement extends AbstractElement {
|
|||
String name = getAttributes().get("name");
|
||||
String value = getAttributes().get("value");
|
||||
String type = getAttributes().get("type");
|
||||
VascEntryLocal entry = (VascEntryLocal)getParent().getElementObject();
|
||||
VascEntry entry = (VascEntry)getParent().getElementObject();
|
||||
logger.fine("Setting parameter name: "+name+" value: "+value+" type: "+type);
|
||||
|
||||
if ("setUserParameter".equals(getElementClass().getTag())) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class VascBackendElementConfigurator extends AbstractElementConfigurator
|
|||
|
||||
VascBackend backend = (VascBackend)element.getElementObject();
|
||||
|
||||
VascController vascController = VascParser.getVascController(element.getElementContext());
|
||||
VascController vascController = VascParser.getVascController(element.getElementLanguage());
|
||||
VascBackendController backendController = vascController.getVascBackendController();
|
||||
|
||||
if (backendController instanceof VascBackendControllerLocal) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import net.forwardfire.vasc.core.actions.ColumnVascActionLocal;
|
|||
import net.forwardfire.vasc.core.actions.GlobalVascActionLocal;
|
||||
import net.forwardfire.vasc.core.actions.RowVascActionLocal;
|
||||
|
||||
import org.x4o.xml.core.X4OParser;
|
||||
import org.x4o.xml.core.config.X4OLanguageClassLoader;
|
||||
import org.x4o.xml.element.AbstractElement;
|
||||
import org.x4o.xml.element.ElementException;
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ public class VascEntryActionElement extends AbstractElement {
|
|||
if ("backend".equalsIgnoreCase(type)) {
|
||||
Object obj = null;
|
||||
try {
|
||||
Class<?> clazz2 = X4OParser.loadClass(clazz);
|
||||
Class<?> clazz2 = X4OLanguageClassLoader.loadClass(clazz);
|
||||
obj = clazz2.newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new ElementException("Could not load class: "+clazz);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class VascEntryElementConfigurator extends AbstractElementConfigurator {
|
|||
*/
|
||||
public void doConfigElement(Element element) throws ElementConfiguratorException {
|
||||
VascEntryLocal entry = (VascEntryLocal)element.getElementObject();
|
||||
VascController vascController = VascParser.getVascController(element.getElementContext());
|
||||
VascController vascController = VascParser.getVascController(element.getElementLanguage());
|
||||
VascEntryController entryController = vascController.getVascEntryController();
|
||||
|
||||
if (entryController instanceof VascEntryControllerLocal) {
|
||||
|
|
|
|||
|
|
@ -38,33 +38,33 @@ import org.x4o.xml.element.ElementBindingHandlerException;
|
|||
* @version 1.0 Apr 02, 2009
|
||||
*/
|
||||
public class VascEntryFieldBindingHandler extends AbstractElementBindingHandler {
|
||||
|
||||
|
||||
private final static Class<?>[] CLASSES_CHILD = new Class[] {
|
||||
VascEntryFieldLocal.class,
|
||||
VascEntryListOptionLocal.class
|
||||
};
|
||||
|
||||
/**
|
||||
* @see org.x4o.xml.element.ElementBindingHandler#canBind(org.x4o.xml.element.Element)
|
||||
* @see org.x4o.xml.element.ElementBindingHandler#getBindParentClass()
|
||||
*/
|
||||
public boolean canBind(Element element) {
|
||||
if (element.getParent()==null) {
|
||||
return false;
|
||||
}
|
||||
Object parent = element.getParent().getElementObject();
|
||||
Object child = element.getElementObject();
|
||||
boolean p = false;
|
||||
boolean c = false;
|
||||
if (parent instanceof VascEntryLocal) { p=true; }
|
||||
if (child instanceof VascEntryFieldLocal) { c=true; }
|
||||
if (child instanceof VascEntryListOptionLocal) { c=true; }
|
||||
if (p&c) { return true; } else { return false; }
|
||||
public Class<?> getBindParentClass() {
|
||||
return VascEntryLocal.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.x4o.xml.element.ElementBindingHandler#doBind(org.x4o.xml.element.Element)
|
||||
* @see org.x4o.xml.element.ElementBindingHandler#getBindChildClasses()
|
||||
*/
|
||||
public void doBind(Element element) throws ElementBindingHandlerException {
|
||||
Object childObject = element.getElementObject();
|
||||
Object parentObject = element.getParent().getElementObject();
|
||||
public Class<?>[] getBindChildClasses() {
|
||||
return CLASSES_CHILD;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.x4o.xml.element.ElementBindingHandler#doBind(java.lang.Object, java.lang.Object, org.x4o.xml.element.Element)
|
||||
*/
|
||||
public void doBind(Object parentObject, Object childObject,Element childElement) throws ElementBindingHandlerException {
|
||||
if (parentObject instanceof VascEntryLocal) {
|
||||
VascEntryLocal parent = (VascEntryLocal)parentObject;
|
||||
if (childObject instanceof VascEntryFieldLocal) {
|
||||
if (childObject instanceof VascEntryFieldLocal & (childObject instanceof VascEntryListOptionLocal)==false) {
|
||||
VascEntryFieldLocal child = (VascEntryFieldLocal) childObject;
|
||||
parent.addVascEntryField(child);
|
||||
}
|
||||
|
|
@ -74,4 +74,4 @@ public class VascEntryFieldBindingHandler extends AbstractElementBindingHandler
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue