2
0
Fork 0

Refactored internal api

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

View file

@ -29,13 +29,13 @@
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<version>${persistence-api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.1.0.CR1</version>
<version>${hibernate-validator.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

View file

@ -71,8 +71,17 @@ public class VascAnnotationParser {
return (String)getValue(beanClass,VascI18n.class,null,"image");
}
public Integer getVascOrderIndex(Class<?> beanClass,String property) {
return (Integer)getValue(beanClass,VascFieldOrder.class,property,"orderIndex");
public Integer getVascOrder(Class<?> beanClass,String property) {
return (Integer)getValue(beanClass,VascFieldOrder.class,property,"order");
}
public Integer getVascOrderCreate(Class<?> beanClass,String property) {
return (Integer)getValue(beanClass,VascFieldOrder.class,property,"orderCreate");
}
public Integer getVascOrderEdit(Class<?> beanClass,String property) {
return (Integer)getValue(beanClass,VascFieldOrder.class,property,"orderEdit");
}
public Integer getVascOrderList(Class<?> beanClass,String property) {
return (Integer)getValue(beanClass,VascFieldOrder.class,property,"orderList");
}
@ -499,7 +508,16 @@ public class VascAnnotationParser {
}
if (a.equals(VascFieldOrder.class)) {
VascFieldOrder v = (VascFieldOrder)b;
return v.orderIndex();
if ("orderCreate".equals(field)) {
return v.orderCreate();
}
if ("orderEdit".equals(field)) {
return v.orderEdit();
}
if ("orderList".equals(field)) {
return v.orderList();
}
return v.order();
}
if (a.equals(VascChoices.class)) {
VascChoices v = (VascChoices)b;

View file

@ -63,7 +63,7 @@ public class VascChoicesSelectItemModel implements VascSelectItemModel,Serializa
if (nullKeyValue==null) {
nullKeyValue = "null";
}
String nullLabelText = entry.getVascFrontendData().getVascEntryResourceResolver().getTextValue(nullLabel);
String nullLabelText = entry.getVascFrontendController().getVascEntryResourceResolver().getTextValue(nullLabel);
VascSelectItem item = new VascSelectItem(nullLabelText,null,nullKeyValue);
result.add(item);
}
@ -82,7 +82,7 @@ public class VascChoicesSelectItemModel implements VascSelectItemModel,Serializa
if (val) {
name = key;
} else {
name = entry.getVascFrontendData().getVascEntryResourceResolver().getTextValue(key);
name = entry.getVascFrontendController().getVascEntryResourceResolver().getTextValue(key);
}
item.setLabel(name);
Object value = vascChoices.choisesValues()[index];

View file

@ -41,6 +41,10 @@ public @interface VascFieldOrder {
/**
* The editor of the method/field
*/
int orderIndex() default 0;
int order() default 0;
int orderCreate() default 0;
int orderEdit() default 0;
int orderList() default 0;
}

View file

@ -47,18 +47,41 @@ abstract public class AbstractVascBackendState implements VascBackendState {
parameters = new HashMap<String,Object>(10);
}
public void setDataParameter(String key,Object data) {
/**
* @see net.forwardfire.vasc.backend.VascBackendState#setDataParameter(java.lang.String, java.lang.Object)
*/
public void setDataParameter(String key, Object data) {
parameters.put(key,data);
}
/**
* @see net.forwardfire.vasc.backend.VascBackendState#removeDataParameter(java.lang.String)
*/
public void removeDataParameter(String key) {
parameters.remove(key);
}
/**
* @see net.forwardfire.vasc.backend.VascBackendState#removeDataParameterAll()
*/
public void removeDataParameterAll() {
parameters.clear();
}
/**
* @see net.forwardfire.vasc.backend.VascBackendState#getDataParameter(java.lang.String)
*/
public Object getDataParameter(String key) {
return parameters.get(key);
}
/**
* @see net.forwardfire.vasc.backend.VascBackendState#getDataParameterKeys()
*/
public Set<String> getDataParameterKeys() {
return parameters.keySet();
}
/**
* @see net.forwardfire.vasc.backend.VascBackend#getPageIndex()
*/

View file

@ -34,6 +34,8 @@ import java.util.Set;
public interface VascBackendState extends Serializable {
public void setDataParameter(String key,Object data);
public void removeDataParameter(String key);
public void removeDataParameterAll();
public Object getDataParameter(String key);
public Set<String> getDataParameterKeys();

View file

@ -9,15 +9,21 @@ import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryControllerLocal;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.VascEntryFieldLocal;
import net.forwardfire.vasc.core.VascEntryFieldSet;
import net.forwardfire.vasc.core.VascEntryFieldSetLocal;
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.VascLinkEntry;
import net.forwardfire.vasc.core.VascEntryLink;
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
import net.forwardfire.vasc.core.entry.VascEntryRecordCreator;
import net.forwardfire.vasc.impl.DefaultVascEntry;
import net.forwardfire.vasc.impl.DefaultVascEntryField;
import net.forwardfire.vasc.impl.DefaultVascEntryFieldSet;
import net.forwardfire.vasc.impl.DefaultVascLinkEntry;
import net.forwardfire.vasc.impl.DefaultVascEntryLink;
public class VirtualVascBackend extends AbstractVascBackend {
@ -45,12 +51,12 @@ public class VirtualVascBackend extends AbstractVascBackend {
} else if ("linkentries".equals(vascType)) {
if (entryId!=null) {
VascEntry ve = vascController.getVascEntryController().getVascEntryById(entryId);
result.addAll(ve.getVascLinkEntries());
result.addAll(ve.getVascEntryLinks());
}
} else if ("listoptions".equals(vascType)) {
if (entryId!=null) {
VascEntry ve = vascController.getVascEntryController().getVascEntryById(entryId);
result.addAll(ve.getListOptions());
result.addAll(ve.getVascEntryListOptions());
}
}
@ -74,45 +80,45 @@ public class VirtualVascBackend extends AbstractVascBackend {
if (object instanceof VascEntry) {
entryId = ((VascEntry)object).getId();
}
VascEntry veReal = ((VascEntryControllerLocal)vascController.getVascEntryController()).getMasterVascEntryById(entryId);
VascEntryLocal veReal = (VascEntryLocal)((VascEntryControllerLocal)vascController.getVascEntryController()).getMasterVascEntryById(entryId);
if ("entry".equals(vascType)) {
} else if ("field".equals(vascType)) {
VascEntryField vef = (VascEntryField)object;
VascEntryFieldLocal vef = (VascEntryFieldLocal)object;
if (removeReal) {
VascEntryField vefReal = veReal.getVascEntryFieldById(vef.getId());
veReal.removeVascEntryField(vefReal);
veReal.removeVascEntryField((VascEntryFieldLocal)vefReal);
}
if (addEdit) {
veReal.addVascEntryField(vef);
}
} else if ("fieldset".equals(vascType)) {
VascEntryFieldSet vefs = (VascEntryFieldSet)object;
VascEntryFieldSetLocal vefs = (VascEntryFieldSetLocal)object;
if (removeReal) {
VascEntryFieldSet vefsReal = veReal.getVascEntryFieldSetById(vefs.getId());
veReal.removeVascEntryFieldSet(vefsReal);
veReal.removeVascEntryFieldSet((VascEntryFieldSetLocal)vefsReal);
}
if (addEdit) {
veReal.addVascEntryFieldSet(vefs);
}
} else if ("linkentries".equals(vascType)) {
VascLinkEntry vefs = (VascLinkEntry)object;
VascEntryLinkLocal vefs = (VascEntryLinkLocal)object;
if (removeReal) {
VascLinkEntry vefsReal = veReal.getVascLinkEntryById(vefs.getId());
veReal.removeVascLinkEntry(vefsReal);
VascEntryLink vefsReal = veReal.getVascEntryLinkById(vefs.getId());
veReal.removeVascEntryLink((VascEntryLinkLocal)vefsReal);
}
if (addEdit) {
veReal.addVascLinkEntry(vefs);
veReal.addVascEntryLink(vefs);
}
} else if ("listoptions".equals(vascType)) {
VascEntryField vef = (VascEntryField)object;
VascEntryListOptionLocal vef = (VascEntryListOptionLocal)object;
if (removeReal) {
VascEntryField vefReal = veReal.getListOptionById(vef.getId());
veReal.removeListOption(vefReal);
VascEntryListOption vefReal = veReal.getVascEntryListOptionById(vef.getId());
veReal.removeVascEntryListOption((VascEntryListOptionLocal)vefReal);
}
if (addEdit) {
veReal.addListOption(vef);
veReal.addVascEntryListOption(vef);
}
}
return object;
@ -131,7 +137,7 @@ public class VirtualVascBackend extends AbstractVascBackend {
} else if ("fieldset".equals(vascType)) {
return new BeanVascEntryRecordCreator(DefaultVascEntryFieldSet.class);
} else if ("linkentries".equals(vascType)) {
return new BeanVascEntryRecordCreator(DefaultVascLinkEntry.class);
return new BeanVascEntryRecordCreator(DefaultVascEntryLink.class);
} else if ("listoptions".equals(vascType)) {
return new BeanVascEntryRecordCreator(DefaultVascEntryField.class);
}

View file

@ -37,9 +37,7 @@ import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
* @version 1.0 Oct 27, 2007
*/
public class VascBackendProxySearch extends AbstractVascBackendProxy {
private long records = 0;
/**
* @see java.lang.Object#clone()
*/
@ -75,11 +73,9 @@ public class VascBackendProxySearch extends AbstractVascBackendProxy {
public List<Object> execute(VascBackendState state) throws VascException {
List<Object> result = backend.execute(state);
if (state.getSearchString()==null) {
if (backend.isPageable()) {
records = backend.fetchTotalExecuteSize(state);
} else {
records = result.size();
}
return result;
}
if (state.getSearchString().isEmpty()) {
return result;
}
String searchString = state.getSearchString().toLowerCase();
@ -135,12 +131,12 @@ public class VascBackendProxySearch extends AbstractVascBackendProxy {
}
*/
}
records = search.size();
//records = search.size();
return search;
}
@Override
public long fetchTotalExecuteSize(VascBackendState state) {
return records;
return backend.fetchTotalExecuteSize(state);
}
}

View file

@ -28,6 +28,7 @@ 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;
@ -71,7 +72,7 @@ public class VascBackendProxySort extends AbstractVascBackendProxy {
}
try {
final VascEntryField field = entry.getVascEntryFieldById(state.getSortField());
final VascEntryFieldValue fieldValue = backend.provideVascEntryFieldValue(field.clone());
final VascEntryFieldValue fieldValue = backend.provideVascEntryFieldValue(((VascEntryFieldLocal)field).clone()); // TODO fixme
Collections.sort(result, new Comparator<Object>() {
@SuppressWarnings("rawtypes")
public int compare(Object o1, Object o2) {

View file

@ -0,0 +1,110 @@
/*
* 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 net.forwardfire.vasc.backend.VascBackendController;
/**
* AbstractVascEntryFieldLocal
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
abstract public class AbstractVascControllerLocal implements VascControllerLocal {
private VascEntryConfigController vascEntryConfigController = null;
private VascBackendController vascBackendController = null;
private VascEntryController vascEntryController = null;
private VascEntryFieldTypeController vascEntryFieldTypeController = null;
private VascEventChannelController vascEventChannelController = null;
/**
* @return the vascEntryConfigController
*/
public VascEntryConfigController getVascEntryConfigController() {
return vascEntryConfigController;
}
/**
* @param vascEntryConfigController the vascEntryConfigController to set
*/
public void setVascEntryConfigController(VascEntryConfigController vascEntryConfigController) {
this.vascEntryConfigController = vascEntryConfigController;
}
/**
* @return the vascEventChannelController
*/
public VascEventChannelController getVascEventChannelController() {
return vascEventChannelController;
}
/**
* @param vascEventChannelController the vascEventChannelController to set
*/
public void setVascEventChannelController(VascEventChannelController vascEventChannelController) {
this.vascEventChannelController = vascEventChannelController;
}
/**
* @return the vascBackendController
*/
public VascBackendController getVascBackendController() {
return vascBackendController;
}
/**
* @param vascBackendController the vascBackendController to set
*/
public void setVascBackendController(VascBackendController vascBackendController) {
this.vascBackendController = vascBackendController;
}
/**
* @return the vascEntryController
*/
public VascEntryController getVascEntryController() {
return vascEntryController;
}
/**
* @param vascEntryController the vascEntryController to set
*/
public void setVascEntryController(VascEntryController vascEntryController) {
this.vascEntryController = vascEntryController;
}
/**
* @return the vascEntryFieldController
*/
public VascEntryFieldTypeController getVascEntryFieldTypeController() {
return vascEntryFieldTypeController;
}
/**
* @param vascEntryFieldController the vascEntryFieldController to set
*/
public void setVascEntryFieldTypeController(VascEntryFieldTypeController vascEntryFieldTypeController) {
this.vascEntryFieldTypeController = vascEntryFieldTypeController;
}
}

View file

@ -0,0 +1,362 @@
/*
* 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.List;
import net.forwardfire.vasc.core.base.AbstractVascBaseIdRoleCrudOrderMetaLocal;
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
import net.forwardfire.vasc.validators.VascValidator;
/**
* AbstractVascEntryFieldLocal
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
@SuppressWarnings("serial")
abstract public class AbstractVascEntryFieldLocal extends AbstractVascBaseIdRoleCrudOrderMetaLocal implements VascEntryFieldLocal {
private VascEntry vascEntry = null;
private String backendName = null;
private String displayName = null;
private VascEntryFieldType vascEntryFieldType = null;
private VascEntryFieldValue vascEntryFieldValue = null;
private List<VascValidator> vascValidators = null;
private Object defaultValue = null;
private Integer sizeList = null;
private Integer sizeEdit = null;
private String styleList = null;
private String styleEdit = null;
private String choices = null;
private Boolean choicesAsRadio = null;
private Boolean optional = null;
private Boolean editBlank = null;
private Boolean sortable = null;
private Boolean sumable = null;
private Boolean graphable = null;
public AbstractVascEntryFieldLocal() {
vascValidators = new ArrayList<VascValidator>(5);
}
@Override
public VascEntryFieldLocal clone() throws CloneNotSupportedException {
Object clone = cloneCreate();
cloneFields(clone);
return (VascEntryFieldLocal)clone;
}
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascEntryFieldLocal clone = (VascEntryFieldLocal)cloneObject;
// TODO: rm
// vascEntry and
// this polls full backend..
//result.vascEntryFieldValue=vascEntryFieldValue;
clone.setBackendName(getBackendName());
clone.setDisplayName(getDisplayName());
clone.setVascEntryFieldType(getVascEntryFieldType());
for (VascValidator v:getVascValidators()) {
clone.addVascValidator(v.clone());
}
clone.setDefaultValue(getDefaultValue());
clone.setSizeList(getSizeList());
clone.setSizeEdit(getSizeEdit());
clone.setStyleList(getStyleList());
clone.setStyleEdit(getStyleEdit());
clone.setChoices(getChoices());
clone.setChoicesAsRadio(getChoicesAsRadio());
clone.setOptional(getOptional());
clone.setEditBlank(getEditBlank());
clone.setSortable(getSortable());
clone.setSumable(getSumable());
clone.setGraphable(getGraphable());
}
public VascEntry getVascEntry() {
return vascEntry;
}
public void setVascEntry(VascEntry vascEntry) {
this.vascEntry=vascEntry;
}
/**
* @return the vascEntryFieldType
*/
public VascEntryFieldType getVascEntryFieldType() {
return vascEntryFieldType;
}
/**
* @param vascEntryFieldType the vascEntryFieldType to set
*/
public void setVascEntryFieldType(VascEntryFieldType vascEntryFieldType) {
this.vascEntryFieldType = vascEntryFieldType;
}
/**
* @return the backendName
*/
public String getBackendName() {
return backendName;
}
/**
* @param backendName the backendName to set
*/
public void setBackendName(String backendName) {
this.backendName = backendName;
}
/**
* @return the vascEntryFieldValue
*/
public VascEntryFieldValue getVascEntryFieldValue() {
return vascEntryFieldValue;
}
/**
* @param vascEntryFieldValue the vascEntryFieldValue to set
*/
public void setVascEntryFieldValue(VascEntryFieldValue vascEntryFieldValue) {
this.vascEntryFieldValue = vascEntryFieldValue;
}
/**
* @return the vascValidators
*/
public List<VascValidator> getVascValidators() {
return vascValidators;
}
/**
* @param vascValidators the vascValidators to add
*/
public void addVascValidator(VascValidator vascValidator) {
this.vascValidators.add(vascValidator);
}
/**
* @param vascValidators the vascValidators to remove
*/
public void removeVascValidator(VascValidator vascValidator) {
this.vascValidators.remove(vascValidator);
}
/**
* @return the defaultValue
*/
public Object getDefaultValue() {
return defaultValue;
}
/**
* @param defaultValue the defaultValue to set
*/
public void setDefaultValue(Object defaultValue) {
this.defaultValue = defaultValue;
}
/**
* @return the sizeList
*/
public Integer getSizeList() {
return sizeList;
}
/**
* @param sizeList the sizeList to set
*/
public void setSizeList(Integer sizeList) {
this.sizeList = sizeList;
}
/**
* @return the sizeEdit
*/
public Integer getSizeEdit() {
return sizeEdit;
}
/**
* @param sizeEdit the sizeEdit to set
*/
public void setSizeEdit(Integer sizeEdit) {
this.sizeEdit = sizeEdit;
}
/**
* @return the styleList
*/
public String getStyleList() {
return styleList;
}
/**
* @param styleList the styleList to set
*/
public void setStyleList(String styleList) {
this.styleList = styleList;
}
/**
* @return the styleEdit
*/
public String getStyleEdit() {
return styleEdit;
}
/**
* @param styleEdit the styleEdit to set
*/
public void setStyleEdit(String styleEdit) {
this.styleEdit = styleEdit;
}
/**
* @return the choices
*/
public String getChoices() {
return choices;
}
/**
* @param choices the choices to set
*/
public void setChoices(String choices) {
this.choices = choices;
}
/**
* @return the optional
*/
public Boolean getOptional() {
return optional;
}
/**
* @param optional the optional to set
*/
public void setOptional(Boolean optional) {
this.optional = optional;
}
/**
* @return the choicesAsRadio
*/
public Boolean getChoicesAsRadio() {
return choicesAsRadio;
}
/**
* @param choicesAsRadio the choicesAsRadio to set
*/
public void setChoicesAsRadio(Boolean choicesAsRadio) {
this.choicesAsRadio = choicesAsRadio;
}
/**
* @return the editBlank
*/
public Boolean getEditBlank() {
return editBlank;
}
/**
* @param editBlank the editBlank to set
*/
public void setEditBlank(Boolean editBlank) {
this.editBlank = editBlank;
}
/**
* @return the displayName
*/
public String getDisplayName() {
return displayName;
}
/**
* @param displayName the displayName to set
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
* @return the sortable
*/
public Boolean getSortable() {
return sortable;
}
/**
* @param sortable the sortable to set
*/
public void setSortable(Boolean sortable) {
this.sortable = sortable;
}
/**
* @return the sumable
*/
public Boolean getSumable() {
return sumable;
}
/**
* @param sumable the sumable to set
*/
public void setSumable(Boolean sumable) {
this.sumable = sumable;
}
/**
* @return the graphable
*/
public Boolean getGraphable() {
return graphable;
}
/**
* @param graphable the graphable to set
*/
public void setGraphable(Boolean graphable) {
this.graphable = graphable;
}
}

View file

@ -0,0 +1,129 @@
/*
* 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.List;
import net.forwardfire.vasc.core.base.AbstractVascBaseIdRoleCrudOrderMetaLocal;
/**
* AbstractVascEntryFieldSetLocal
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
@SuppressWarnings("serial")
abstract public class AbstractVascEntryFieldSetLocal extends AbstractVascBaseIdRoleCrudOrderMetaLocal implements VascEntryFieldSetLocal {
private String styleList = null;
private String styleEdit = null;
private Boolean collapsed = false;
private List<String> vascEntryFieldIds = null;
public AbstractVascEntryFieldSetLocal() {
vascEntryFieldIds = new ArrayList<String>(10);
}
@Override
public VascEntryFieldSetLocal clone() throws CloneNotSupportedException {
Object clone = cloneCreate();
cloneFields(clone);
return (VascEntryFieldSetLocal)clone;
}
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascEntryFieldSetLocal clone = (VascEntryFieldSetLocal)cloneObject;
clone.setStyleList(getStyleList());
clone.setStyleEdit(getStyleEdit());
clone.setCollapsed(getCollapsed());
for (String id:getVascEntryFieldIds()) {
clone.addVascEntryFieldId(id);
}
}
/**
* @return the styleList
*/
public String getStyleList() {
return styleList;
}
/**
* @param styleList the styleList to set
*/
public void setStyleList(String styleList) {
this.styleList = styleList;
}
/**
* @return the styleEdit
*/
public String getStyleEdit() {
return styleEdit;
}
/**
* @param styleEdit the styleEdit to set
*/
public void setStyleEdit(String styleEdit) {
this.styleEdit = styleEdit;
}
/**
* @return the collapsed
*/
public Boolean getCollapsed() {
return collapsed;
}
/**
* @param collapsed the collapsed to set
*/
public void setCollapsed(Boolean collapsed) {
this.collapsed = collapsed;
}
/**
* @return the vascEntryFieldIds
*/
public List<String> getVascEntryFieldIds() {
return vascEntryFieldIds;
}
/**
* @param vascEntryFieldIds the vascEntryFieldIds to set
*/
public void addVascEntryFieldId(String vascEntryFieldId) {
vascEntryFieldIds.add(vascEntryFieldId);
}
/**
* @param vascEntryFieldIds the vascEntryFieldIds to set
*/
public void removeVascEntryFieldId(String vascEntryFieldId) {
vascEntryFieldIds.remove(vascEntryFieldId);
}
}

View file

@ -0,0 +1,237 @@
/*
* 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.HashMap;
import java.util.List;
import java.util.Map;
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.validators.VascValidator;
/**
* AbstractVascEntryFieldTypeLocal
*
* @author Willem Cazander
* @version 1.0 Aug 2, 2007
*/
@SuppressWarnings("serial")
abstract public class AbstractVascEntryFieldTypeLocal extends AbstractVascBaseIdLocal implements VascEntryFieldTypeLocal {
private Class<?> autoDetectClass = null;
private List<VascValidator> vascValidators = null;
private Map<String,String> properties = null;
private ObjectConverter objectConverter = null;
private Object dataObject = null;
private String uiComponentId = null;
private String inputMask = null;
public AbstractVascEntryFieldTypeLocal() {
vascValidators = new ArrayList<VascValidator>(4);
properties = new HashMap<String,String>();
}
@Override
public VascEntryFieldTypeLocal clone() throws CloneNotSupportedException {
Object clone = cloneCreate();
cloneFields(clone);
return (VascEntryFieldTypeLocal)clone;
}
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascEntryFieldTypeLocal clone = (VascEntryFieldTypeLocal)cloneObject;
clone.setAutoDetectClass(getAutoDetectClass());
for (VascValidator v:getVascValidators()) {
clone.addVascValidator(v.clone());
}
for (String key:getPropertyNames()) {
clone.setProperty(key, getProperty(key));
}
if (getObjectConverter()!=null) {
clone.setObjectConverter(getObjectConverter().clone()); // use clone
}
clone.setDataObject(getDataObject());
clone.setUIComponentId(getUIComponentId());
clone.setInputMask(getInputMask());
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#getProperty(java.lang.String)
*/
public String getProperty(String name) {
return properties.get(name);
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#setProperty(java.lang.String, java.lang.String)
*/
public void setProperty(String name, String value) {
properties.put(name, value);
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#getPropertyNames()
*/
public List<String> getPropertyNames() {
return new ArrayList<String>(properties.keySet());
}
/**
* @return the dataObject
*/
public Object getDataObject() {
return dataObject;
}
/**
* @param dataObject the dataObject to set
*/
public void setDataObject(Object dataObject) {
this.dataObject = dataObject;
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#getVascValidators()
*/
public List<VascValidator> getVascValidators() {
return vascValidators;
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#addVascValidator(net.forwardfire.vasc.validators.VascValidator)
*/
public void addVascValidator(VascValidator vascValidator) {
vascValidators.add(vascValidator);
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#removeVascValidator(net.forwardfire.vasc.validators.VascValidator)
*/
public void removeVascValidator(VascValidator vascValidator) {
vascValidators.remove(vascValidator);
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#getAutoDetectClass()
*/
public Class<?> getAutoDetectClass() {
return autoDetectClass;
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#setAutoDetectClass(java.lang.Class)
*/
public void setAutoDetectClass(Class<?> classObject) {
autoDetectClass=classObject;
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#getInputMask()
*/
public String getInputMask() {
return inputMask;
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#setInputMask(java.lang.String)
*/
public void setInputMask(String inputMask) {
this.inputMask=inputMask;
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#getUIComponentId()
*/
public String getUIComponentId() {
return uiComponentId;
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#setUIComponentId(java.lang.String)
*/
public void setUIComponentId(String uiComponentId) {
this.uiComponentId=uiComponentId;
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#getUIComponentCount()
*/
public int getUIComponentCount(VascEntryField entryField) throws VascException {
return 1;
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#provideEditorUIComponent(int)
*/
public VascUIComponent provideEditorUIComponent(int index,VascEntryField entryField) throws VascException {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null) {
cl = entryField.getClass().getClassLoader(); // fallback
}
String compId = getUIComponentId();
if (compId==null) {
compId = VascUIComponent.VASC_TEXT;
}
return entryField.getVascEntry().getVascFrontendController().getVascUIComponent(compId);
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#provideLabelUIComponent(int)
*/
public VascUIComponent provideLabelUIComponent(int index,VascEntryField entryField) throws VascException {
return entryField.getVascEntry().getVascFrontendController().getVascUIComponent(VascUIComponent.VASC_LABEL);
}
/**
* @see net.forwardfire.vasc.core.VascEntryFieldType#provideEditorVascValueModel()
*/
public VascValueModel provideEditorVascValueModel(int index,VascEntryField entryField) throws VascException {
if (index>0) {
throw new IllegalArgumentException("You have to override provideEditorVascValueModel if multi editor support is needed");
}
VascValueModel model = new VascValueModel();
return model;
}
/**
* @return the objectConverter
*/
public ObjectConverter getObjectConverter() {
return objectConverter;
}
/**
* @param objectConverter the objectConverter to set
*/
public void setObjectConverter(ObjectConverter objectConverter) {
this.objectConverter = objectConverter;
}
}

View file

@ -0,0 +1,131 @@
/*
* 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.HashMap;
import java.util.List;
import java.util.Map;
import net.forwardfire.vasc.core.base.AbstractVascBaseIdRoleViewOrderMetaLocal;
/**
* AbstractVascEntryLinkLocal
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
@SuppressWarnings("serial")
abstract public class AbstractVascEntryLinkLocal extends AbstractVascBaseIdRoleViewOrderMetaLocal implements VascEntryLinkLocal {
private String vascEntryId = null;
private Map<String,String> entryParameterFieldIds = new HashMap<String,String>(3);
private Map<String,String> entryCreateFieldValues = new HashMap<String,String>(3);
private VascEntryLinkType vascLinkEntryType = null;
private String doActionId = null;
@Override
public VascEntryLinkLocal clone() throws CloneNotSupportedException {
Object clone = cloneCreate();
cloneFields(clone);
return (VascEntryLinkLocal)clone;
}
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascEntryLinkLocal clone = (VascEntryLinkLocal)cloneObject;
clone.setVascEntryId(getVascEntryId());
clone.setDoActionId(getDoActionId());
clone.setVascLinkEntryType(getVascLinkEntryType());
for (String key:getEntryParameterFieldIdKeys()) {
clone.addEntryParameterFieldId(key, getEntryParameterFieldId(key));
}
for (String key:getEntryCreateFieldValueKeys()) {
clone.addEntryCreateFieldValue(key, getEntryCreateFieldValue(key));
}
}
public String getEntryParameterFieldId(String parameterName) {
return entryParameterFieldIds.get(parameterName);
}
public void addEntryParameterFieldId(String parameterName,String valueFieldId) {
entryParameterFieldIds.put(parameterName, valueFieldId);
}
public List<String> getEntryParameterFieldIdKeys() {
return new ArrayList<String>(entryParameterFieldIds.keySet());
}
public String getEntryCreateFieldValue(String valueFieldId) {
return entryCreateFieldValues.get(valueFieldId);
}
public void addEntryCreateFieldValue(String valueFieldId,String selectedFieldId) {
entryCreateFieldValues.put(valueFieldId, selectedFieldId);
}
public List<String> getEntryCreateFieldValueKeys() {
return new ArrayList<String>(entryCreateFieldValues.keySet());
}
/**
* @return the vascEntryId
*/
public String getVascEntryId() {
return vascEntryId;
}
/**
* @param vascEntryId the vascEntryId to set
*/
public void setVascEntryId(String vascEntryId) {
this.vascEntryId = vascEntryId;
}
/**
* @return the vascLinkEntryType
*/
public VascEntryLinkType getVascLinkEntryType() {
return vascLinkEntryType;
}
/**
* @param vascLinkEntryType the vascLinkEntryType to set
*/
public void setVascLinkEntryType(VascEntryLinkType vascLinkEntryType) {
this.vascLinkEntryType = vascLinkEntryType;
}
/**
* @return the doActionId
*/
public String getDoActionId() {
return doActionId;
}
/**
* @param doActionId the doActionId to set
*/
public void setDoActionId(String doActionId) {
this.doActionId = doActionId;
}
}

View file

@ -0,0 +1,40 @@
/*
* 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;
/**
* AbstractVascEntryListOptionLocal
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
@SuppressWarnings("serial")
abstract public class AbstractVascEntryListOptionLocal extends AbstractVascEntryFieldLocal implements VascEntryListOptionLocal {
@Override
public VascEntryListOptionLocal clone() throws CloneNotSupportedException {
Object clone = cloneCreate();
cloneFields(clone);
return (VascEntryListOptionLocal)clone;
}
}

View file

@ -0,0 +1,903 @@
/*
* 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.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.forwardfire.vasc.backend.VascBackendFilter;
import net.forwardfire.vasc.core.actions.ColumnVascAction;
import net.forwardfire.vasc.core.actions.ColumnVascActionLocal;
import net.forwardfire.vasc.core.actions.GlobalVascAction;
import net.forwardfire.vasc.core.actions.GlobalVascActionLocal;
import net.forwardfire.vasc.core.actions.RowVascAction;
import net.forwardfire.vasc.core.actions.RowVascActionLocal;
import net.forwardfire.vasc.core.base.AbstractVascBaseIdRoleCrudLocal;
import net.forwardfire.vasc.core.entry.VascEntryFieldEventChannel;
import net.forwardfire.vasc.frontend.VascFrontendController;
/**
* AbstractVascEntryLocal
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
@SuppressWarnings("serial")
abstract public class AbstractVascEntryLocal extends AbstractVascBaseIdRoleCrudLocal implements VascEntryLocal {
private String name = null;
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 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 Map<String,Object> entryParameters = null;
private VascEntryFieldEventChannel vascEntryFieldEventChannel = null;
private Map<String,List<String>> eventEntryFrontendEventListeners = null;
private List<String> eventEntryBackendEventListeners = null;
private List<VascEntryListOptionLocal> vascEntryListOptions = null;
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);
}
@Override
public VascEntryLocal clone() throws CloneNotSupportedException {
Object clone = cloneCreate();
cloneFields(clone);
return (VascEntryLocal)clone;
}
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascEntryLocal clone = (VascEntryLocal)cloneObject;
clone.setName(getName());
clone.setHelpId(getHelpId());
clone.setImage(getImage());
clone.setListDescription(getListDescription());
clone.setListImage(getListImage());
clone.setEditDescription(getEditDescription());
clone.setEditImage(getEditImage());
clone.setCreateDescription(getCreateDescription());
clone.setCreateImage(getCreateImage());
clone.setDeleteDescription(getDeleteDescription());
clone.setDeleteImage(getDeleteImage());
clone.setPrimaryKeyFieldId(getPrimaryKeyFieldId());
clone.setDisplayNameFieldId(getDisplayNameFieldId());
clone.setDelete(getDelete());
clone.setRolesDelete(getRolesDelete());
for (VascEntryFieldLocal field:getVascEntryFieldsLocal()) {
VascEntryFieldLocal fieldClone = field.clone();
fieldClone.setVascEntry(clone); // TODO rm me
clone.addVascEntryField(fieldClone);
}
for (RowVascActionLocal a:getRowActionsLocal()) { clone.addRowAction(a.clone()); }
for (ColumnVascActionLocal a:getColumnActionsLocal()) { clone.addColumnAction(a.clone()); }
for (GlobalVascActionLocal a:getGlobalActionsLocal()) { clone.addGlobalAction(a.clone()); }
for (GlobalVascActionLocal a:getExportActionsLocal()) { clone.addExportAction(a.clone()); }
for (VascEntryFieldSetLocal set:getVascEntryFieldSetsLocal()) {
clone.addVascEntryFieldSet(set.clone());
}
for (VascEntryLinkLocal link:getVascEntryLinksLocal()) {
clone.addVascEntryLink(link.clone());
}
for (String key:getEntryParameterKeys()) {
clone.setEntryParameter(key, getEntryParameter(key));
}
// TODO: vascEntryFieldEventChannel
for (String key:eventEntryFrontendEventListeners.keySet()) {
List<String> list = eventEntryFrontendEventListeners.get(key);
if (list==null) {
continue;
}
for (String listener:list) {
clone.addVascEntryFrontendEventListener(listener, key);
}
}
for (String key:eventEntryBackendEventListeners) {
clone.addVascEntryBackendEventListener(key);
}
for (VascEntryListOptionLocal option:vascEntryListOptions) {
VascEntryListOptionLocal optionClone = option.clone();
optionClone.setVascEntry(clone);
clone.addVascEntryListOption(optionClone);
}
for (VascBackendFilter filter:backendFilters) {
clone.addVascBackendFilter(filter.clone());
}
for (String key:eventEntryFrontendActions.keySet()) {
List<String> list = eventEntryFrontendActions.get(key);
if (list==null) {
continue;
}
for (String listener:list) {
clone.addVascEntryFrontendAction(listener, key);
}
}
clone.setBackendId(getBackendId());
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the helpId
*/
public String getHelpId() {
return helpId;
}
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId) {
this.helpId = helpId;
}
/**
* @return the image
*/
public String getImage() {
return image;
}
/**
* @param image the image to set
*/
public void setImage(String image) {
this.image = image;
}
/**
* @return the listDescription
*/
public String getListDescription() {
return listDescription;
}
/**
* @param listDescription the listDescription to set
*/
public void setListDescription(String listDescription) {
this.listDescription = listDescription;
}
/**
* @return the listImage
*/
public String getListImage() {
return listImage;
}
/**
* @param listImage the listImage to set
*/
public void setListImage(String listImage) {
this.listImage = listImage;
}
/**
* @return the editDescription
*/
public String getEditDescription() {
return editDescription;
}
/**
* @param editDescription the editDescription to set
*/
public void setEditDescription(String editDescription) {
this.editDescription = editDescription;
}
/**
* @return the editImage
*/
public String getEditImage() {
return editImage;
}
/**
* @param editImage the editImage to set
*/
public void setEditImage(String editImage) {
this.editImage = editImage;
}
/**
* @return the deleteDescription
*/
public String getDeleteDescription() {
return deleteDescription;
}
/**
* @param deleteDescription the deleteDescription to set
*/
public void setDeleteDescription(String deleteDescription) {
this.deleteDescription = deleteDescription;
}
/**
* @return the deleteImage
*/
public String getDeleteImage() {
return deleteImage;
}
/**
* @param deleteImage the deleteImage to set
*/
public void setDeleteImage(String deleteImage) {
this.deleteImage = deleteImage;
}
/**
* @return the createDescription
*/
public String getCreateDescription() {
return createDescription;
}
/**
* @param createDescription the createDescription to set
*/
public void setCreateDescription(String createDescription) {
this.createDescription = createDescription;
}
/**
* @return the createImage
*/
public String getCreateImage() {
return createImage;
}
/**
* @param createImage the createImage to set
*/
public void setCreateImage(String createImage) {
this.createImage = createImage;
}
/**
* @return the primaryKeyFieldId
*/
public String getPrimaryKeyFieldId() {
return primaryKeyFieldId;
}
/**
* @param primaryKeyFieldId the primaryKeyFieldId to set
*/
public void setPrimaryKeyFieldId(String primaryKeyFieldId) {
this.primaryKeyFieldId = primaryKeyFieldId;
}
/**
* @return the displayNameFieldId
*/
public String getDisplayNameFieldId() {
return displayNameFieldId;
}
/**
* @param displayNameFieldId the displayNameFieldId to set
*/
public void setDisplayNameFieldId(String displayNameFieldId) {
this.displayNameFieldId = displayNameFieldId;
}
/**
* @return the delete
*/
public Boolean getDelete() {
return delete;
}
/**
* @param delete the delete to set
*/
public void setDelete(Boolean delete) {
this.delete = delete;
}
/**
* @return the rolesDelete
*/
public String getRolesDelete() {
return rolesDelete;
}
/**
* @param rolesDelete the rolesDelete to set
*/
public void setRolesDelete(String rolesDelete) {
this.rolesDelete = rolesDelete;
}
/**
* @return the vascFields
*/
public Collection<VascEntryField> getVascEntryFields() {
return new ArrayList<VascEntryField>(vascFields);
}
/**
* @return the vascFields
*/
public Collection<VascEntryFieldLocal> getVascEntryFieldsLocal() {
return vascFields;
}
/**
* @param vascField the vascFields to add
*/
public void addVascEntryField(VascEntryFieldLocal vascField) {
vascFields.add(vascField);
}
/**
* @param vascField the vascFields to remove
*/
public void removeVascEntryField(VascEntryFieldLocal vascField) {
vascFields.remove(vascField);
}
/**
* @see net.forwardfire.vasc.core.VascEntry#getVascEntryFieldById(java.lang.String)
*/
public VascEntryField getVascEntryFieldById(String id) {
for (VascEntryField field:vascFields) {
if (id.equals(field.getId())) {
return field;
}
}
return null;
}
/**
* @return the rowActions
*/
public Collection<RowVascAction> getRowActions() {
return new ArrayList<RowVascAction>(rowActions);
}
/**
* @return the RowVascAction
*/
public RowVascAction getRowActionById(String actionId) {
for (RowVascAction a:rowActions) {
if (a.getId().equals(actionId)) {
return a;
}
}
return null;
}
/**
* @param rowAction the rowAction to add
*/
public void addRowAction(RowVascActionLocal rowAction) {
rowActions.add(rowAction);
}
/**
* @param rowAction the rowAction to remove
*/
public void removeRowAction(RowVascActionLocal rowAction) {
rowActions.remove(rowAction);
}
/**
* @return the rowActions
*/
public Collection<RowVascActionLocal> getRowActionsLocal() {
return rowActions;
}
/**
* @return the columnActions
*/
public Collection<ColumnVascAction> getColumnActions() {
return new ArrayList<ColumnVascAction>(columnActions);
}
/**
* @return the ColumnVascAction
*/
public ColumnVascAction getColumnActionById(String actionId) {
for (ColumnVascAction a:columnActions) {
if (a.getId().equals(actionId)) {
return a;
}
}
return null;
}
/**
* @param columnAction the columnActions to add
*/
public void addColumnAction(ColumnVascActionLocal columnAction) {
columnActions.add(columnAction);
}
/**
* @param columnAction the columnActions to remove
*/
public void removeColumnAction(ColumnVascActionLocal columnAction) {
columnActions.remove(columnAction);
}
/**
* @return the columnActions
*/
public Collection<ColumnVascActionLocal> getColumnActionsLocal() {
return columnActions;
}
/**
* @return the globalActions
*/
public Collection<GlobalVascAction> getGlobalActions() {
return new ArrayList<GlobalVascAction>(globalActions);
}
/**
* @return the GlobalVascAction
*/
public GlobalVascAction getGlobalActionById(String actionId) {
for (GlobalVascAction a:globalActions) {
if (a.getId().equals(actionId)) {
return a;
}
}
return null;
}
/**
* @param globalAction the globalAction to add
*/
public void addGlobalAction(GlobalVascActionLocal globalAction) {
globalActions.add(globalAction);
}
/**
* @param globalAction the globalAction to remove
*/
public void removeGlobalAction(GlobalVascActionLocal globalAction) {
globalActions.remove(globalAction);
}
/**
* @return the globalActions
*/
public Collection<GlobalVascActionLocal> getGlobalActionsLocal() {
return globalActions;
}
/**
* @return the exportActions
*/
public Collection<GlobalVascAction> getExportActions() {
return new ArrayList<GlobalVascAction>(exportActions);
}
/**
* @return the GlobalVascAction exportAction
*/
public GlobalVascAction getExportActionById(String actionId) {
for (GlobalVascAction a:exportActions) {
if (a.getId().equals(actionId)) {
return a;
}
}
return null;
}
/**
* @param exportAction the exportAction to add
*/
public void addExportAction(GlobalVascActionLocal exportAction) {
exportActions.add(exportAction);
}
/**
* @param exportAction the exportAction to remove
*/
public void removeExportAction(GlobalVascActionLocal exportAction) {
exportActions.remove(exportAction);
}
/**
* @return the exportActions
*/
public Collection<GlobalVascActionLocal> getExportActionsLocal() {
return exportActions;
}
/**
* @return the vascEntryFieldSets
*/
public Collection<VascEntryFieldSet> getVascEntryFieldSets() {
return new ArrayList<VascEntryFieldSet>(vascEntryFieldSets);
}
/**
* @return the vascEntryFieldSets
*/
public Collection<VascEntryFieldSetLocal> getVascEntryFieldSetsLocal() {
return vascEntryFieldSets;
}
/**
* @return the VascEntryFieldSet
*/
public VascEntryFieldSet getVascEntryFieldSetById(String fieldSetId) {
for (VascEntryFieldSet a:vascEntryFieldSets) {
if (a.getId().equals(fieldSetId)) {
return a;
}
}
return null;
}
/**
* @param vascEntryFieldSet the vascEntryFieldSet to add
*/
public void addVascEntryFieldSet(VascEntryFieldSetLocal vascEntryFieldSet) {
vascEntryFieldSets.add(vascEntryFieldSet);
}
/**
* @param vascEntryFieldSet the vascEntryFieldSet to add
*/
public void removeVascEntryFieldSet(VascEntryFieldSetLocal vascEntryFieldSet) {
vascEntryFieldSets.remove(vascEntryFieldSet);
}
/**
* @return the vascEntryLinks
*/
public Collection<VascEntryLink> getVascEntryLinks() {
return new ArrayList<VascEntryLink>(vascEntryLinks);
}
/**
* @return the vascEntryLinks
*/
public Collection<VascEntryLinkLocal> getVascEntryLinksLocal() {
return vascEntryLinks;
}
/**
* @return the vascEntryLinks
*/
public VascEntryLink getVascEntryLinkById(String linkId) {
for (VascEntryLink a:vascEntryLinks) {
if (a.getId().equals(linkId)) {
return a;
}
}
return null;
}
/**
* @param vascEntryLink the vascEntryLink to set
*/
public void addVascEntryLink(VascEntryLinkLocal vascEntryLink) {
vascEntryLinks.add(vascEntryLink);
}
/**
* @param vascEntryLink the vascEntryLink to remove
*/
public void removeVascEntryLink(VascEntryLinkLocal vascEntryLink) {
vascEntryLinks.remove(vascEntryLink);
}
/**
* @see net.forwardfire.vasc.core.VascEntry#getEntryParameter(java.lang.String)
*/
public Object getEntryParameter(String key) {
return entryParameters.get(key);
}
/**
* @see net.forwardfire.vasc.core.VascEntry#getEntryParameterKeys()
*/
public List<String> getEntryParameterKeys() {
return new ArrayList<String>(entryParameters.keySet());
}
/**
* @see net.forwardfire.vasc.core.VascEntry#setEntryParameter(java.lang.String, java.lang.Object)
*/
public void setEntryParameter(String key, Object value) {
entryParameters.put(key, value);
}
/**
* @see net.forwardfire.vasc.core.VascEntry#removeEntryParameter(java.lang.String)
*/
public void removeEntryParameter(String key) {
entryParameters.remove(key);
}
/**
* @return the vascFrontendData
*/
public VascFrontendController getVascFrontendController() {
return vascFrontendData;
}
/**
* @param vascFrontendData the vascFrontendData to set
*/
public void setVascFrontendController(VascFrontendController vascFrontendData) {
this.vascFrontendData = vascFrontendData;
}
/**
* @return the backendId
*/
public String getBackendId() {
return backendId;
}
/**
* @param backendId the backendId to set
*/
public void setBackendId(String backendId) {
this.backendId = backendId;
}
/**
* @return the vascEntryFieldEventChannel
*/
public VascEntryFieldEventChannel getVascEntryFieldEventChannel() {
return vascEntryFieldEventChannel;
}
/**
* @param vascEntryFieldEventChannel the vascEntryFieldEventChannel to set
*/
public void setVascEntryFieldEventChannel(VascEntryFieldEventChannel vascEntryFieldEventChannel) {
this.vascEntryFieldEventChannel = vascEntryFieldEventChannel;
}
/**
* Added an VascEntryBackendEventListener
* @param listener The class of the event listener.
*/
public void addVascEntryBackendEventListener(String listener) {
eventEntryBackendEventListeners.add(listener);
}
/**
* Returns the list of VascEntryBackendEventListener
* @return
*/
public List<String> getVascEntryBackendEventListeners() {
return eventEntryBackendEventListeners;
}
/**
* Added an VascEntryFrontendEventListener
* @param listener The class of the event listener.
*/
public void addVascEntryFrontendEventListener(String listener,String frontendType) {
if (frontendType==null) {
frontendType = "__ALL__";
}
if (frontendType.isEmpty() | "all".equalsIgnoreCase(frontendType)) {
frontendType = "__ALL__";
}
List<String> typeList = eventEntryFrontendEventListeners.get(frontendType);
if (typeList==null) {
typeList = new ArrayList<String>(10);
eventEntryFrontendEventListeners.put(frontendType,typeList);
}
typeList.add(listener);
}
/**
* Returns the list of VascEntryFrontendEventListener
* @return
*/
public List<String> getVascEntryFrontendEventListenersByType(String frontendType) {
if (frontendType==null) {
frontendType = "__ALL__";
}
if (frontendType.isEmpty() | "all".equalsIgnoreCase(frontendType)) {
frontendType = "__ALL__";
}
List<String> typeList = eventEntryFrontendEventListeners.get(frontendType);
if (typeList==null) {
typeList = new ArrayList<String>(0);
}
if (frontendType.equals("__ALL__")==false) {
// also add all
List<String> typeListAll = eventEntryFrontendEventListeners.get("__ALL__");
if (typeListAll!=null) {
typeList.addAll(typeListAll);
}
}
return typeList;
}
public void addVascEntryFrontendAction(String actionClass,String frontendType) {
if (frontendType==null) {
frontendType = "__ALL__";
}
if (frontendType.isEmpty() | "all".equalsIgnoreCase(frontendType)) {
frontendType = "__ALL__";
}
List<String> typeList = eventEntryFrontendActions.get(frontendType);
if (typeList==null) {
typeList = new ArrayList<String>(10);
eventEntryFrontendActions.put(frontendType,typeList);
}
typeList.add(actionClass);
}
public List<String> getVascEntryFrontendActionsByType(String frontendType) {
if (frontendType==null) {
frontendType = "__ALL__";
}
if (frontendType.isEmpty() | "all".equalsIgnoreCase(frontendType)) {
frontendType = "__ALL__";
}
List<String> typeList = eventEntryFrontendActions.get(frontendType);
if (typeList==null) {
typeList = new ArrayList<String>(0);
}
if (frontendType.equals("__ALL__")==false) {
// also add all
List<String> typeListAll = eventEntryFrontendActions.get("__ALL__");
if (typeListAll!=null) {
typeList.addAll(typeListAll);
}
}
return typeList;
}
public List<VascEntryListOption> getVascEntryListOptions() {
return new ArrayList<VascEntryListOption>(vascEntryListOptions);
}
public Collection<VascEntryListOptionLocal> getVascEntryListOptionsLocal() {
return vascEntryListOptions;
}
public VascEntryListOption getVascEntryListOptionById(String listOptionId) {
for (VascEntryListOption vef:vascEntryListOptions) {
if (vef.getId().equals(listOptionId)) {
return vef;
}
}
return null;
}
public void addVascEntryListOption(VascEntryListOptionLocal listOption) {
if (listOption==null) {
throw new NullPointerException("can not add null listOption.");
}
vascEntryListOptions.add(listOption);
}
public void removeVascEntryListOption(VascEntryListOptionLocal listOption) {
vascEntryListOptions.remove(listOption);
}
public void addVascBackendFilter(VascBackendFilter filter) {
backendFilters.add(filter);
}
public List<VascBackendFilter> getVascBackendFilters() {
return backendFilters;
}
/**
* @return the vascDisplayOnly
*/
public Boolean getVascDisplayOnly() {
return vascDisplayOnly;
}
/**
* @param vascDisplayOnly the vascDisplayOnly to set
*/
public void setVascDisplayOnly(Boolean vascDisplayOnly) {
this.vascDisplayOnly = vascDisplayOnly;
}
}

View file

@ -36,9 +36,9 @@ import net.forwardfire.vasc.backend.VascBackendState;
* @author Willem Cazander
* @version 1.0 Dec 15, 2009
*/
@SuppressWarnings("serial")
abstract public class AbstractVascEntryState implements VascEntryState {
private static final long serialVersionUID = 1L;
private List<Object> entryDataList = null;
private Object entryDataObject = null;
private Long totalBackendRecords = null;

View file

@ -26,8 +26,9 @@ import net.forwardfire.vasc.backend.VascBackendController;
/**
* Resolvs all the resolvers.
* These resolved often point to an external locations.
* VascController hold all core controllers which resolve all the vasc data.
*
* These resolves can be proxyed to external networked locations.
*
* @author Willem Cazander
* @version 1.0 Sep 11, 2008
@ -61,10 +62,4 @@ public interface VascController {
* @return Returns the VascEventChannelController
*/
public VascEventChannelController getVascEventChannelController();
/**
*
* @return Returns the VascUserRoleController
*/
public VascUserRoleController getVascUserRoleController();
}

View file

@ -0,0 +1,60 @@
/*
* 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 net.forwardfire.vasc.backend.VascBackendController;
/**
* VascControllerLocal are the set methods to config the controller.
*
* @author Willem Cazander
* @version 1.0 May 18, 2012
*/
public interface VascControllerLocal extends VascController {
/**
* @param vascEntryConfigController the vascEntryConfigController to set
*/
public void setVascEntryConfigController(VascEntryConfigController vascEntryConfigController);
/**
* @param vascEventChannelController the vascEventChannelController to set
*/
public void setVascEventChannelController(VascEventChannelController vascEventChannelController);
/**
* @param vascBackendController the vascBackendController to set
*/
public void setVascBackendController(VascBackendController vascBackendController);
/**
* @param vascEntryController the vascEntryController to set
*/
public void setVascEntryController(VascEntryController vascEntryController);
/**
* @param vascEntryFieldController the vascEntryFieldController to set
*/
public void setVascEntryFieldTypeController(VascEntryFieldTypeController vascEntryFieldTypeController);
}

View file

@ -22,222 +22,105 @@
package net.forwardfire.vasc.core;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import net.forwardfire.vasc.backend.VascBackendFilter;
import net.forwardfire.vasc.core.actions.ColumnVascAction;
import net.forwardfire.vasc.core.actions.GlobalVascAction;
import net.forwardfire.vasc.core.actions.RowVascAction;
import net.forwardfire.vasc.core.base.VascBaseIdRoleCrud;
import net.forwardfire.vasc.core.entry.VascEntryFieldEventChannel;
import net.forwardfire.vasc.frontend.VascFrontendData;
import net.forwardfire.vasc.frontend.VascFrontendController;
/**
* The main vasc entry
* VascEntry is the main vasc entry interface which defines an editable crud entry.
*
*
* @author Willem Cazander
* @version 1.0 Mar 21, 2007
*/
public interface VascEntry extends Cloneable,Serializable {
/**
* @return the id
*/
public String getId();
/**
* @param id the id to set
*/
public void setId(String id);
public interface VascEntry extends VascBaseIdRoleCrud {
/**
* @return the name
*/
public String getName();
/**
* @param name the name to set
*/
public void setName(String name);
/**
* @return the helpId
*/
public String getHelpId();
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId);
/**
* @return the image
*/
public String getImage();
/**
* @param image the image to set
*/
public void setImage(String image);
/**
* @return the listDescription
*/
public String getListDescription();
/**
* @param listDescription the listDescription to set
*/
public void setListDescription(String listDescription);
/**
* @return the listImage
*/
public String getListImage();
/**
* @param listImage the listImage to set
*/
public void setListImage(String listImage);
/**
* @return the editDescription
*/
public String getEditDescription();
/**
* @param editDescription the editDescription to set
*/
public void setEditDescription(String editDescription);
/**
* @return the editImage
*/
public String getEditImage();
/**
* @param editImage the editImage to set
*/
public void setEditImage(String editImage);
/**
* @return the deleteDescription
*/
public String getDeleteDescription();
/**
* @param deleteDescription the deleteDescription to set
*/
public void setDeleteDescription(String deleteDescription);
/**
* @return the deleteImage
*/
public String getDeleteImage();
/**
* @param deleteImage the deleteImage to set
*/
public void setDeleteImage(String deleteImage);
/**
* @return the createDescription
*/
public String getCreateDescription();
/**
* @param createDescription the createDescription to set
*/
public void setCreateDescription(String createDescription);
/**
* @return the createImage
*/
public String getCreateImage();
/**
* @param createImage the createImage to set
*/
public void setCreateImage(String createImage);
/**
* @return the primaryKeyField
*/
public String getPrimaryKeyFieldId();
/**
* @param primaryKeyField the primaryKeyField to set
*/
public void setPrimaryKeyFieldId(String primaryKeyField);
/**
* @return the displayNameField
*/
public String getDisplayNameFieldId();
/**
* @param displayNameField the displayNameField to set
* @return the delete
*/
public void setDisplayNameFieldId(String displayNameField);
public Boolean getDelete();
/**
* @return the vascAdminList
* @return the rolesDelete
*/
public boolean isVascAdminList();
/**
* @param vascAdminList the vascAdminList to set
*/
public void setVascAdminList(boolean vascAdminList);
/**
* @return the vascAdminEdit
*/
public boolean isVascAdminEdit();
/**
* @param vascAdminEdit the vascAdminEdit to set
*/
public void setVascAdminEdit(boolean vascAdminEdit);
/**
* @return the vascAdminCreate
*/
public boolean isVascAdminCreate();
/**
* @param vascAdminCreate the vascAdminCreate to set
*/
public void setVascAdminCreate(boolean vascAdminCreate);
/**
* @return the vascAdminDelete
*/
public boolean isVascAdminDelete();
/**
* @param vascAdminDelete the vascAdminDelete to set
*/
public void setVascAdminDelete(boolean vascAdminDelete);
public String getRolesDelete();
/**
* @return the vascFields
*/
public List<VascEntryField> getVascEntryFields();
/**
* @param vascField the vascField to add
*/
public void addVascEntryField(VascEntryField vascField);
/**
* @param vascField the vascField to remove
*/
public void removeVascEntryField(VascEntryField vascField);
public Collection<VascEntryField> getVascEntryFields();
/**
* @return the vascField
@ -247,197 +130,98 @@ public interface VascEntry extends Cloneable,Serializable {
/**
* @return the rowActions
*/
public List<RowVascAction> getRowActions();
public Collection<RowVascAction> getRowActions();
/**
* @return the RowVascAction
*/
public RowVascAction getRowActionById(String actionId);
/**
* @param rowAction the rowAction to add
*/
public void addRowAction(RowVascAction rowAction);
/**
* @param rowAction the rowAction to remove
*/
public void removeRowAction(RowVascAction rowAction);
/**
* @return the columnActions
*/
public List<ColumnVascAction> getColumnActions();
public Collection<ColumnVascAction> getColumnActions();
/**
* @return the ColumnVascAction
*/
public ColumnVascAction getColumnActionById(String actionId);
/**
* @param columnAction the columnAction to add
*/
public void addColumnAction(ColumnVascAction columnAction);
/**
* @param columnAction the columnAction to remove
*/
public void removeColumnAction(ColumnVascAction columnAction);
/**
* @return the globalActions
*/
public List<GlobalVascAction> getGlobalActions();
public Collection<GlobalVascAction> getGlobalActions();
/**
* @return the GlobalVascAction
*/
public GlobalVascAction getGlobalActionById(String actionId);
/**
* @param globalAction the globalAction to add
*/
public void addGlobalAction(GlobalVascAction globalAction);
/**
* @param globalAction the globalAction to remove
*/
public void removeGlobalAction(GlobalVascAction globalAction);
/**
* @return the exportActions
*/
public List<GlobalVascAction> getExportActions();
public Collection<GlobalVascAction> getExportActions();
/**
* @return the GlobalVascAction exportAction
*/
public GlobalVascAction getExportActionById(String actionId);
/**
* @param exportAction the exportAction to add
*/
public void addExportAction(GlobalVascAction exportAction);
/**
* @param exportAction the exportAction to remove
*/
public void removeExportAction(GlobalVascAction exportAction);
/**
* @return the vascEntryFieldSets
*/
public List<VascEntryFieldSet> getVascEntryFieldSets();
public Collection<VascEntryFieldSet> getVascEntryFieldSets();
/**
* @return the VascEntryFieldSet
*/
public VascEntryFieldSet getVascEntryFieldSetById(String actionId);
/**
* @param vascEntryFieldSet the vascEntryFieldSet to add
*/
public void addVascEntryFieldSet(VascEntryFieldSet vascEntryFieldSet);
/**
* @param vascEntryFieldSet the vascEntryFieldSet to remove
*/
public void removeVascEntryFieldSet(VascEntryFieldSet vascEntryFieldSet);
/**
* @return the vascLinkEntries
*/
public List<VascLinkEntry> getVascLinkEntries();
public Collection<VascEntryLink> getVascEntryLinks();
/**
* @return the VascLinkEntry
*/
public VascLinkEntry getVascLinkEntryById(String actionId);
/**
* @param vascLinkEntry the vascLinkEntry to add
*/
public void addVascLinkEntry(VascLinkEntry vascLinkEntry);
/**
* @param vascLinkEntry the vascLinkEntry to remover
*/
public void removeVascLinkEntry(VascLinkEntry vascLinkEntry);
public VascEntryLink getVascEntryLinkById(String linkId);
public Object getEntryParameter(String key);
public void setEntryParameter(String key,Object value);
public List<String> getEntryParameterKeys();
public VascFrontendData getVascFrontendData();
public void setVascFrontendData(VascFrontendData vascFrontendData);
public VascFrontendController getVascFrontendController();
public String getBackendId();
public void setBackendId(String backendId);
/**
* @return the vascDisplayOnly
*/
public boolean isVascDisplayOnly();
/**
* @param vascDisplayOnly the vascDisplayOnly to set
*/
public void setVascDisplayOnly(boolean vascDisplayOnly);
public Boolean getVascDisplayOnly();
/**
* @return the vascEntryFieldEventChannel
*/
public VascEntryFieldEventChannel getVascEntryFieldEventChannel();
/**
* @param vascEntryFieldEventChannel the vascEntryFieldEventChannel to set
*/
public void setVascEntryFieldEventChannel(VascEntryFieldEventChannel vascEntryFieldEventChannel);
/**
* Added an VascEntryBackendEventListener
* @param listener The class of the event listener.
*/
public void addVascEntryBackendEventListener(String listener);
/**
* Returns the list of VascEntryBackendEventListener
* @return
*/
public List<String> getVascEntryBackendEventListeners();
/**
* Added an VascEntryFrontendEventListener
* @param listener The class of the event listener.
*/
public void addVascEntryFrontendEventListener(String listener,String frontendType);
/**
* Returns the list of VascEntryFrontendEventListener
* @return
*/
public List<String> getVascEntryFrontendEventListenersByType(String frontendType);
public Collection<VascEntryListOption> getVascEntryListOptions();
public VascEntryListOption getVascEntryListOptionById(String listOptionId);
public void addListOption(VascEntryField listOption);
public void removeListOption(VascEntryField listOption);
public List<VascEntryField> getListOptions();
public VascEntryField getListOptionById(String listOptionId);
public void addVascBackendFilter(VascBackendFilter filter);
public List<VascBackendFilter> getVascBackendFilters();
public void addVascEntryFrontendAction(String actionClass,String frontendType);
public List<String> getVascEntryFrontendActionsByType(String frontendType);
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public VascEntry clone() throws CloneNotSupportedException;
}

View file

@ -23,12 +23,9 @@
package net.forwardfire.vasc.core;
import java.util.List;
import java.util.Locale;
import net.forwardfire.vasc.backend.VascBackend;
import net.forwardfire.vasc.backend.proxy.VascBackendProxy;
import net.forwardfire.vasc.core.entry.VascEntryExporter;
import net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService;
/**
* Interface to make default fill/etc config plugable.
@ -38,56 +35,24 @@ import net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService;
*/
public interface VascEntryConfigController {
public VascInterfaceLoader getVascInterfaceLoader();
public Object createVascInterfaceImplemention(VascInterfaceKey key);
public Object createVascInterfaceImplementionFrontend(VascInterfaceKeyFrontend key,VascEntry entry);
public VascEntry configVascEntry(VascController vascController,String entryId) throws VascException;
public void configVascEntry(VascController vascController,VascEntry vascEntry) throws VascException;
public void addVascEntryConfigFinalizer(VascEntryConfigFinalizer vascEntryConfigFinalizer);
public void removeVascEntryConfigFinalizer(VascEntryConfigFinalizer vascEntryConfigFinalizer);
public List<VascEntryConfigFinalizer> getVascEntryConfigFinalizers();
public void configVascEntry(VascController vascController,VascEntryLocal vascEntry) throws VascException;
public VascBackend configVascBackendProxied(VascController vascController,VascEntry vascEntry) throws VascException;
public VascBackend configVascBackendProxied(VascController vascController,VascEntry vascEntry,VascBackend realBackend) throws VascException;
public void addVascBackendProxy(VascBackendProxy proxy);
public void removeVascBackendProxy(VascBackendProxy proxy);
public List<VascBackendProxy> getVascBackendProxies();
public List<String> getVascEntryExporterIds();
public VascEntryExporter getVascEntryExporterById(String exporterId);
public void addVascEntryExporter(VascEntryExporter exporter);
public void removeVascEntryExporter(VascEntryExporter exporter);
public List<VascEntryExporter> getVascEntryExporters();
public void configVascFrontendData(VascController vascController,VascEntry entry,Locale locale) throws VascException;
public void configVascFrontendController(VascController vascController,VascEntryLocal entry) throws VascException;
public String getResourceBundle();
public void setResourceBundle(String resourceBundle);
public int getDefaultPageSizeMax();
public void setDefaultPageSizeMax(int max);
public int getDefaultPageSize();
public void setDefaultPageSize(int size);
public void addVascEntryFieldValidatorService(VascEntryFieldValidatorService validator);
public void removeVascEntryFieldValidatorService(VascEntryFieldValidatorService validator);
public List<VascEntryFieldValidatorService> getVascEntryFieldValidatorServices();
}

View file

@ -0,0 +1,76 @@
/*
* 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.List;
import net.forwardfire.vasc.backend.VascBackendState;
import net.forwardfire.vasc.backend.proxy.VascBackendProxy;
import net.forwardfire.vasc.core.entry.VascEntryExporter;
import net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService;
/**
* Interface to make default fill/etc config plugable.
*
* @author Willem Cazander
* @version 1.0 May 9, 2012
*/
public interface VascEntryConfigControllerLocal extends VascEntryConfigController {
public void putVascInterfaceImplemention(VascInterfaceKey key,Class<?> interfaceImpl);
public void putVascInterfaceImplementionFrontend(VascInterfaceKeyFrontend key,Class<?> interfaceImpl);
public void addVascEntryConfigFinalizer(VascEntryConfigFinalizer vascEntryConfigFinalizer);
public void removeVascEntryConfigFinalizer(VascEntryConfigFinalizer vascEntryConfigFinalizer);
public List<VascEntryConfigFinalizer> getVascEntryConfigFinalizers();
public void addVascBackendProxy(VascBackendProxy proxy);
public void removeVascBackendProxy(VascBackendProxy proxy);
public List<VascBackendProxy> getVascBackendProxies();
public void addVascEntryExporter(VascEntryExporter exporter);
public void removeVascEntryExporter(VascEntryExporter exporter);
public VascBackendState getMasterVascBackendState();
public void setResourceBundle(String resourceBundle);
public void addVascEntryFieldValidatorService(VascEntryFieldValidatorService validator);
public void removeVascEntryFieldValidatorService(VascEntryFieldValidatorService validator);
public List<VascEntryFieldValidatorService> getVascEntryFieldValidatorServices();
}

View file

@ -30,5 +30,5 @@ package net.forwardfire.vasc.core;
*/
public interface VascEntryConfigFinalizer {
public void configVascEntry(VascController vascController,VascEntry entry) throws VascException;
public void configVascEntry(VascController vascController,VascEntryLocal entry) throws VascException;
}

View file

@ -32,9 +32,9 @@ package net.forwardfire.vasc.core;
*/
public interface VascEntryControllerLocal extends VascEntryController {
public void addVascEntry(VascEntry entry);
public void addVascEntry(VascEntryLocal entry);
public void removeVascEntry(String entryId);
public VascEntry getMasterVascEntryById(String entryId);
public VascEntryLocal getMasterVascEntryById(String entryId);
}

View file

@ -22,364 +22,108 @@
package net.forwardfire.vasc.core;
import java.io.Serializable;
import java.util.List;
import net.forwardfire.vasc.core.base.VascBaseIdRoleCrudOrderMeta;
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
import net.forwardfire.vasc.validators.VascValidator;
/**
* Defines an VascEntryField
* VascEntryField defines values per field.
*
*
*
* @author Willem Cazander
* @version 1.0 Mar 21, 2007
*/
public interface VascEntryField extends Cloneable,Serializable {
public interface VascEntryField extends VascBaseIdRoleCrudOrderMeta {
/**
* @return the VascEntry
*/
public VascEntry getVascEntry();
/**
* @param entry the VascEntry to set
*/
public void setVascEntry(VascEntry entry);
/**
* @return the id
*/
public String getId();
/**
* @param id the id to set
*/
public void setId(String id);
/**
* @return the vascEntryFieldType
*/
public VascEntryFieldType getVascEntryFieldType();
/**
* @param vascEntryFieldType the vascEntryFieldType to set
*/
public void setVascEntryFieldType(VascEntryFieldType vascEntryFieldType);
/**
* @return the backendName
*/
public String getBackendName();
/**
* @param backendName the backendName to set
*/
public void setBackendName(String backendName);
/**
* @return the vascEntryFieldValue
*/
public VascEntryFieldValue getVascEntryFieldValue();
/**
* @param vascEntryFieldValue the vascEntryFieldValue to set
*/
public void setVascEntryFieldValue(VascEntryFieldValue vascEntryFieldValue);
/**
* @return the vascValidators
*/
public List<VascValidator> getVascValidators();
/**
* @param vascValidator the vascValidator to add
*/
public void addVascValidator(VascValidator vascValidator);
/**
* @param vascValidator the vascValidator to remove
*/
public void removeVascValidator(VascValidator vascValidator);
/**
* @return the name
*/
public String getName();
/**
* @param name the name to set
*/
public void setName(String name);
/**
* @return the description
*/
public String getDescription();
/**
* @param description the description to set
*/
public void setDescription(String description);
/**
* @return the helpId
*/
public String getHelpId();
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId);
/**
* @return the image
*/
public String getImage();
/**
* @param image the image to set
*/
public void setImage(String image);
/**
* @return the defaultValue
*/
public Object getDefaultValue();
/**
* @param defaultValue the defaultValue to set
*/
public void setDefaultValue(Object defaultValue);
/**
* @return the sizeList
*/
public Integer getSizeList();
/**
* @param sizeList the sizeList to set
*/
public void setSizeList(Integer sizeList);
/**
* @return the sizeEdit
*/
public Integer getSizeEdit();
/**
* @param sizeEdit the sizeEdit to set
*/
public void setSizeEdit(Integer sizeEdit);
/**
* @return the styleList
*/
public String getStyleList();
/**
* @param styleList the styleList to set
*/
public void setStyleList(String styleList);
/**
* @return the styleEdit
*/
public String getStyleEdit();
/**
* @param styleEdit the styleEdit to set
*/
public void setStyleEdit(String styleEdit);
/**
* @return the choices
*/
public String getChoices();
/**
* @param choices the choices to set
*/
public void setChoices(String choices);
/**
* @return the view
*/
public Boolean getView();
/**
* @param view the view to set
*/
public void setView(Boolean view);
/**
* @return the optional
*/
public Boolean getOptional();
/**
* @param optional the optional to set
*/
public void setOptional(Boolean optional);
/**
* @return the create
*/
public Boolean getCreate();
/**
* @param create the create to set
*/
public void setCreate(Boolean create);
/**
* @return the edit
*/
public Boolean getEdit();
/**
* @param edit the edit to set
*/
public void setEdit(Boolean edit);
/**
* @return the editReadOnly
*/
public Boolean getEditReadOnly();
/**
* @param editReadOnly the editReadOnly to set
*/
public void setEditReadOnly(Boolean editReadOnly);
/**
* @return the list
*/
public Boolean getList();
/**
* @param list the list to set
*/
public void setList(Boolean list);
/**
* @return the rolesCreate
*/
public String getRolesCreate();
/**
* @param rolesCreate the rolesCreate to set
*/
public void setRolesCreate(String rolesCreate);
/**
* @return the rolesEdit
*/
public String getRolesEdit();
/**
* @param rolesEdit the rolesEdit to set
*/
public void setRolesEdit(String rolesEdit);
/**
* @return the rolesEditReadOnly
*/
public String getRolesEditReadOnly();
/**
* @param rolesEditReadOnly the rolesEditReadOnly to set
*/
public void setRolesEditReadOnly(String rolesEditReadOnly);
/**
* @return the rolesList
*/
public String getRolesList();
/**
* @param rolesList the rolesList to set
*/
public void setRolesList(String rolesList);
/**
* @return the choicesAsRadio
*/
public Boolean getChoicesAsRadio();
/**
* @param choicesAsRadio the choicesAsRadio to set
*/
public void setChoicesAsRadio(Boolean choicesAsRadio);
/**
* @return the editBlank
*/
public Boolean getEditBlank();
/**
* @param editBlank the editBlank to set
*/
public void setEditBlank(Boolean editBlank);
/**
* @return the displayName
*/
public String getDisplayName();
/**
* @param displayName the displayName to set
*/
public void setDisplayName(String displayName);
/**
* @return the orderIndex
*/
public Integer getOrderIndex();
/**
* @param orderIndex the orderIndex to set
*/
public void setOrderIndex(Integer orderIndex);
/**
* @return the sortable
*/
public Boolean getSortable();
/**
* @param sortable the sortable to set
*/
public void setSortable(Boolean sortable);
/**
* @return the sumable
*/
public Boolean getSumable();
/**
* @param sumable the sumable to set
*/
public void setSumable(Boolean sumable);
/**
* @return the graphable
*/
public Boolean getGraphable();
/**
* @param graphable the graphable to set
*/
public void setGraphable(Boolean graphable);
/**
* Force impl to have public clone method
* @return
* @throws CloneNotSupportedException
*/
public VascEntryField clone() throws CloneNotSupportedException;
}

View file

@ -0,0 +1,139 @@
/*
* 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 net.forwardfire.vasc.core.base.VascBaseIdRoleCrudOrderMetaLocal;
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
import net.forwardfire.vasc.validators.VascValidator;
/**
* VascEntryFieldLocal
*
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
public interface VascEntryFieldLocal extends VascEntryField,VascBaseIdRoleCrudOrderMetaLocal {
/**
* @param entry the VascEntry to set
*/
public void setVascEntry(VascEntry entry);
/**
* @param vascEntryFieldType the vascEntryFieldType to set
*/
public void setVascEntryFieldType(VascEntryFieldType vascEntryFieldType);
/**
* @param backendName the backendName to set
*/
public void setBackendName(String backendName);
/**
* @param vascEntryFieldValue the vascEntryFieldValue to set
*/
public void setVascEntryFieldValue(VascEntryFieldValue vascEntryFieldValue);
/**
* @param vascValidator the vascValidator to add
*/
public void addVascValidator(VascValidator vascValidator);
/**
* @param vascValidator the vascValidator to remove
*/
public void removeVascValidator(VascValidator vascValidator);
/**
* @param defaultValue the defaultValue to set
*/
public void setDefaultValue(Object defaultValue);
/**
* @param sizeList the sizeList to set
*/
public void setSizeList(Integer sizeList);
/**
* @param sizeEdit the sizeEdit to set
*/
public void setSizeEdit(Integer sizeEdit);
/**
* @param styleList the styleList to set
*/
public void setStyleList(String styleList);
/**
* @param styleEdit the styleEdit to set
*/
public void setStyleEdit(String styleEdit);
/**
* @param choices the choices to set
*/
public void setChoices(String choices);
/**
* @param optional the optional to set
*/
public void setOptional(Boolean optional);
/**
* @param choicesAsRadio the choicesAsRadio to set
*/
public void setChoicesAsRadio(Boolean choicesAsRadio);
/**
* @param editBlank the editBlank to set
*/
public void setEditBlank(Boolean editBlank);
/**
* @param displayName the displayName to set
*/
public void setDisplayName(String displayName);
/**
* @param sortable the sortable to set
*/
public void setSortable(Boolean sortable);
/**
* @param sumable the sumable to set
*/
public void setSumable(Boolean sumable);
/**
* @param graphable the graphable to set
*/
public void setGraphable(Boolean graphable);
/**
* Force impl to have public clone method
* @return
* @throws CloneNotSupportedException
*/
public VascEntryFieldLocal clone() throws CloneNotSupportedException;
}

View file

@ -24,6 +24,8 @@ package net.forwardfire.vasc.core;
import java.util.List;
import net.forwardfire.vasc.core.base.VascBaseIdRoleCrudOrderMeta;
/**
* Orgenisess Fields
*
@ -32,119 +34,25 @@ import java.util.List;
* @author Willem Cazander
* @version 1.0 Sep 56, 2008
*/
public interface VascEntryFieldSet extends Cloneable {
/**
* @return the id
*/
public String getId();
/**
* @param id the id to set
*/
public void setId(String id);
/**
* @return the name
*/
public String getName();
/**
* @param name the name to set
*/
public void setName(String name);
/**
* @return the description
*/
public String getDescription();
/**
* @param description the description to set
*/
public void setDescription(String description);
/**
* @return the helpId
*/
public String getHelpId();
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId);
/**
* @return the image
*/
public String getImage();
/**
* @param image the image to set
*/
public void setImage(String image);
public interface VascEntryFieldSet extends VascBaseIdRoleCrudOrderMeta {
/**
* @return the styleList
*/
public String getStyleList();
/**
* @param styleList the styleList to set
*/
public void setStyleList(String styleList);
/**
* @return the styleEdit
*/
public String getStyleEdit();
/**
* @param styleEdit the styleEdit to set
*/
public void setStyleEdit(String styleEdit);
/**
* @return the collapsed
*/
public boolean isCollapsed();
/**
* @param collapsed the collapsed to set
*/
public void setCollapsed(boolean collapsed);
/**
* @return the optional
*/
public boolean isOptional();
/**
* @param optional the optional to set
*/
public void setOptional(boolean optional);
public Boolean getCollapsed();
/**
* @return the vascEntryFieldIds
*/
public List<String> getVascEntryFieldIds();
/**
* Add and VascEntryFieldId
* @param vascEntryFieldIds the vascEntryFieldIds to add
*/
public void addVascEntryFieldId(String vascEntryFieldId);
/**
* Removes and VascEntryFieldId
* @param vascEntryFieldIds the vascEntryFieldIds to remove
*/
public void removeVascEntryFieldId(String vascEntryFieldId);
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public VascEntryFieldSet clone() throws CloneNotSupportedException;
}

View file

@ -0,0 +1,70 @@
/*
* 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 net.forwardfire.vasc.core.base.VascBaseIdRoleCrudOrderMetaLocal;
/**
* VascEntryFieldSetLocal
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
public interface VascEntryFieldSetLocal extends VascEntryFieldSet,VascBaseIdRoleCrudOrderMetaLocal {
/**
* @param styleList the styleList to set
*/
public void setStyleList(String styleList);
/**
* @param styleEdit the styleEdit to set
*/
public void setStyleEdit(String styleEdit);
/**
* @param collapsed the collapsed to set
*/
public void setCollapsed(Boolean collapsed);
/**
* Add and VascEntryFieldId
* @param vascEntryFieldIds the vascEntryFieldIds to add
*/
public void addVascEntryFieldId(String vascEntryFieldId);
/**
* Removes and VascEntryFieldId
* @param vascEntryFieldIds the vascEntryFieldIds to remove
*/
public void removeVascEntryFieldId(String vascEntryFieldId);
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public VascEntryFieldSetLocal clone() throws CloneNotSupportedException;
}

View file

@ -22,46 +22,36 @@
package net.forwardfire.vasc.core;
import java.io.Serializable;
import java.util.List;
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.validators.VascValidator;
/**
* VascEntryFieldType
*
* @author Willem Cazander
* @version 1.0 Mar 21, 2007
*/
public interface VascEntryFieldType extends Serializable {
public interface VascEntryFieldType extends VascBaseId {
public String getId();
public void setId(String id);
public String getUIComponentId();
public void setUIComponentId(String uiComponentId);
public String getInputMask();
public void setInputMask(String inputMask);
public Class<?> getAutoDetectClass();
public void setAutoDetectClass(Class<?> classObject);
public void addVascValidator(VascValidator vascValidator);
public void removeVascValidator(VascValidator vascValidator);
public List<VascValidator> getVascValidators();
public void setProperty(String name,String value);
public String getProperty(String name);
public List<String> getPropertyNames();
public void setDataObject(Object data);
public void setDataObject(Object data); // TODO move to fronend controller
public Object getDataObject();
public int getUIComponentCount(VascEntryField entryField) throws VascException;
@ -74,16 +64,4 @@ public interface VascEntryFieldType extends Serializable {
* @return the objectConverter
*/
public ObjectConverter getObjectConverter();
/**
* @param objectConverter the objectConverter to set
*/
public void setObjectConverter(ObjectConverter objectConverter);
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public VascEntryFieldType clone() throws CloneNotSupportedException;
}

View file

@ -30,5 +30,5 @@ package net.forwardfire.vasc.core;
*/
public interface VascEntryFieldTypeControllerLocal extends VascEntryFieldTypeController {
public void addVascEntryFieldType(VascEntryFieldType vascEntryFieldType);
public void addVascEntryFieldType(VascEntryFieldTypeLocal vascEntryFieldType);
}

View file

@ -0,0 +1,60 @@
/*
* 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 org.x4o.xml.conv.ObjectConverter;
import net.forwardfire.vasc.core.base.VascBaseIdLocal;
import net.forwardfire.vasc.validators.VascValidator;
/**
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
public interface VascEntryFieldTypeLocal extends VascEntryFieldType,VascBaseIdLocal {
public void setUIComponentId(String uiComponentId);
public void setInputMask(String inputMask);
public void setAutoDetectClass(Class<?> classObject);
public void addVascValidator(VascValidator vascValidator);
public void removeVascValidator(VascValidator vascValidator);
public void setProperty(String name,String value);
/**
* @param objectConverter the objectConverter to set
*/
public void setObjectConverter(ObjectConverter objectConverter);
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public VascEntryFieldTypeLocal clone() throws CloneNotSupportedException;
}

View file

@ -0,0 +1,60 @@
/*
* 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.List;
import net.forwardfire.vasc.core.base.VascBaseIdRoleViewOrderMeta;
/**
* VascLinkEntry
*
* @author Willem Cazander
* @version 1.0 Sep 7, 2008
*/
public interface VascEntryLink extends VascBaseIdRoleViewOrderMeta {
public String getEntryParameterFieldId(String parameterName);
public List<String> getEntryParameterFieldIdKeys();
public String getEntryCreateFieldValue(String valueFieldId);
public List<String> getEntryCreateFieldValueKeys();
/**
* @return the vascEntryId
*/
public String getVascEntryId();
/**
* @return the vascLinkEntryType
*/
public VascEntryLinkType getVascLinkEntryType();
/**
* @return the doActionId
*/
public String getDoActionId();
}

View file

@ -0,0 +1,62 @@
/*
* 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 net.forwardfire.vasc.core.base.VascBaseIdRoleViewOrderMetaLocal;
/**
* VascEntryLinkLocal
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
public interface VascEntryLinkLocal extends VascEntryLink,VascBaseIdRoleViewOrderMetaLocal {
public void addEntryParameterFieldId(String parameterName,String valueFieldId);
public void addEntryCreateFieldValue(String valueFieldId,String selectedFieldId);
/**
* @param vascEntryId the vascEntryId to set
*/
public void setVascEntryId(String vascEntryId);
/**
* @param vascLinkEntryType the vascLinkEntryType to set
*/
public void setVascLinkEntryType(VascEntryLinkType vascLinkEntryType);
/**
* @param doActionId the doActionId to set
*/
public void setDoActionId(String doActionId);
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public VascEntryLinkLocal clone() throws CloneNotSupportedException;
}

View file

@ -0,0 +1,40 @@
/*
* 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.io.Serializable;
/**
* The type of a VascLinkEntry
*
* @author Willem Cazander
* @version 1.0 Mrt 16, 2010
*/
public enum VascEntryLinkType implements Serializable {
EDIT_INLINE,
EDIT_TAB,
LIST;
public static VascEntryLinkType DEFAULT_TYPE = VascEntryLinkType.EDIT_TAB;
}

View file

@ -0,0 +1,41 @@
/*
* 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;
/**
* VascEntryListOption defines list options.
*
*
* @author Willem Cazander
* @version 1.0 Jun 3, 2012
*/
public interface VascEntryListOption extends VascEntryField {
/*
public VascEntryFieldType getVascEntryFieldType();
public String getBackendName();
public List<VascValidator> getVascValidators();
public Object getDefaultValue();
public Boolean getOptional();
*/
}

View file

@ -0,0 +1,41 @@
/*
* 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;
/**
* VascEntryListOptionLocal
*
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
public interface VascEntryListOptionLocal extends VascEntryListOption,VascEntryFieldLocal {
/**
* Force impl to have public clone method
* @return
* @throws CloneNotSupportedException
*/
public VascEntryListOptionLocal clone() throws CloneNotSupportedException;
}

View file

@ -0,0 +1,271 @@
/*
* 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.Collection;
import net.forwardfire.vasc.backend.VascBackendFilter;
import net.forwardfire.vasc.core.actions.ColumnVascActionLocal;
import net.forwardfire.vasc.core.actions.GlobalVascActionLocal;
import net.forwardfire.vasc.core.actions.RowVascActionLocal;
import net.forwardfire.vasc.core.base.VascBaseIdRoleCrudLocal;
import net.forwardfire.vasc.core.entry.VascEntryFieldEventChannel;
import net.forwardfire.vasc.frontend.VascFrontendController;
/**
* VascEntryLocal
*
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
public interface VascEntryLocal extends VascEntry,VascBaseIdRoleCrudLocal {
/**
* @param name the name to set
*/
public void setName(String name);
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId);
/**
* @param image the image to set
*/
public void setImage(String image);
/**
* @param listDescription the listDescription to set
*/
public void setListDescription(String listDescription);
/**
* @param listImage the listImage to set
*/
public void setListImage(String listImage);
/**
* @param editDescription the editDescription to set
*/
public void setEditDescription(String editDescription);
/**
* @param editImage the editImage to set
*/
public void setEditImage(String editImage);
/**
* @param deleteDescription the deleteDescription to set
*/
public void setDeleteDescription(String deleteDescription);
/**
* @param deleteImage the deleteImage to set
*/
public void setDeleteImage(String deleteImage);
/**
* @param createDescription the createDescription to set
*/
public void setCreateDescription(String createDescription);
/**
* @param createImage the createImage to set
*/
public void setCreateImage(String createImage);
/**
* @param primaryKeyField the primaryKeyField to set
*/
public void setPrimaryKeyFieldId(String primaryKeyField);
/**
* @param displayNameField the displayNameField to set
*/
public void setDisplayNameFieldId(String displayNameField);
/**
* @param delete the delete to set
*/
public void setDelete(Boolean delete);
/**
* @param rolesDelete the rolesDelete to set
*/
public void setRolesDelete(String rolesDelete);
/**
* @param vascField the vascField to add
*/
public void addVascEntryField(VascEntryFieldLocal vascField);
/**
* @param vascField the vascField to remove
*/
public void removeVascEntryField(VascEntryFieldLocal vascField);
/**
* @return the vascFields
*/
public Collection<VascEntryFieldLocal> getVascEntryFieldsLocal();
/**
* @param rowAction the rowAction to add
*/
public void addRowAction(RowVascActionLocal rowAction);
/**
* @param rowAction the rowAction to remove
*/
public void removeRowAction(RowVascActionLocal rowAction);
/**
* @return the rowActions
*/
public Collection<RowVascActionLocal> getRowActionsLocal();
/**
* @param columnAction the columnAction to add
*/
public void addColumnAction(ColumnVascActionLocal columnAction);
/**
* @param columnAction the columnAction to remove
*/
public void removeColumnAction(ColumnVascActionLocal columnAction);
/**
* @return the columnActions
*/
public Collection<ColumnVascActionLocal> getColumnActionsLocal();
/**
* @param globalAction the globalAction to add
*/
public void addGlobalAction(GlobalVascActionLocal globalAction);
/**
* @param globalAction the globalAction to remove
*/
public void removeGlobalAction(GlobalVascActionLocal globalAction);
/**
* @return the globalActions
*/
public Collection<GlobalVascActionLocal> getGlobalActionsLocal();
/**
* @param exportAction the exportAction to add
*/
public void addExportAction(GlobalVascActionLocal exportAction);
/**
* @param exportAction the exportAction to remove
*/
public void removeExportAction(GlobalVascActionLocal exportAction);
/**
* @return the exportActions
*/
public Collection<GlobalVascActionLocal> getExportActionsLocal();
/**
* @param vascEntryFieldSet the vascEntryFieldSet to add
*/
public void addVascEntryFieldSet(VascEntryFieldSetLocal vascEntryFieldSet);
/**
* @param vascEntryFieldSet the vascEntryFieldSet to remove
*/
public void removeVascEntryFieldSet(VascEntryFieldSetLocal vascEntryFieldSet);
/**
* @return the vascEntryFieldSets
*/
public Collection<VascEntryFieldSetLocal> getVascEntryFieldSetsLocal();
/**
* @param vascLinkEntry the vascLinkEntry to add
*/
public void addVascEntryLink(VascEntryLinkLocal vascEntryLink);
/**
* @param vascLinkEntry the vascLinkEntry to remover
*/
public void removeVascEntryLink(VascEntryLinkLocal vascEntryLink);
/**
* @return the vascLinkEntries
*/
public Collection<VascEntryLinkLocal> getVascEntryLinksLocal();
public void setEntryParameter(String key,Object value);
public void removeEntryParameter(String key);
public void setVascFrontendController(VascFrontendController vascFrontendData);
public void setBackendId(String backendId);
/**
* @param vascDisplayOnly the vascDisplayOnly to set
*/
public void setVascDisplayOnly(Boolean vascDisplayOnly);
/**
* @param vascEntryFieldEventChannel the vascEntryFieldEventChannel to set
*/
public void setVascEntryFieldEventChannel(VascEntryFieldEventChannel vascEntryFieldEventChannel);
/**
* Added an VascEntryBackendEventListener
* @param listener The class of the event listener.
*/
public void addVascEntryBackendEventListener(String listener);
/**
* Added an VascEntryFrontendEventListener
* @param listener The class of the event listener.
*/
public void addVascEntryFrontendEventListener(String listener,String frontendType);
public void addVascEntryListOption(VascEntryListOptionLocal listOption);
public void removeVascEntryListOption(VascEntryListOptionLocal listOption);
public Collection<VascEntryListOptionLocal> getVascEntryListOptionsLocal();
public void addVascBackendFilter(VascBackendFilter filter);
public void addVascEntryFrontendAction(String actionClass,String frontendType);
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public VascEntryLocal clone() throws CloneNotSupportedException;
}

View file

@ -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.core;
/**
* VascInterfaceKey defines which interfaces are easy extentable.
*
* @author Willem Cazander
* @version 1.0 May 9, 2012
*/
public enum VascInterfaceKey {
VASC_ENTRY,
VASC_ENTRY_FIELD,
VASC_ENTRY_FIELD_SET,
VASC_ENTRY_LINK,
VASC_ENTRY_LIST_OPTION,
VASC_ENTRY_STATE,
VASC_BACKEND_STATE,
VASC_FRONTEND_CONTROLLER_LOCAL,
END_RM_ME;
}

View file

@ -0,0 +1,41 @@
/*
* 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;
/**
* VascInterfaceKeyFrontend defines which interfaces are easy extentable.
*
* @author Willem Cazander
* @version 1.0 May 9, 2012
*/
public enum VascInterfaceKeyFrontend {
VASC_FRONTEND_PAGER,
VASC_FRONTEND_ACTIONS,
VASC_FRONTEND_DATA_SELECTOR,
VASC_FRONTEND_USER_CONTROLLER,
VASC_FRONTEND_USER_SETTING_CONTROLLER
;
}

View file

@ -0,0 +1,34 @@
package net.forwardfire.vasc.core;
import net.forwardfire.vasc.backend.VascBackendState;
import net.forwardfire.vasc.frontend.VascFrontendActions;
import net.forwardfire.vasc.frontend.VascFrontendControllerLocal;
import net.forwardfire.vasc.frontend.VascFrontendDataSelector;
import net.forwardfire.vasc.frontend.VascFrontendPager;
import net.forwardfire.vasc.frontend.VascFrontendUserController;
import net.forwardfire.vasc.frontend.VascFrontendUserSettingController;
public interface VascInterfaceLoader {
public VascEntry createVascEntryImpl();
public VascEntryField createVascEntryFieldImpl();
public VascEntryFieldSet createVascEntryFieldSetImpl();
public VascEntryLink createVascEntryLinkImpl();
public VascEntryListOption createVascEntryListOptionImpl();
public VascEntryState createVascEntryStateImpl();
public VascBackendState createVascBackendStateImpl();
public VascFrontendControllerLocal createVascFrontendControllerLocalImpl();
public VascFrontendPager createVascFrontendPagerImpl(VascEntry entry);
public VascFrontendActions createVascFrontendActionsImpl(VascEntry entry);
public VascFrontendDataSelector createVascFrontendDataSelectorImpl(VascEntry entry);
public VascFrontendUserController createVascFrontendUserControllerImpl(VascEntry entry);
public VascFrontendUserSettingController createVascFrontendUserSettingControllerImpl(VascEntry entry);
}

View file

@ -0,0 +1,50 @@
/*
* 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.actions;
import net.forwardfire.vasc.core.base.AbstractVascBaseIdRoleViewOrderMetaLocal;
/**
* AbstractVascGlobalActionLocal
*
* @author Willem Cazander
* @version 1.0 Mar 30, 2007
*/
@SuppressWarnings("serial")
abstract public class AbstractVascGlobalActionLocal extends AbstractVascBaseIdRoleViewOrderMetaLocal implements GlobalVascActionLocal {
public AbstractVascGlobalActionLocal() {
setId(getActionId());
}
abstract protected String getActionId();
@Override
public GlobalVascActionLocal clone() throws CloneNotSupportedException {
Object clone = cloneCreate();
cloneFields(clone);
return (GlobalVascActionLocal)clone;
}
}

View file

@ -0,0 +1,50 @@
/*
* 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.actions;
import net.forwardfire.vasc.core.base.AbstractVascBaseIdRoleViewOrderMetaLocal;
/**
* AbstractVascRowActionLocal
*
* @author Willem Cazander
* @version 1.0 Mar 30, 2007
*/
@SuppressWarnings("serial")
abstract public class AbstractVascRowActionLocal extends AbstractVascBaseIdRoleViewOrderMetaLocal implements RowVascActionLocal {
public AbstractVascRowActionLocal() {
setId(getActionId());
}
abstract protected String getActionId();
@Override
public RowVascActionLocal clone() throws CloneNotSupportedException {
Object clone = cloneCreate();
cloneFields(clone);
return (RowVascActionLocal)clone;
}
}

View file

@ -26,6 +26,7 @@ import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryField;
/**
* ColumnVascAction
*
* @author Willem Cazander
* @version 1.0 Mar 21, 2007

View file

@ -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.actions;
/**
* ColumnVascActionLocal
*
* @author Willem Cazander
* @version 1.0 Jun 4, 2012
*/
public interface ColumnVascActionLocal extends ColumnVascAction,VascActionLocal {
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public ColumnVascActionLocal clone() throws CloneNotSupportedException;
}

View file

@ -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.actions;
/**
* GlobalVascActionLocal
*
* @author Willem Cazander
* @version 1.0 Jun 4, 2012
*/
public interface GlobalVascActionLocal extends GlobalVascAction,VascActionLocal {
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public GlobalVascActionLocal clone() throws CloneNotSupportedException;
}

View file

@ -34,4 +34,5 @@ public interface RowVascAction extends VascAction {
public boolean isMultiRowAction();
public void doRowAction(VascEntry vascEntry,Object rowObject) throws Exception;
}

View file

@ -0,0 +1,40 @@
/*
* 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.actions;
/**
* RowVascActionLocal
*
* @author Willem Cazander
* @version 1.0 Jun 4, 2012
*/
public interface RowVascActionLocal extends RowVascAction,VascActionLocal {
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public RowVascActionLocal clone() throws CloneNotSupportedException;
}

View file

@ -22,39 +22,13 @@
package net.forwardfire.vasc.core.actions;
import java.io.Serializable;
import net.forwardfire.vasc.core.base.VascBaseIdRoleViewOrderMeta;
/**
*
* @author Willem Cazander
* @version 1.0 Mar 21, 2007
*/
public interface VascAction extends Cloneable,Serializable {
public interface VascAction extends VascBaseIdRoleViewOrderMeta {
public String getId();
public void setId(String id);
public String getName();
public void setName(String name);
public String getDescription();
public void setDescription(String description);
public String getImage();
public void setImage(String image);
public String getHelpId();
public void setHelpId(String helpId);
/**
* Force impl to have public clone methode
* @return
* @throws CloneNotSupportedException
*/
public VascAction clone() throws CloneNotSupportedException;
}

View file

@ -0,0 +1,34 @@
/*
* 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.actions;
import net.forwardfire.vasc.core.base.VascBaseIdRoleViewOrderMetaLocal;
/**
*
* @author Willem Cazander
* @version 1.0 Jun 3, 2012
*/
public interface VascActionLocal extends VascAction,VascBaseIdRoleViewOrderMetaLocal {
}

View file

@ -0,0 +1,25 @@
package net.forwardfire.vasc.core.base;
@SuppressWarnings("serial")
abstract public class AbstractVascBaseClone implements VascBaseClone {
/**
* @see net.forwardfire.vasc.core.base.VascBaseClone#cloneCreate()
*/
public Object cloneCreate() throws CloneNotSupportedException {
try {
return getClass().newInstance();
} catch (InstantiationException e) {
throw new CloneNotSupportedException("Could not clone class: "+e.getMessage());
} catch (IllegalAccessException e) {
throw new CloneNotSupportedException("Could not clone class: "+e.getMessage());
}
}
/**
* @see net.forwardfire.vasc.core.base.VascBaseClone#cloneFields(java.lang.Object)
*/
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
}
}

View file

@ -0,0 +1,30 @@
package net.forwardfire.vasc.core.base;
@SuppressWarnings("serial")
abstract public class AbstractVascBaseIdLocal extends AbstractVascBaseClone implements VascBaseIdLocal {
private String id = null;
/**
* @see net.forwardfire.vasc.core.base.VascBaseClone#cloneFields(java.lang.Object)
*/
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascBaseIdLocal clone = (VascBaseIdLocal)cloneObject;
clone.setId(getId());
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
}

View file

@ -0,0 +1,141 @@
package net.forwardfire.vasc.core.base;
@SuppressWarnings("serial")
abstract public class AbstractVascBaseIdRoleCrudLocal extends AbstractVascBaseIdRoleViewLocal implements VascBaseIdRoleCrudLocal {
private Boolean list = null;
private Boolean create = null;
private Boolean edit = null;
private Boolean editReadOnly = null;
private String rolesCreate = null;
private String rolesEdit = null;
private String rolesEditReadOnly = null;
private String rolesList = null;
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascBaseIdRoleCrudLocal clone = (VascBaseIdRoleCrudLocal)cloneObject;
clone.setList(getList());
clone.setCreate(getCreate());
clone.setEdit(getEdit());
clone.setEditReadOnly(getEditReadOnly());
clone.setRolesCreate(getRolesCreate());
clone.setRolesEdit(getRolesEdit());
clone.setEditReadOnly(getEditReadOnly());
clone.setRolesList(getRolesList());
}
/**
* @return the create
*/
public Boolean getCreate() {
return create;
}
/**
* @param create the create to set
*/
public void setCreate(Boolean create) {
this.create = create;
}
/**
* @return the edit
*/
public Boolean getEdit() {
return edit;
}
/**
* @param edit the edit to set
*/
public void setEdit(Boolean edit) {
this.edit = edit;
}
/**
* @return the editReadOnly
*/
public Boolean getEditReadOnly() {
return editReadOnly;
}
/**
* @param editReadOnly the editReadOnly to set
*/
public void setEditReadOnly(Boolean editReadOnly) {
this.editReadOnly = editReadOnly;
}
/**
* @return the list
*/
public Boolean getList() {
return list;
}
/**
* @param list the list to set
*/
public void setList(Boolean list) {
this.list = list;
}
/**
* @return the rolesCreate
*/
public String getRolesCreate() {
return rolesCreate;
}
/**
* @param rolesCreate the rolesCreate to set
*/
public void setRolesCreate(String rolesCreate) {
this.rolesCreate = rolesCreate;
}
/**
* @return the rolesEdit
*/
public String getRolesEdit() {
return rolesEdit;
}
/**
* @param rolesEdit the rolesEdit to set
*/
public void setRolesEdit(String rolesEdit) {
this.rolesEdit = rolesEdit;
}
/**
* @return the rolesEditReadOnly
*/
public String getRolesEditReadOnly() {
return rolesEditReadOnly;
}
/**
* @param rolesEditReadOnly the rolesEditReadOnly to set
*/
public void setRolesEditReadOnly(String rolesEditReadOnly) {
this.rolesEditReadOnly = rolesEditReadOnly;
}
/**
* @return the rolesList
*/
public String getRolesList() {
return rolesList;
}
/**
* @param rolesList the rolesList to set
*/
public void setRolesList(String rolesList) {
this.rolesList = rolesList;
}
}

View file

@ -0,0 +1,76 @@
package net.forwardfire.vasc.core.base;
@SuppressWarnings("serial")
abstract public class AbstractVascBaseIdRoleCrudOrderLocal extends AbstractVascBaseIdRoleCrudLocal implements VascBaseIdRoleCrudOrderLocal {
private Integer order = null;
private Integer orderCreate = null;
private Integer orderEdit = null;
private Integer orderList = null;
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascBaseIdRoleCrudOrderLocal clone = (VascBaseIdRoleCrudOrderLocal)cloneObject;
clone.setOrder(getOrder());
clone.setOrderCreate(getOrderCreate());
clone.setOrderEdit(getOrderEdit());
clone.setOrderList(getOrderList());
}
/**
* @return the order
*/
public Integer getOrder() {
return order;
}
/**
* @param order the order to set
*/
public void setOrder(Integer order) {
this.order=order;
}
/**
* @return the orderCreate
*/
public Integer getOrderCreate() {
return orderCreate;
}
/**
* @param orderCreate the orderCreate to set
*/
public void setOrderCreate(Integer orderCreate) {
this.orderCreate = orderCreate;
}
/**
* @return the orderEdit
*/
public Integer getOrderEdit() {
return orderEdit;
}
/**
* @param orderEdit the orderEdit to set
*/
public void setOrderEdit(Integer orderEdit) {
this.orderEdit = orderEdit;
}
/**
* @return the orderList
*/
public Integer getOrderList() {
return orderList;
}
/**
* @param orderList the orderList to set
*/
public void setOrderList(Integer orderList) {
this.orderList = orderList;
}
}

View file

@ -0,0 +1,76 @@
package net.forwardfire.vasc.core.base;
@SuppressWarnings("serial")
abstract public class AbstractVascBaseIdRoleCrudOrderMetaLocal extends AbstractVascBaseIdRoleCrudOrderLocal implements VascBaseIdRoleCrudOrderMetaLocal {
private String name = null;
private String description = null;
private String helpId = null;
private String image = null;
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascBaseIdRoleCrudOrderMetaLocal clone = (VascBaseIdRoleCrudOrderMetaLocal)cloneObject;
clone.setName(getName());
clone.setDescription(getDescription());
clone.setHelpId(getHelpId());
clone.setImage(getImage());
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the helpId
*/
public String getHelpId() {
return helpId;
}
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId) {
this.helpId = helpId;
}
/**
* @return the image
*/
public String getImage() {
return image;
}
/**
* @param image the image to set
*/
public void setImage(String image) {
this.image = image;
}
}

View file

@ -0,0 +1,44 @@
package net.forwardfire.vasc.core.base;
@SuppressWarnings("serial")
abstract public class AbstractVascBaseIdRoleViewLocal extends AbstractVascBaseIdLocal implements VascBaseIdRoleViewLocal {
private Boolean view = null;
private String rolesView = null;
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascBaseIdRoleViewLocal clone = (VascBaseIdRoleViewLocal)cloneObject;
clone.setView(getView());
clone.setRolesView(getRolesView());
}
/**
* @see net.forwardfire.vasc.core.base.VascBaseIdRoleView#getView()
*/
public Boolean getView() {
return view;
}
/**
* @see net.forwardfire.vasc.core.base.VascBaseIdRoleViewLocal#setView(java.lang.Boolean)
*/
public void setView(Boolean view) {
this.view=view;
}
/**
* @see net.forwardfire.vasc.core.base.VascBaseIdRoleView#getRolesView()
*/
public String getRolesView() {
return rolesView;
}
/**
* @see net.forwardfire.vasc.core.base.VascBaseIdRoleViewLocal#setRolesView(java.lang.String)
*/
public void setRolesView(String rolesView) {
this.rolesView=rolesView;
}
}

View file

@ -0,0 +1,28 @@
package net.forwardfire.vasc.core.base;
@SuppressWarnings("serial")
abstract public class AbstractVascBaseIdRoleViewOrderLocal extends AbstractVascBaseIdRoleViewLocal implements VascBaseIdRoleViewOrderLocal {
private Integer order = null;
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascBaseIdRoleViewOrderLocal clone = (VascBaseIdRoleViewOrderLocal)cloneObject;
clone.setOrder(getOrder());
}
/**
* @return the order
*/
public Integer getOrder() {
return order;
}
/**
* @param order the order to set
*/
public void setOrder(Integer order) {
this.order=order;
}
}

View file

@ -0,0 +1,76 @@
package net.forwardfire.vasc.core.base;
@SuppressWarnings("serial")
abstract public class AbstractVascBaseIdRoleViewOrderMetaLocal extends AbstractVascBaseIdRoleViewOrderLocal implements VascBaseIdRoleViewOrderMetaLocal {
private String name = null;
private String description = null;
private String helpId = null;
private String image = null;
@Override
public void cloneFields(Object cloneObject) throws CloneNotSupportedException {
super.cloneFields(cloneObject);
VascBaseIdRoleViewOrderMetaLocal clone = (VascBaseIdRoleViewOrderMetaLocal)cloneObject;
clone.setName(getName());
clone.setDescription(getDescription());
clone.setHelpId(getHelpId());
clone.setImage(getImage());
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the helpId
*/
public String getHelpId() {
return helpId;
}
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId) {
this.helpId = helpId;
}
/**
* @return the image
*/
public String getImage() {
return image;
}
/**
* @param image the image to set
*/
public void setImage(String image) {
this.image = image;
}
}

View file

@ -0,0 +1,11 @@
package net.forwardfire.vasc.core.base;
import java.io.Serializable;
public interface VascBaseClone extends Cloneable,Serializable {
/* moved to abstract for private
public Object cloneCreate() throws CloneNotSupportedException;
public void cloneFields(Object cloneObject) throws CloneNotSupportedException;
*/
}

View file

@ -0,0 +1,10 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseId extends VascBaseClone {
/**
* @return the id
*/
public String getId();
}

View file

@ -0,0 +1,10 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdLocal extends VascBaseId {
/**
* @param id the id to set
*/
public void setId(String id);
}

View file

@ -0,0 +1,25 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdMetaData extends VascBaseId {
/**
* @return the name
*/
public String getName();
/**
* @return the description
*/
public String getDescription();
/**
* @return the helpId
*/
public String getHelpId();
/**
* @return the image
*/
public String getImage();
}

View file

@ -0,0 +1,24 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdMetaDataLocal extends VascBaseIdMetaData,VascBaseIdLocal {
/**
* @param name the name to set
*/
public void setName(String name);
/**
* @param description the description to set
*/
public void setDescription(String description);
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId);
/**
* @param image the image to set
*/
public void setImage(String image);
}

View file

@ -0,0 +1,44 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleCrud extends VascBaseIdRoleView {
/**
* @return the create
*/
public Boolean getCreate();
/**
* @return the edit
*/
public Boolean getEdit();
/**
* @return the editReadOnly
*/
public Boolean getEditReadOnly();
/**
* @return the list
*/
public Boolean getList();
/**
* @return the rolesCreate
*/
public String getRolesCreate();
/**
* @return the rolesEdit
*/
public String getRolesEdit();
/**
* @return the rolesEditReadOnly
*/
public String getRolesEditReadOnly();
/**
* @return the rolesList
*/
public String getRolesList();
}

View file

@ -0,0 +1,44 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleCrudLocal extends VascBaseIdRoleCrud,VascBaseIdRoleViewLocal,VascBaseIdLocal {
/**
* @param create the create to set
*/
public void setCreate(Boolean create);
/**
* @param edit the edit to set
*/
public void setEdit(Boolean edit);
/**
* @param editReadOnly the editReadOnly to set
*/
public void setEditReadOnly(Boolean editReadOnly);
/**
* @param list the list to set
*/
public void setList(Boolean list);
/**
* @param rolesCreate the rolesCreate to set
*/
public void setRolesCreate(String rolesCreate);
/**
* @param rolesEdit the rolesEdit to set
*/
public void setRolesEdit(String rolesEdit);
/**
* @param rolesEditReadOnly the rolesEditReadOnly to set
*/
public void setRolesEditReadOnly(String rolesEditReadOnly);
/**
* @param rolesList the rolesList to set
*/
public void setRolesList(String rolesList);
}

View file

@ -0,0 +1,19 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleCrudOrder extends VascBaseIdRoleCrudLocal {
/**
* @return the orderCreate
*/
public Integer getOrderCreate();
/**
* @return the orderEdit
*/
public Integer getOrderEdit();
/**
* @return the orderCreate
*/
public Integer getOrderList();
}

View file

@ -0,0 +1,19 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleCrudOrderLocal extends VascBaseIdRoleCrudOrder,VascBaseIdRoleViewOrderLocal {
/**
* @param orderCreate the orderCreate to set
*/
public void setOrderCreate(Integer orderCreate);
/**
* @param orderEdit the orderEdit to set
*/
public void setOrderEdit(Integer orderEdit);
/**
* @param orderList the orderList to set
*/
public void setOrderList(Integer orderList);
}

View file

@ -0,0 +1,5 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleCrudOrderMeta extends VascBaseIdRoleCrudOrder,VascBaseIdMetaData {
}

View file

@ -0,0 +1,5 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleCrudOrderMetaLocal extends VascBaseIdRoleCrudOrderMeta,VascBaseIdRoleCrudOrderLocal,VascBaseIdMetaDataLocal {
}

View file

@ -0,0 +1,14 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleView extends VascBaseId {
/**
* @return the view
*/
public Boolean getView();
/**
* @return the rolesView
*/
public String getRolesView();
}

View file

@ -0,0 +1,14 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleViewLocal extends VascBaseIdLocal,VascBaseIdRoleView {
/**
* @param view the view to set
*/
public void setView(Boolean view);
/**
* @param rolesView the rolesView to set
*/
public void setRolesView(String rolesView);
}

View file

@ -0,0 +1,9 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleViewOrder extends VascBaseIdRoleView {
/**
* @return the order
*/
public Integer getOrder();
}

View file

@ -0,0 +1,9 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleViewOrderLocal extends VascBaseIdRoleViewOrder,VascBaseIdRoleViewLocal {
/**
* @param order the order to set
*/
public void setOrder(Integer order);
}

View file

@ -0,0 +1,5 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleViewOrderMeta extends VascBaseIdRoleViewOrder,VascBaseIdMetaData {
}

View file

@ -0,0 +1,5 @@
package net.forwardfire.vasc.core.base;
public interface VascBaseIdRoleViewOrderMetaLocal extends VascBaseIdRoleViewOrderMeta,VascBaseIdRoleViewOrderLocal,VascBaseIdMetaDataLocal {
}

View file

@ -23,6 +23,7 @@
package net.forwardfire.vasc.core.ui;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.VascEntryListOption;
import net.forwardfire.vasc.core.VascException;
/**
@ -33,32 +34,36 @@ import net.forwardfire.vasc.core.VascException;
*/
public class VascOptionValueModelListener implements VascValueModelListener {
private VascEntryField vascEntryField = null;
private VascEntryListOption vascEntryListOption = null;
public VascOptionValueModelListener() {
}
public VascOptionValueModelListener(VascEntryField vascEntryField) {
setVascEntryField(vascEntryField);
public VascOptionValueModelListener(VascEntryListOption vascEntryListOption) {
setVascEntryListOption(vascEntryListOption);
}
public void valueUpdate(VascValueModel model) throws VascException {
String key = vascEntryField.getBackendName();
String key = vascEntryListOption.getBackendName();
Object value = model.getValue();
vascEntryField.getVascEntry().setEntryParameter(key, value);
if (value==null && vascEntryListOption.getOptional()!=null && vascEntryListOption.getOptional()) {
vascEntryListOption.getVascEntry().getVascFrontendController().getVascEntryState().getVascBackendState().removeDataParameter(key); // null is a value except if optional
return;
}
vascEntryListOption.getVascEntry().getVascFrontendController().getVascEntryState().getVascBackendState().setDataParameter(key, value); // TODO: check this
}
/**
* @return the vascEntryField
* @return the vascEntryListOption
*/
public VascEntryField getVascEntryField() {
return vascEntryField;
public VascEntryListOption getVascEntryListOption() {
return vascEntryListOption;
}
/**
* @param vascEntryField the vascEntryField to set
* @param vascEntryListOption the vascEntryListOption to set
*/
public void setVascEntryField(VascEntryField vascEntryField) {
this.vascEntryField = vascEntryField;
public void setVascEntryListOption(VascEntryListOption vascEntryListOption) {
this.vascEntryListOption = vascEntryListOption;
}
}

View file

@ -38,11 +38,11 @@ abstract public class AbstractVascFrontend implements VascFrontend {
protected VascEntry entry = null;
public String i18n(String key,Object...params) {
return entry.getVascFrontendData().getVascEntryResourceResolver().getTextValue(key,params);
return entry.getVascFrontendController().getVascEntryResourceResolver().getTextValue(key,params);
}
public Object i18nImage(String key) {
return entry.getVascFrontendData().getVascEntryResourceImageResolver().getImageValue(entry,key);
return entry.getVascFrontendController().getVascEntryResourceImageResolver().getImageValue(entry,key);
}
@ -56,12 +56,12 @@ 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 {
if (entry.getVascFrontendData().getVascFrontend()==null) {
Logger.getLogger(AbstractVascFrontend.class.getName()).fine("Bind frontend: "+this+" to: "+entry.getVascFrontendData()+" entry: "+entry.getId());
entry.getVascFrontendData().setVascFrontend(this);
if (entry.getVascFrontendController().getVascFrontend()==null) {
Logger.getLogger(AbstractVascFrontend.class.getName()).fine("Bind frontend: "+this+" to: "+entry.getVascFrontendController()+" entry: "+entry.getId());
entry.getVascFrontendController().setVascFrontend(this);
} else {
if (entry.getVascFrontendData().getVascFrontend()!=this) {
throw new IllegalArgumentException("VascEntry '"+entry.getId()+"' data: "+entry.getVascFrontendData()+" frontend: "+this+" has already a differtent VascFrontend attected");
if (entry.getVascFrontendController().getVascFrontend()!=this) {
throw new IllegalArgumentException("VascEntry '"+entry.getId()+"' data: "+entry.getVascFrontendController()+" frontend: "+this+" has already a differtent VascFrontend attected");
}
}
this.entry=entry;

View file

@ -30,7 +30,7 @@ import net.forwardfire.vasc.core.VascEntryField;
* @author Willem Cazander
* @version 1.0 Jan 22, 2012
*/
public interface VascFrontendActions {
public interface VascFrontendActions extends VascFrontendEntry {
public void refreshData();

View file

@ -0,0 +1,135 @@
/*
* 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;
import java.util.List;
import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.VascEntryLocal;
import net.forwardfire.vasc.core.VascEntryState;
import net.forwardfire.vasc.core.VascException;
import net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService;
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener;
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;
/**
* VascFrontendController holds all dynamic frontend code in one place.
*
*
* @author Willem Cazander
* @version 1.0 Mar 21, 2007
*/
public interface VascFrontendController {
/**
* @return the vascFrontend
*/
public VascFrontend getVascFrontend();
/**
* @param vascFrontend the vascFrontend to set
*/
public void setVascFrontend(VascFrontend vascFrontend);
/**
* Gets the VascFrontendActions to make frontend actions simple.
*/
public VascFrontendActions getVascFrontendActions();
/**
* @return the vascFrontendPager
*/
public VascFrontendPager getVascFrontendPager();
/**
* @return the VascFrontendHelper
*/
public VascFrontendHelper getVascFrontendHelper();
/**
* @param vascFrontendHelper The VascFrontendHelper to set.
*/
public void setVascFrontendHelper(VascFrontendHelper vascFrontendHelper);
/**
* @return the vascEntryResourceResolver
*/
public VascEntryResourceResolver getVascEntryResourceResolver();
public void putVascUIComponent(String rendererId,String uiComponentClass);
public VascUIComponent getVascUIComponent(String rendererId) throws VascException;
public String getVascUIComponentClass(String rendererId);
public void setVascController(VascController vascController);
public VascController getVascController();
public void addFieldVascUIComponents(VascEntryField field,VascUIComponent uiComponent,Object editor);
public VascUIComponent getFieldVascUIComponent(VascEntryField field);
public Object getFieldRealRenderer(VascEntryField field);
public void clearFieldRenderObjects();
/**
* @return the vascEntryResourceImageResolver
*/
public VascEntryResourceImageResolver getVascEntryResourceImageResolver();
public List<VascEntryFieldValidatorService> getVascValidatorServices();
public VascEntryState getVascEntryState();
public void initFrontendListeners(VascEntryLocal entry,String frontendType) throws InstantiationException, IllegalAccessException;
public void addVascEntryFrontendEventListener(VascEntryFrontendEventListener listener);
public List<VascEntryFrontendEventListener> getVascEntryFrontendEventListener(VascEntryFrontendEventListener.VascFrontendEventType type);
public void fireVascFrontendEvent(VascEntry entry,VascFrontendEventType type,Object data);
/**
* @return the vascFrontendDataSelector
*/
public VascFrontendDataSelector getVascFrontendDataSelector();
/**
* @return the vascFrontendUserController
*/
public VascFrontendUserController getVascFrontendUserController();
/**
* @return the vascFrontendUserSettingController
*/
public VascFrontendUserSettingController getVascFrontendUserSettingController();
}

View file

@ -0,0 +1,76 @@
/*
* 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;
import net.forwardfire.vasc.core.VascEntryState;
import net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService;
import net.forwardfire.vasc.core.entry.VascEntryResourceImageResolver;
import net.forwardfire.vasc.core.entry.VascEntryResourceResolver;
/**
* VascFrontendControllerLocal removed all sets from VascFrontendController interface.
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
public interface VascFrontendControllerLocal extends VascFrontendController {
/**
* @param vascFrontendActions the vascFrontendActions to set
*/
public void setVascFrontendActions(VascFrontendActions vascFrontendActions);
/**
* @param vascFrontendPager the vascFrontendPager to set
*/
public void setVascFrontendPager(VascFrontendPager vascFrontendPager);
/**
* @param vascEntryResourceResolver the vascEntryResourceResolver to set
*/
public void setVascEntryResourceResolver(VascEntryResourceResolver vascEntryResourceResolver);
/**
* @param vascEntryResourceImageResolver the vascEntryResourceImageResolver to set
*/
public void setVascEntryResourceImageResolver(VascEntryResourceImageResolver vascEntryResourceImageResolver);
public void addVascValidatorService(VascEntryFieldValidatorService validatorService);
public void setVascEntryState(VascEntryState state);
/**
* @param vascFrontendDataSelector the vascFrontendDataSelector to set
*/
public void setVascFrontendDataSelector(VascFrontendDataSelector vascFrontendDataSelector);
/**
* @param vascFrontendUserController the vascFrontendUserController to set
*/
public void setVascFrontendUserController(VascFrontendUserController vascFrontendUserController);
/**
* @param vascFrontendUserSettingController the vascFrontendUserSettingController to set
*/
public void setVascFrontendUserSettingController(VascFrontendUserSettingController vascFrontendUserSettingController);
}

View file

@ -0,0 +1,53 @@
/*
* 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;
import java.util.List;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.actions.VascAction;
/**
* VascFrontendDataSelector orders and checks all vasc entry data to render.
*
* note all the get properties for different el parsers.
*
* @author Willem Cazander
* @version 1.0 Jun 1, 2012
*/
public interface VascFrontendDataSelector extends VascFrontendEntry {
public boolean isActionAllowed(VascAction action);
public boolean isFieldView(VascEntryField field);
public boolean isFieldCreate(VascEntryField field);
public boolean isFieldEdit(VascEntryField field);
public boolean isFieldEditReadOnly(VascEntryField field);
public boolean isFieldList(VascEntryField field);
public List<VascEntryField> getFieldsList();
public List<VascEntryField> getFieldsCreate();
public List<VascEntryField> getFieldsEdit();
}

View file

@ -0,0 +1,37 @@
/*
* 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;
import net.forwardfire.vasc.core.VascEntry;
/**
* VascFrontendEntry is base frontend interface to init on entry.
*
*
* @author Willem Cazander
* @version 1.0 Jun 2, 2012
*/
public interface VascFrontendEntry {
public void init(VascEntry entry);
}

View file

@ -26,8 +26,8 @@ import java.util.List;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.VascLinkEntry;
import net.forwardfire.vasc.core.VascLinkEntryType;
import net.forwardfire.vasc.core.VascEntryLink;
import net.forwardfire.vasc.core.VascEntryLinkType;
import net.forwardfire.vasc.core.actions.GlobalVascAction;
import net.forwardfire.vasc.core.actions.RowVascAction;
@ -39,6 +39,7 @@ import net.forwardfire.vasc.core.actions.RowVascAction;
*/
public interface VascFrontendHelper {
/*
public boolean renderView(VascEntryField field);
public boolean renderList(VascEntryField field);
public boolean renderEdit(VascEntryField field);
@ -46,10 +47,11 @@ public interface VascFrontendHelper {
public boolean renderCreate(VascEntryField field);
public boolean renderGlobalVascAction(GlobalVascAction action);
public boolean renderRowVascAction(RowVascAction action);
*/
public Integer getTotalColumnsWidth(VascEntry entry);
public List<VascLinkEntry> getVascLinkEntryByType(VascEntry entry,VascLinkEntryType type);
public List<VascEntryLink> getVascLinkEntryByType(VascEntry entry,VascEntryLinkType type);
public List<String> validateObjectField(VascEntryField field);

View file

@ -34,7 +34,7 @@ import net.forwardfire.vasc.backend.VascBackendPageNumber;
* @author Willem Cazander
* @version 1.0 Jan 22, 2012
*/
public interface VascFrontendPager {
public interface VascFrontendPager extends VascFrontendEntry {
public long getPageStartCount();
public long getPageStopCount();

View file

@ -0,0 +1,46 @@
/*
* 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;
import java.util.Locale;
/**
* VascFrontendUserController is user intration interface for frontend.
*
*
* @author Willem Cazander
* @version 1.0 Jun 1, 2012
*/
public interface VascFrontendUserController {
public Locale getUserLocale();
public boolean isUser();
public Object getUserId();
public String getUserName();
public boolean hasUserRole(String role);
}

View file

@ -0,0 +1,41 @@
/*
* 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;
import java.util.List;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryField;
/**
* VascFrontendUserSettingController should load and save settings for user.
*
*
* @author Willem Cazander
* @version 1.0 Jun 1, 2012
*/
public interface VascFrontendUserSettingController {
}

View file

@ -31,5 +31,6 @@ import net.forwardfire.vasc.backend.AbstractVascBackendState;
* @version 1.0 May 26, 2009
*/
public class DefaultVascBackendState extends AbstractVascBackendState {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 8828343641448595993L;
}

View file

@ -22,110 +22,15 @@
package net.forwardfire.vasc.impl;
import net.forwardfire.vasc.backend.VascBackendController;
import net.forwardfire.vasc.core.VascEntryConfigController;
import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.core.VascEntryController;
import net.forwardfire.vasc.core.VascEntryFieldTypeController;
import net.forwardfire.vasc.core.VascEventChannelController;
import net.forwardfire.vasc.core.VascUserRoleController;
import net.forwardfire.vasc.core.AbstractVascControllerLocal;
/**
*
* DefaultVascController is default implemention to hold all core interfaces.
*
* @author Willem Cazander
* @version 1.0 Sep 11, 2008
*/
public class DefaultVascController implements VascController {
public class DefaultVascController extends AbstractVascControllerLocal {
private VascEntryConfigController vascEntryConfigController = null;
private VascBackendController vascBackendController = null;
private VascEntryController vascEntryController = null;
private VascEntryFieldTypeController vascEntryFieldTypeController = null;
private VascEventChannelController vascEventChannelController = null;
private VascUserRoleController vascUserRoleController = null;
/**
* @return the vascEntryConfigController
*/
public VascEntryConfigController getVascEntryConfigController() {
return vascEntryConfigController;
}
/**
* @param vascEntryConfigController the vascEntryConfigController to set
*/
public void setVascEntryConfigController(VascEntryConfigController vascEntryConfigController) {
this.vascEntryConfigController = vascEntryConfigController;
}
/**
* @return the vascEventChannelController
*/
public VascEventChannelController getVascEventChannelController() {
return vascEventChannelController;
}
/**
* @param vascEventChannelController the vascEventChannelController to set
*/
public void setVascEventChannelController(VascEventChannelController vascEventChannelController) {
this.vascEventChannelController = vascEventChannelController;
}
/**
* @return the vascBackendController
*/
public VascBackendController getVascBackendController() {
return vascBackendController;
}
/**
* @param vascBackendController the vascBackendController to set
*/
public void setVascBackendController(VascBackendController vascBackendController) {
this.vascBackendController = vascBackendController;
}
/**
* @return the vascEntryController
*/
public VascEntryController getVascEntryController() {
return vascEntryController;
}
/**
* @param vascEntryController the vascEntryController to set
*/
public void setVascEntryController(VascEntryController vascEntryController) {
this.vascEntryController = vascEntryController;
}
/**
* @return the vascEntryFieldController
*/
public VascEntryFieldTypeController getVascEntryFieldTypeController() {
return vascEntryFieldTypeController;
}
/**
* @param vascEntryFieldController the vascEntryFieldController to set
*/
public void setVascEntryFieldTypeController(VascEntryFieldTypeController vascEntryFieldTypeController) {
this.vascEntryFieldTypeController = vascEntryFieldTypeController;
}
/**
* @return the vascUserRoleController
*/
public VascUserRoleController getVascUserRoleController() {
return vascUserRoleController;
}
/**
* @param vascUserRoleController the vascUserRoleController to set
*/
public void setVascUserRoleController(VascUserRoleController vascUserRoleController) {
this.vascUserRoleController = vascUserRoleController;
}
}

View file

@ -22,865 +22,15 @@
package net.forwardfire.vasc.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.forwardfire.vasc.backend.VascBackendFilter;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.VascEntryFieldSet;
import net.forwardfire.vasc.core.VascLinkEntry;
import net.forwardfire.vasc.core.actions.ColumnVascAction;
import net.forwardfire.vasc.core.actions.GlobalVascAction;
import net.forwardfire.vasc.core.actions.RowVascAction;
import net.forwardfire.vasc.core.actions.VascAction;
import net.forwardfire.vasc.core.entry.VascEntryFieldEventChannel;
import net.forwardfire.vasc.frontend.VascFrontendData;
import net.forwardfire.vasc.core.AbstractVascEntryLocal;
/**
* VascEntry
* DefaultVascEntry
*
* @author Willem Cazander
* @version 1.0 Mar 21, 2007
*/
public class DefaultVascEntry implements VascEntry {
private static final long serialVersionUID = 1L;
private String id = null;
private String name = null;
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 boolean vascDisplayOnly = false;
private boolean vascAdminList = true;
private boolean vascAdminEdit = true;
private boolean vascAdminCreate = true;
private boolean vascAdminDelete = true;
private List<VascEntryField> vascFields = null;
private List<RowVascAction> rowActions = null;
private List<ColumnVascAction> columnActions = null;
private List<GlobalVascAction> globalActions = null;
private List<GlobalVascAction> exportActions = null;
private List<VascEntryFieldSet> vascEntryFieldSets = null;
private List<VascLinkEntry> vascLinkEntries = null;
private Map<String,Object> entryParameters = null;
private VascEntryFieldEventChannel vascEntryFieldEventChannel = null;
private Map<String,List<String>> eventEntryFrontendEventListeners = null;
private List<String> eventEntryBackendEventListeners = null;
private List<VascEntryField> listOptions = null;
private List<VascBackendFilter> backendFilters = null;
private Map<String,List<String>> eventEntryFrontendActions = null;
private String backendId = null;
private VascFrontendData vascFrontendData = null;
/**
* Te constructor
*/
public DefaultVascEntry() {
vascFields = new ArrayList<VascEntryField>(20);
rowActions = new ArrayList<RowVascAction>(10);
columnActions = new ArrayList<ColumnVascAction>(5);
globalActions = new ArrayList<GlobalVascAction>(5);
exportActions = new ArrayList<GlobalVascAction>(10);
vascEntryFieldSets = new ArrayList<VascEntryFieldSet>(10);
vascLinkEntries = new ArrayList<VascLinkEntry>(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);
listOptions = new ArrayList<VascEntryField>(5);
backendFilters = new ArrayList<VascBackendFilter>(3);
}
/**
* @see java.lang.Object#clone()
*/
@Override
public VascEntry clone() throws CloneNotSupportedException {
DefaultVascEntry result = new DefaultVascEntry();
result.id=id;
result.name=name;
result.helpId=helpId;
result.image=image;
result.listDescription=listDescription;
result.listImage=listImage;
result.editDescription=editDescription;
result.editImage=editImage;
result.deleteDescription=deleteDescription;
result.deleteImage=deleteImage;
result.createDescription=createDescription;
result.createImage=createImage;
result.primaryKeyFieldId=primaryKeyFieldId;
result.displayNameFieldId=displayNameFieldId;
result.vascDisplayOnly=vascDisplayOnly;
result.vascAdminList=vascAdminList;
result.vascAdminCreate=vascAdminCreate;
result.vascAdminEdit=vascAdminEdit;
result.vascAdminDelete=vascAdminDelete;
result.backendId=backendId;
result.vascEntryFieldEventChannel=vascEntryFieldEventChannel;
result.eventEntryFrontendEventListeners.putAll(eventEntryFrontendEventListeners);
result.eventEntryBackendEventListeners.addAll(eventEntryBackendEventListeners);
result.eventEntryFrontendActions.putAll(eventEntryFrontendActions);
// skipping 'vascFrontendData' because it should always be null when cloning happens.
for (VascEntryField f:vascFields) {
VascEntryField ff = f.clone();
ff.setVascEntry(result); // mmm remove this ?
result.vascFields.add(ff);
}
for (VascAction a:rowActions) {
result.rowActions.add((RowVascAction)a.clone());
}
for (VascAction a:columnActions) {
result.columnActions.add((ColumnVascAction)a.clone());
}
for (VascAction a:globalActions) {
result.globalActions.add((GlobalVascAction)a.clone());
}
for (VascAction a:exportActions) {
result.exportActions.add((GlobalVascAction)a.clone());
}
for (VascEntryFieldSet s:vascEntryFieldSets) {
result.vascEntryFieldSets.add(s.clone());
}
for (VascLinkEntry l:vascLinkEntries) {
result.vascLinkEntries.add(l.clone());
}
for (VascEntryField listOption:listOptions) {
VascEntryField ff = listOption.clone();
ff.setVascEntry(result);
result.listOptions.add(ff);
}
// for (VascBackendFilter f:backendFilters) {
// VascBackendFilter ff = f.clone();
// result.backendFilters.add(ff);
// }
// no cloning of the values here ?
for (String key:entryParameters.keySet()) {
Object value = entryParameters.get(key);
result.setEntryParameter(key, value);
}
return result;
}
public class DefaultVascEntry extends AbstractVascEntryLocal {
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the helpId
*/
public String getHelpId() {
return helpId;
}
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId) {
this.helpId = helpId;
}
/**
* @return the image
*/
public String getImage() {
return image;
}
/**
* @param image the image to set
*/
public void setImage(String image) {
this.image = image;
}
/**
* @return the listDescription
*/
public String getListDescription() {
return listDescription;
}
/**
* @param listDescription the listDescription to set
*/
public void setListDescription(String listDescription) {
this.listDescription = listDescription;
}
/**
* @return the listImage
*/
public String getListImage() {
return listImage;
}
/**
* @param listImage the listImage to set
*/
public void setListImage(String listImage) {
this.listImage = listImage;
}
/**
* @return the editDescription
*/
public String getEditDescription() {
return editDescription;
}
/**
* @param editDescription the editDescription to set
*/
public void setEditDescription(String editDescription) {
this.editDescription = editDescription;
}
/**
* @return the editImage
*/
public String getEditImage() {
return editImage;
}
/**
* @param editImage the editImage to set
*/
public void setEditImage(String editImage) {
this.editImage = editImage;
}
/**
* @return the deleteDescription
*/
public String getDeleteDescription() {
return deleteDescription;
}
/**
* @param deleteDescription the deleteDescription to set
*/
public void setDeleteDescription(String deleteDescription) {
this.deleteDescription = deleteDescription;
}
/**
* @return the deleteImage
*/
public String getDeleteImage() {
return deleteImage;
}
/**
* @param deleteImage the deleteImage to set
*/
public void setDeleteImage(String deleteImage) {
this.deleteImage = deleteImage;
}
/**
* @return the createDescription
*/
public String getCreateDescription() {
return createDescription;
}
/**
* @param createDescription the createDescription to set
*/
public void setCreateDescription(String createDescription) {
this.createDescription = createDescription;
}
/**
* @return the createImage
*/
public String getCreateImage() {
return createImage;
}
/**
* @param createImage the createImage to set
*/
public void setCreateImage(String createImage) {
this.createImage = createImage;
}
/**
* @return the primaryKeyFieldId
*/
public String getPrimaryKeyFieldId() {
return primaryKeyFieldId;
}
/**
* @param primaryKeyFieldId the primaryKeyFieldId to set
*/
public void setPrimaryKeyFieldId(String primaryKeyFieldId) {
this.primaryKeyFieldId = primaryKeyFieldId;
}
/**
* @return the displayNameFieldId
*/
public String getDisplayNameFieldId() {
return displayNameFieldId;
}
/**
* @param displayNameFieldId the displayNameFieldId to set
*/
public void setDisplayNameFieldId(String displayNameFieldId) {
this.displayNameFieldId = displayNameFieldId;
}
/**
* @return the vascAdminList
*/
public boolean isVascAdminList() {
return vascAdminList;
}
/**
* @param vascAdminList the vascAdminList to set
*/
public void setVascAdminList(boolean vascAdminList) {
this.vascAdminList = vascAdminList;
}
/**
* @return the vascAdminEdit
*/
public boolean isVascAdminEdit() {
return vascAdminEdit;
}
/**
* @param vascAdminEdit the vascAdminEdit to set
*/
public void setVascAdminEdit(boolean vascAdminEdit) {
this.vascAdminEdit = vascAdminEdit;
}
/**
* @return the vascAdminCreate
*/
public boolean isVascAdminCreate() {
return vascAdminCreate;
}
/**
* @param vascAdminCreate the vascAdminCreate to set
*/
public void setVascAdminCreate(boolean vascAdminCreate) {
this.vascAdminCreate = vascAdminCreate;
}
/**
* @return the vascAdminDelete
*/
public boolean isVascAdminDelete() {
return vascAdminDelete;
}
/**
* @param vascAdminDelete the vascAdminDelete to set
*/
public void setVascAdminDelete(boolean vascAdminDelete) {
this.vascAdminDelete = vascAdminDelete;
}
/**
* @return the vascFields
*/
public List<VascEntryField> getVascEntryFields() {
return vascFields;
}
/**
* @param vascField the vascFields to add
*/
public void addVascEntryField(VascEntryField vascField) {
vascFields.add(vascField);
}
/**
* @param vascField the vascFields to remove
*/
public void removeVascEntryField(VascEntryField vascField) {
vascFields.remove(vascField);
}
/**
* @see net.forwardfire.vasc.core.VascEntry#getVascEntryFieldById(java.lang.String)
*/
public VascEntryField getVascEntryFieldById(String id) {
for (VascEntryField v:vascFields) {
if (v.getId().equals(id)) {
return v;
}
}
return null;
}
/**
* @return the rowActions
*/
public List<RowVascAction> getRowActions() {
return rowActions;
}
/**
* @return the RowVascAction
*/
public RowVascAction getRowActionById(String actionId) {
for (RowVascAction a:rowActions) {
if (a.getId().equals(actionId)) {
return a;
}
}
return null;
}
/**
* @param rowAction the rowAction to add
*/
public void addRowAction(RowVascAction rowAction) {
rowActions.add(rowAction);
}
/**
* @param rowAction the rowAction to remove
*/
public void removeRowAction(RowVascAction rowAction) {
rowActions.remove(rowAction);
}
/**
* @return the columnActions
*/
public List<ColumnVascAction> getColumnActions() {
return columnActions;
}
/**
* @return the ColumnVascAction
*/
public ColumnVascAction getColumnActionById(String actionId) {
for (ColumnVascAction a:columnActions) {
if (a.getId().equals(actionId)) {
return a;
}
}
return null;
}
/**
* @param columnAction the columnActions to add
*/
public void addColumnAction(ColumnVascAction columnAction) {
columnActions.add(columnAction);
}
/**
* @param columnAction the columnActions to remove
*/
public void removeColumnAction(ColumnVascAction columnAction) {
columnActions.remove(columnAction);
}
/**
* @return the globalActions
*/
public List<GlobalVascAction> getGlobalActions() {
return globalActions;
}
/**
* @return the GlobalVascAction
*/
public GlobalVascAction getGlobalActionById(String actionId) {
for (GlobalVascAction a:globalActions) {
if (a.getId().equals(actionId)) {
return a;
}
}
return null;
}
/**
* @param globalAction the globalAction to add
*/
public void addGlobalAction(GlobalVascAction globalAction) {
globalActions.add(globalAction);
}
/**
* @param globalAction the globalAction to remove
*/
public void removeGlobalAction(GlobalVascAction globalAction) {
globalActions.remove(globalAction);
}
/**
* @return the exportActions
*/
public List<GlobalVascAction> getExportActions() {
return exportActions;
}
/**
* @return the GlobalVascAction exportAction
*/
public GlobalVascAction getExportActionById(String actionId) {
for (GlobalVascAction a:exportActions) {
if (a.getId().equals(actionId)) {
return a;
}
}
return null;
}
/**
* @param exportAction the exportAction to add
*/
public void addExportAction(GlobalVascAction exportAction) {
exportActions.add(exportAction);
}
/**
* @param exportAction the exportAction to remove
*/
public void removeExportAction(GlobalVascAction exportAction) {
exportActions.remove(exportAction);
}
/**
* @return the vascEntryFieldSets
*/
public List<VascEntryFieldSet> getVascEntryFieldSets() {
return vascEntryFieldSets;
}
/**
* @return the VascEntryFieldSet
*/
public VascEntryFieldSet getVascEntryFieldSetById(String fieldSetId) {
for (VascEntryFieldSet a:vascEntryFieldSets) {
if (a.getId().equals(fieldSetId)) {
return a;
}
}
return null;
}
/**
* @param vascEntryFieldSet the vascEntryFieldSet to add
*/
public void addVascEntryFieldSet(VascEntryFieldSet vascEntryFieldSet) {
vascEntryFieldSets.add(vascEntryFieldSet);
}
/**
* @param vascEntryFieldSet the vascEntryFieldSet to add
*/
public void removeVascEntryFieldSet(VascEntryFieldSet vascEntryFieldSet) {
vascEntryFieldSets.remove(vascEntryFieldSet);
}
/**
* @return the vascLinkEntries
*/
public List<VascLinkEntry> getVascLinkEntries() {
return vascLinkEntries;
}
/**
* @return the VascLinkEntry
*/
public VascLinkEntry getVascLinkEntryById(String linkId) {
for (VascLinkEntry a:vascLinkEntries) {
if (a.getId().equals(linkId)) {
return a;
}
}
return null;
}
/**
* @param vascLinkEntry the vascLinkEntry to set
*/
public void addVascLinkEntry(VascLinkEntry vascLinkEntry) {
vascLinkEntries.add(vascLinkEntry);
}
/**
* @param vascLinkEntry the vascLinkEntry to remove
*/
public void removeVascLinkEntry(VascLinkEntry vascLinkEntry) {
vascLinkEntries.remove(vascLinkEntry);
}
/**
* @see net.forwardfire.vasc.core.VascEntry#getEntryParameter(java.lang.String)
*/
public Object getEntryParameter(String key) {
return entryParameters.get(key);
}
/**
* @see net.forwardfire.vasc.core.VascEntry#getEntryParameterKeys()
*/
public List<String> getEntryParameterKeys() {
return new ArrayList<String>(entryParameters.keySet());
}
/**
* @see net.forwardfire.vasc.core.VascEntry#setEntryParameter(java.lang.String, java.lang.Object)
*/
public void setEntryParameter(String key, Object value) {
entryParameters.put(key, value);
}
/**
* @return the vascFrontendData
*/
public VascFrontendData getVascFrontendData() {
return vascFrontendData;
}
/**
* @param vascFrontendData the vascFrontendData to set
*/
public void setVascFrontendData(VascFrontendData vascFrontendData) {
this.vascFrontendData = vascFrontendData;
}
/**
* @return the backendId
*/
public String getBackendId() {
return backendId;
}
/**
* @param backendId the backendId to set
*/
public void setBackendId(String backendId) {
this.backendId = backendId;
}
/**
* @return the vascDisplayOnly
*/
public boolean isVascDisplayOnly() {
return vascDisplayOnly;
}
/**
* @param vascDisplayOnly the vascDisplayOnly to set
*/
public void setVascDisplayOnly(boolean vascDisplayOnly) {
this.vascDisplayOnly = vascDisplayOnly;
}
/**
* @return the vascEntryFieldEventChannel
*/
public VascEntryFieldEventChannel getVascEntryFieldEventChannel() {
return vascEntryFieldEventChannel;
}
/**
* @param vascEntryFieldEventChannel the vascEntryFieldEventChannel to set
*/
public void setVascEntryFieldEventChannel(VascEntryFieldEventChannel vascEntryFieldEventChannel) {
this.vascEntryFieldEventChannel = vascEntryFieldEventChannel;
}
/**
* Added an VascEntryBackendEventListener
* @param listener The class of the event listener.
*/
public void addVascEntryBackendEventListener(String listener) {
eventEntryBackendEventListeners.add(listener);
}
/**
* Returns the list of VascEntryBackendEventListener
* @return
*/
public List<String> getVascEntryBackendEventListeners() {
return eventEntryBackendEventListeners;
}
/**
* Added an VascEntryFrontendEventListener
* @param listener The class of the event listener.
*/
public void addVascEntryFrontendEventListener(String listener,String frontendType) {
if (frontendType==null) {
frontendType = "__ALL__";
}
if (frontendType.isEmpty() | "all".equalsIgnoreCase(frontendType)) {
frontendType = "__ALL__";
}
List<String> typeList = eventEntryFrontendEventListeners.get(frontendType);
if (typeList==null) {
typeList = new ArrayList<String>(10);
eventEntryFrontendEventListeners.put(frontendType,typeList);
}
typeList.add(listener);
}
/**
* Returns the list of VascEntryFrontendEventListener
* @return
*/
public List<String> getVascEntryFrontendEventListenersByType(String frontendType) {
if (frontendType==null) {
frontendType = "__ALL__";
}
if (frontendType.isEmpty() | "all".equalsIgnoreCase(frontendType)) {
frontendType = "__ALL__";
}
List<String> typeList = eventEntryFrontendEventListeners.get(frontendType);
if (typeList==null) {
typeList = new ArrayList<String>(0);
}
if (frontendType.equals("__ALL__")==false) {
// also add all
List<String> typeListAll = eventEntryFrontendEventListeners.get("__ALL__");
if (typeListAll!=null) {
typeList.addAll(typeListAll);
}
}
return typeList;
}
public void addVascEntryFrontendAction(String actionClass,String frontendType) {
if (frontendType==null) {
frontendType = "__ALL__";
}
if (frontendType.isEmpty() | "all".equalsIgnoreCase(frontendType)) {
frontendType = "__ALL__";
}
List<String> typeList = eventEntryFrontendActions.get(frontendType);
if (typeList==null) {
typeList = new ArrayList<String>(10);
eventEntryFrontendActions.put(frontendType,typeList);
}
typeList.add(actionClass);
}
public List<String> getVascEntryFrontendActionsByType(String frontendType) {
if (frontendType==null) {
frontendType = "__ALL__";
}
if (frontendType.isEmpty() | "all".equalsIgnoreCase(frontendType)) {
frontendType = "__ALL__";
}
List<String> typeList = eventEntryFrontendActions.get(frontendType);
if (typeList==null) {
typeList = new ArrayList<String>(0);
}
if (frontendType.equals("__ALL__")==false) {
// also add all
List<String> typeListAll = eventEntryFrontendActions.get("__ALL__");
if (typeListAll!=null) {
typeList.addAll(typeListAll);
}
}
return typeList;
}
public void addListOption(VascEntryField listOption) {
if (listOption==null) {
throw new NullPointerException("can not add null listOption.");
}
listOptions.add(listOption);
}
public List<VascEntryField> getListOptions() {
return listOptions;
}
public VascEntryField getListOptionById(String listOptionId) {
for (VascEntryField vef:listOptions) {
if (vef.getId().equals(listOptionId)) {
return vef;
}
}
return null;
}
public void removeListOption(VascEntryField listOption) {
listOptions.remove(listOption);
}
public void addVascBackendFilter(VascBackendFilter filter) {
backendFilters.add(filter);
}
public List<VascBackendFilter> getVascBackendFilters() {
return backendFilters;
}
}
private static final long serialVersionUID = -1065334591099689417L;
}

View file

@ -30,17 +30,27 @@ import java.util.Map;
import java.util.ResourceBundle;
import net.forwardfire.vasc.backend.VascBackend;
import net.forwardfire.vasc.backend.VascBackendState;
import net.forwardfire.vasc.backend.proxy.VascBackendProxy;
import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryConfigController;
import net.forwardfire.vasc.core.VascEntryConfigControllerLocal;
import net.forwardfire.vasc.core.VascEntryConfigFinalizer;
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.frontend.VascFrontendControllerLocal;
import net.forwardfire.vasc.frontend.VascFrontendEntry;
import net.forwardfire.vasc.impl.entry.DefaultVascEntryResourceResolver;
import net.forwardfire.vasc.impl.frontend.DefaultVascFrontendHelper;
/**
* DefaultVascEntryConfigController runs all VascEntryConfigFinalizers on VascEntry.
@ -48,14 +58,16 @@ import net.forwardfire.vasc.impl.entry.DefaultVascEntryResourceResolver;
* @author Willem Cazander
* @version 1.0 May 9, 2012
*/
public class DefaultVascEntryConfigController implements VascEntryConfigController {
public class DefaultVascEntryConfigController implements VascEntryConfigControllerLocal {
private List<VascEntryConfigFinalizer> configFinalizers = null;
private List<VascBackendProxy> backendProxies = null;
private Map<String,VascEntryExporter> dataExporters = null;
private List<VascEntryFieldValidatorService> fieldValidators = null;
private int defaultPageSize = 100;
private int defaultPageSizeMax = 1000;
private Map<VascInterfaceKey,Class<?>> vascInterfaceImpls = null;
private Map<VascInterfaceKeyFrontend,Class<?>> vascInterfaceImplFrontends = null;
private VascInterfaceLoader vascInterfaceLoader = null;
private VascBackendState masterVascBackendState = null;
private String resourceBundle = null;
public DefaultVascEntryConfigController() {
@ -63,15 +75,91 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll
backendProxies = new ArrayList<VascBackendProxy>(10);
dataExporters = new HashMap<String,VascEntryExporter>(10);
fieldValidators = new ArrayList<VascEntryFieldValidatorService>(5);
vascInterfaceImpls = new HashMap<VascInterfaceKey,Class<?>>(VascInterfaceKey.values().length);
vascInterfaceImplFrontends = new HashMap<VascInterfaceKeyFrontend,Class<?>>(VascInterfaceKeyFrontend.values().length);
vascInterfaceLoader = new DefaultVascInterfaceLoader(this);
masterVascBackendState = new DefaultVascBackendState();
masterVascBackendState.setPageSize(100);
masterVascBackendState.setPageSizeMax(1500);
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigController#getVascInterfaceLoader()
*/
public VascInterfaceLoader getVascInterfaceLoader() {
return vascInterfaceLoader;
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigController#createVascInterfaceImplemention(net.forwardfire.vasc.core.VascInterfaceKey)
*/
public Object createVascInterfaceImplemention(VascInterfaceKey key) {
Class<?> classImpl = vascInterfaceImpls.get(key);
if (classImpl==null) {
throw new IllegalStateException("Could not find impl class for key: "+key);
}
try {
Object objectImpl = classImpl.newInstance();
return objectImpl;
} catch (Exception e) {
throw new RuntimeException("Could not instance of class: "+classImpl,e);
}
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigControllerLocal#putVascInterfaceImplemention(net.forwardfire.vasc.core.VascInterfaceKey, java.lang.Class)
*/
public void putVascInterfaceImplemention(VascInterfaceKey key,Class<?> interfaceImpl) {
if (key==null) {
throw new NullPointerException("Can't add null interface key.");
}
if (interfaceImpl==null) {
throw new NullPointerException("Can't add null interface class.");
}
vascInterfaceImpls.put(key,interfaceImpl);
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigController#createVascInterfaceImplementionFrontend(net.forwardfire.vasc.core.VascInterfaceKeyFrontend, net.forwardfire.vasc.core.VascEntry)
*/
public Object createVascInterfaceImplementionFrontend(VascInterfaceKeyFrontend key, VascEntry entry) {
Class<?> classImpl = vascInterfaceImplFrontends.get(key);
if (classImpl==null) {
throw new IllegalStateException("Could not find impl class for key: "+key);
}
try {
Object objectImpl = classImpl.newInstance();
if (objectImpl instanceof VascFrontendEntry ) {
((VascFrontendEntry)objectImpl).init(entry);
}
return objectImpl;
} catch (Exception e) {
throw new RuntimeException("Could not instance of class: "+classImpl,e);
}
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigControllerLocal#putVascInterfaceImplementionFrontend(net.forwardfire.vasc.core.VascInterfaceKeyFrontend, java.lang.Class)
*/
public void putVascInterfaceImplementionFrontend(VascInterfaceKeyFrontend key, Class<?> interfaceImpl) {
if (key==null) {
throw new NullPointerException("Can't add null interface key.");
}
if (interfaceImpl==null) {
throw new NullPointerException("Can't add null interface class.");
}
vascInterfaceImplFrontends.put(key,interfaceImpl);
}
public VascEntry configVascEntry(VascController vascController,String entryId) throws VascException {
VascEntry vascEntry = vascController.getVascEntryController().getVascEntryById(entryId);
VascEntryLocal vascEntry = (VascEntryLocal)vascController.getVascEntryController().getVascEntryById(entryId);
configVascEntry(vascController,vascEntry);
return vascEntry;
}
public void configVascEntry(VascController vascController,VascEntry vascEntry) throws VascException {
public void configVascEntry(VascController vascController,VascEntryLocal vascEntry) throws VascException {
for (VascEntryConfigFinalizer finalizer:configFinalizers) {
finalizer.configVascEntry(vascController,vascEntry);
}
@ -82,6 +170,9 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll
*/
public VascBackend configVascBackendProxied(VascController vascController,VascEntry vascEntry) throws VascException {
VascBackend realBackend = vascController.getVascBackendController().getVascBackendById(vascEntry.getBackendId());
if (realBackend==null) {
throw new VascException("Could not find backend: "+vascEntry.getBackendId());
}
return configVascBackendProxied(vascController,vascEntry,realBackend);
}
@ -106,52 +197,94 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll
return backend;
}
/**
* @throws VascException
* @see net.forwardfire.vasc.core.VascEntryConfigController#configVascFrontendData(net.forwardfire.vasc.core.VascController, net.forwardfire.vasc.core.VascEntry, java.util.Locale)
* @see net.forwardfire.vasc.core.VascEntryConfigController#configVascFrontendController(net.forwardfire.vasc.core.VascController, net.forwardfire.vasc.core.VascEntry, java.util.Locale)
*/
public void configVascFrontendData(VascController vascController,VascEntry entry, Locale locale) throws VascException {
public void configVascFrontendController(VascController vascController,VascEntryLocal entry) throws VascException {
DefaultVascFrontendData vascFrontendData = new DefaultVascFrontendData();
DefaultVascEntryState state = new DefaultVascEntryState();
DefaultVascBackendState backendState = new DefaultVascBackendState();
backendState.setPageSize(vascController.getVascEntryConfigController().getDefaultPageSize());
backendState.setPageSizeMax(vascController.getVascEntryConfigController().getDefaultPageSizeMax());
// get the interface loader and create some impl objects
VascInterfaceLoader loader = getVascInterfaceLoader();
VascFrontendControllerLocal controller = loader.createVascFrontendControllerLocalImpl();
VascBackendState backendState = loader.createVascBackendStateImpl();
VascEntryState state = loader.createVascEntryStateImpl();
// Add impl to tree
state.setVascBackendState(backendState);
vascFrontendData.setVascEntryState(state);
controller.setVascEntryState(state);
controller.setVascController(vascController);
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));
// Config backend state from master template
VascBackendState master = getMasterVascBackendState();
for (String key:master.getDataParameterKeys()) {
backendState.setDataParameter(key, master.getDataParameter(key));
}
backendState.setPageSize(master.getPageSize());
backendState.setPageSizeMax(master.getPageSizeMax());
// init resource resultsers
vascFrontendData.setVascEntryResourceResolver(new DefaultVascEntryResourceResolver(ResourceBundle.getBundle(vascController.getVascEntryConfigController().getResourceBundle(), locale)));
vascFrontendData.setVascFrontendHelper(new DefaultVascFrontendHelper());
// init resource loaders
if (getResourceBundle()==null) {
controller.setVascEntryResourceResolver(new DefaultVascEntryResourceResolver());
} else {
Locale locale = controller.getVascFrontendUserController().getUserLocale();
controller.setVascEntryResourceResolver(new DefaultVascEntryResourceResolver(ResourceBundle.getBundle(getResourceBundle(), locale)));
}
controller.setVascFrontendHelper(new DefaultVascFrontendHelper());
//vascFrontendData.setVascEntryResourceImageResolver(new ImageResources());
for(VascEntryFieldValidatorService validator:vascController.getVascEntryConfigController().getVascEntryFieldValidatorServices()) {
vascFrontendData.addVascValidatorService(validator);
// Add validators
for(VascEntryFieldValidatorService validator:getVascEntryFieldValidatorServices()) {
controller.addVascValidatorService(validator);
}
vascFrontendData.setVascController(vascController);
entry.setVascFrontendData(vascFrontendData);
// Add backend to entry
VascBackend backend = vascController.getVascEntryConfigController().configVascBackendProxied(vascController, entry);
vascFrontendData.getVascEntryState().setVascBackend(backend);
vascFrontendData.getVascEntryState().setVascEntry(entry);
controller.getVascEntryState().setVascBackend(backend);
controller.getVascEntryState().setVascEntry(entry);
// Fetch all data field value impl for this backend.
for (VascEntryField field:entry.getVascEntryFields()) {
if (field.getVascEntryFieldValue()==null) {
VascEntryFieldValue v = backend.provideVascEntryFieldValue(field);
field.setVascEntryFieldValue(v);
((VascEntryFieldLocal)field).setVascEntryFieldValue(v);
}
}
vascFrontendData.setVascFrontendPager(new DefaultVascFrontendPager(entry));
vascFrontendData.setVascFrontendActions(new DefaultVascFrontendActions(entry));
}
/* TODO check where this is left over
for (String key:entry.getEntryParameterKeys()) {
Object value = entry.getEntryParameter(key);
if (value instanceof String==false) {
continue;
}
String paraValue = (String)value;
if (paraValue.startsWith("userPara")==false) {
continue;
}
String[] ps = paraValue.split(":");
String type = ps[1];
String paraTypeValue = ps[2];
SetParameterBackendListener listener = new SetParameterBackendListener(vui.userId,vui.username);
listener.setName(key);
listener.setType(type);
listener.setValue(paraTypeValue);
entry.getVa
}
*/
/**
@ -218,10 +351,10 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigController#getVascEntryExporters()
* @see net.forwardfire.vasc.core.VascEntryConfigController#getVascEntryExporterIds()
*/
public List<VascEntryExporter> getVascEntryExporters() {
return new ArrayList<VascEntryExporter>(dataExporters.values());
public List<String> getVascEntryExporterIds() {
return new ArrayList<String>(dataExporters.keySet());
}
/**
@ -238,34 +371,6 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll
this.resourceBundle=resourceBundle;
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigController#getDefaultPageSizeMax()
*/
public int getDefaultPageSizeMax() {
return defaultPageSizeMax;
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigController#setDefaultPageSizeMax(int)
*/
public void setDefaultPageSizeMax(int defaultPageSizeMax) {
this.defaultPageSizeMax=defaultPageSizeMax;
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigController#getDefaultPageSize()
*/
public int getDefaultPageSize() {
return defaultPageSize;
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigController#setDefaultPageSize(int)
*/
public void setDefaultPageSize(int defaultPageSize) {
this.defaultPageSize=defaultPageSize;
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigController#addVascEntryFieldValidatorService(net.forwardfire.vasc.core.entry.VascEntryFieldValidatorService)
*/
@ -286,4 +391,11 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll
public List<VascEntryFieldValidatorService> getVascEntryFieldValidatorServices() {
return fieldValidators;
}
/**
* @see net.forwardfire.vasc.core.VascEntryConfigControllerLocal#getMasterVascBackendState()
*/
public VascBackendState getMasterVascBackendState() {
return masterVascBackendState;
}
}

View file

@ -30,6 +30,7 @@ import java.util.Map;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryControllerLocal;
import net.forwardfire.vasc.core.VascEntryLocal;
/**
* DefaultVascEntryController holds the VascEntries which we can work with.
@ -39,16 +40,16 @@ import net.forwardfire.vasc.core.VascEntryControllerLocal;
*/
public class DefaultVascEntryController implements VascEntryControllerLocal {
private Map<String,VascEntry> entries = null;
private Map<String,VascEntryLocal> entries = null;
public DefaultVascEntryController() {
entries = new HashMap<String,VascEntry>();
entries = new HashMap<String,VascEntryLocal>();
}
/**
* @see net.forwardfire.vasc.core.VascEntryControllerLocal#addVascEntry(net.forwardfire.vasc.core.VascEntry)
*/
public void addVascEntry(VascEntry entry) {
public void addVascEntry(VascEntryLocal entry) {
if (entry==null) {
throw new NullPointerException("Can't add null VascEntry.");
}
@ -69,7 +70,7 @@ public class DefaultVascEntryController implements VascEntryControllerLocal {
* @see net.forwardfire.vasc.core.VascEntryController#getVascEntryById(java.lang.String)
*/
public VascEntry getVascEntryById(String id) {
VascEntry entry = entries.get(id);
VascEntryLocal entry = entries.get(id);
if (entry==null) {
throw new NullPointerException("Could not find vasc entry with id: "+id);
}
@ -83,8 +84,8 @@ public class DefaultVascEntryController implements VascEntryControllerLocal {
/**
* @see net.forwardfire.vasc.core.VascEntryControllerLocal#getMasterVascEntryById(java.lang.String)
*/
public VascEntry getMasterVascEntryById(String entryId) {
VascEntry entry = entries.get(entryId);
public VascEntryLocal getMasterVascEntryById(String entryId) {
VascEntryLocal entry = entries.get(entryId);
return entry;
}

View file

@ -22,588 +22,16 @@
package net.forwardfire.vasc.impl;
import java.util.ArrayList;
import java.util.List;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.VascEntryFieldType;
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
import net.forwardfire.vasc.validators.VascValidator;
import net.forwardfire.vasc.core.AbstractVascEntryFieldLocal;
/**
* DefaultVascEntryField
*
* @author Willem Cazander
* @version 1.0 Mar 21, 2007
*/
public class DefaultVascEntryField implements VascEntryField {
public class DefaultVascEntryField extends AbstractVascEntryFieldLocal {
private static final long serialVersionUID = 1L;
private VascEntry vascEntry = null;
private String id = null;
private String backendName = null;
private String displayName = null;
private VascEntryFieldType vascEntryFieldType = null;
private VascEntryFieldValue vascEntryFieldValue = null;
private List<VascValidator> vascValidators = null;
private String name = null;
private String description = null;
private String helpId = null;
private String image = null;
private Integer orderIndex = null;
private Object defaultValue = null;
private Integer sizeList = null;
private Integer sizeEdit = null;
private String styleList = null;
private String styleEdit = null;
private String choices = null;
private Boolean choicesAsRadio = null;
/** Defines if this columns is used in interface list,create,edit **/
private Boolean view = null;
private Boolean optional = null;
/** Defines per view state of this field **/
private Boolean create = null;
private Boolean edit = null;
private Boolean editReadOnly = null;
private Boolean editBlank = null;
private Boolean list = null;
/** Defines the roles stuff if all up is true **/
private String rolesCreate = null;
private String rolesEdit = null;
private String rolesEditReadOnly = null;
private String rolesList = null;
private Boolean sortable = null;
private Boolean sumable = null;
private Boolean graphable = null;
public DefaultVascEntryField() {
vascValidators = new ArrayList<VascValidator>(5);
}
public DefaultVascEntryField(String id) {
this();
setId(id);
}
/**
* @see java.lang.Object#clone()
*/
@Override
public VascEntryField clone() throws CloneNotSupportedException {
DefaultVascEntryField result = new DefaultVascEntryField();
result.id=id;
result.backendName=backendName;
result.displayName=displayName;
result.vascEntryFieldType=vascEntryFieldType;
result.name=name;
result.description=description;
result.helpId=helpId;
result.image=image;
result.defaultValue=defaultValue;
result.orderIndex=orderIndex;
result.sizeList=sizeList;
result.sizeEdit=sizeEdit;
result.styleList=styleList;
result.styleEdit=styleEdit;
result.choices=choices;
result.choicesAsRadio=choicesAsRadio;
result.view=view;
result.optional=optional;
result.create=create;
result.edit=edit;
result.editReadOnly=editReadOnly;
result.editBlank=editBlank;
result.list=list;
result.rolesCreate=rolesCreate;
result.rolesEdit=rolesEdit;
result.rolesEditReadOnly=rolesEditReadOnly;
result.rolesList=rolesList;
result.sortable=sortable;
result.sumable=sumable;
result.graphable=graphable;
// this polls full backend..
//result.vascEntryFieldValue=vascEntryFieldValue;
for (VascValidator val:vascValidators) {
result.vascValidators.add(val.clone());
}
return result;
}
public VascEntry getVascEntry() {
return vascEntry;
}
public void setVascEntry(VascEntry vascEntry) {
this.vascEntry=vascEntry;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the vascEntryFieldType
*/
public VascEntryFieldType getVascEntryFieldType() {
return vascEntryFieldType;
}
/**
* @param vascEntryFieldType the vascEntryFieldType to set
*/
public void setVascEntryFieldType(VascEntryFieldType vascEntryFieldType) {
this.vascEntryFieldType = vascEntryFieldType;
}
/**
* @return the backendName
*/
public String getBackendName() {
return backendName;
}
/**
* @param backendName the backendName to set
*/
public void setBackendName(String backendName) {
this.backendName = backendName;
}
/**
* @return the vascEntryFieldValue
*/
public VascEntryFieldValue getVascEntryFieldValue() {
return vascEntryFieldValue;
}
/**
* @param vascEntryFieldValue the vascEntryFieldValue to set
*/
public void setVascEntryFieldValue(VascEntryFieldValue vascEntryFieldValue) {
this.vascEntryFieldValue = vascEntryFieldValue;
}
/**
* @return the vascValidators
*/
public List<VascValidator> getVascValidators() {
return vascValidators;
}
/**
* @param vascValidators the vascValidators to add
*/
public void addVascValidator(VascValidator vascValidator) {
this.vascValidators.add(vascValidator);
}
/**
* @param vascValidators the vascValidators to remove
*/
public void removeVascValidator(VascValidator vascValidator) {
this.vascValidators.remove(vascValidator);
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the helpId
*/
public String getHelpId() {
return helpId;
}
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId) {
this.helpId = helpId;
}
/**
* @return the image
*/
public String getImage() {
return image;
}
/**
* @param image the image to set
*/
public void setImage(String image) {
this.image = image;
}
/**
* @return the defaultValue
*/
public Object getDefaultValue() {
return defaultValue;
}
/**
* @param defaultValue the defaultValue to set
*/
public void setDefaultValue(Object defaultValue) {
this.defaultValue = defaultValue;
}
/**
* @return the sizeList
*/
public Integer getSizeList() {
return sizeList;
}
/**
* @param sizeList the sizeList to set
*/
public void setSizeList(Integer sizeList) {
this.sizeList = sizeList;
}
/**
* @return the sizeEdit
*/
public Integer getSizeEdit() {
return sizeEdit;
}
/**
* @param sizeEdit the sizeEdit to set
*/
public void setSizeEdit(Integer sizeEdit) {
this.sizeEdit = sizeEdit;
}
/**
* @return the styleList
*/
public String getStyleList() {
return styleList;
}
/**
* @param styleList the styleList to set
*/
public void setStyleList(String styleList) {
this.styleList = styleList;
}
/**
* @return the styleEdit
*/
public String getStyleEdit() {
return styleEdit;
}
/**
* @param styleEdit the styleEdit to set
*/
public void setStyleEdit(String styleEdit) {
this.styleEdit = styleEdit;
}
/**
* @return the choices
*/
public String getChoices() {
return choices;
}
/**
* @param choices the choices to set
*/
public void setChoices(String choices) {
this.choices = choices;
}
/**
* @return the view
*/
public Boolean getView() {
return view;
}
/**
* @param view the view to set
*/
public void setView(Boolean view) {
this.view = view;
}
/**
* @return the optional
*/
public Boolean getOptional() {
return optional;
}
/**
* @param optional the optional to set
*/
public void setOptional(Boolean optional) {
this.optional = optional;
}
/**
* @return the create
*/
public Boolean getCreate() {
return create;
}
/**
* @param create the create to set
*/
public void setCreate(Boolean create) {
this.create = create;
}
/**
* @return the edit
*/
public Boolean getEdit() {
return edit;
}
/**
* @param edit the edit to set
*/
public void setEdit(Boolean edit) {
this.edit = edit;
}
/**
* @return the editReadOnly
*/
public Boolean getEditReadOnly() {
return editReadOnly;
}
/**
* @param editReadOnly the editReadOnly to set
*/
public void setEditReadOnly(Boolean editReadOnly) {
this.editReadOnly = editReadOnly;
}
/**
* @return the list
*/
public Boolean getList() {
return list;
}
/**
* @param list the list to set
*/
public void setList(Boolean list) {
this.list = list;
}
/**
* @return the rolesCreate
*/
public String getRolesCreate() {
return rolesCreate;
}
/**
* @param rolesCreate the rolesCreate to set
*/
public void setRolesCreate(String rolesCreate) {
this.rolesCreate = rolesCreate;
}
/**
* @return the rolesEdit
*/
public String getRolesEdit() {
return rolesEdit;
}
/**
* @param rolesEdit the rolesEdit to set
*/
public void setRolesEdit(String rolesEdit) {
this.rolesEdit = rolesEdit;
}
/**
* @return the rolesEditReadOnly
*/
public String getRolesEditReadOnly() {
return rolesEditReadOnly;
}
/**
* @param rolesEditReadOnly the rolesEditReadOnly to set
*/
public void setRolesEditReadOnly(String rolesEditReadOnly) {
this.rolesEditReadOnly = rolesEditReadOnly;
}
/**
* @return the rolesList
*/
public String getRolesList() {
return rolesList;
}
/**
* @param rolesList the rolesList to set
*/
public void setRolesList(String rolesList) {
this.rolesList = rolesList;
}
/**
* @return the choicesAsRadio
*/
public Boolean getChoicesAsRadio() {
return choicesAsRadio;
}
/**
* @param choicesAsRadio the choicesAsRadio to set
*/
public void setChoicesAsRadio(Boolean choicesAsRadio) {
this.choicesAsRadio = choicesAsRadio;
}
/**
* @return the editBlank
*/
public Boolean getEditBlank() {
return editBlank;
}
/**
* @param editBlank the editBlank to set
*/
public void setEditBlank(Boolean editBlank) {
this.editBlank = editBlank;
}
/**
* @return the displayName
*/
public String getDisplayName() {
return displayName;
}
/**
* @param displayName the displayName to set
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
* @return the orderIndex
*/
public Integer getOrderIndex() {
return orderIndex;
}
/**
* @param orderIndex the orderIndex to set
*/
public void setOrderIndex(Integer orderIndex) {
this.orderIndex = orderIndex;
}
/**
* @return the sortable
*/
public Boolean getSortable() {
return sortable;
}
/**
* @param sortable the sortable to set
*/
public void setSortable(Boolean sortable) {
this.sortable = sortable;
}
/**
* @return the sumable
*/
public Boolean getSumable() {
return sumable;
}
/**
* @param sumable the sumable to set
*/
public void setSumable(Boolean sumable) {
this.sumable = sumable;
}
/**
* @return the graphable
*/
public Boolean getGraphable() {
return graphable;
}
/**
* @param graphable the graphable to set
*/
public void setGraphable(Boolean graphable) {
this.graphable = graphable;
}
private static final long serialVersionUID = -7441813124020844226L;
}

View file

@ -22,202 +22,15 @@
package net.forwardfire.vasc.impl;
import java.util.ArrayList;
import java.util.List;
import net.forwardfire.vasc.core.VascEntryFieldSet;
import net.forwardfire.vasc.core.AbstractVascEntryFieldSetLocal;
/**
* DefaultVascEntryFieldSet
*
* @author Willem Cazander
* @version 1.0 Mar 21, 2007
*/
public class DefaultVascEntryFieldSet implements VascEntryFieldSet {
private String id = null;
private String name = null;
private String description = null;
private String helpId = null;
private String image = null;
public class DefaultVascEntryFieldSet extends AbstractVascEntryFieldSetLocal {
private String styleList = null;
private String styleEdit = null;
private boolean collapsed = false;
private boolean optional = false;
private List<String> vascEntryFieldIds = null;
public DefaultVascEntryFieldSet() {
vascEntryFieldIds = new ArrayList<String>(10);
}
/**
* @see java.lang.Object#clone()
*/
@Override
public VascEntryFieldSet clone() throws CloneNotSupportedException {
DefaultVascEntryFieldSet result = new DefaultVascEntryFieldSet();
result.id=id;
result.name=name;
result.description=description;
result.helpId=helpId;
result.image=image;
result.styleList=styleList;
result.styleEdit=styleEdit;
result.collapsed=collapsed;
result.optional=optional;
result.vascEntryFieldIds.addAll(vascEntryFieldIds);
return result;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the helpId
*/
public String getHelpId() {
return helpId;
}
/**
* @param helpId the helpId to set
*/
public void setHelpId(String helpId) {
this.helpId = helpId;
}
/**
* @return the image
*/
public String getImage() {
return image;
}
/**
* @param image the image to set
*/
public void setImage(String image) {
this.image = image;
}
/**
* @return the styleList
*/
public String getStyleList() {
return styleList;
}
/**
* @param styleList the styleList to set
*/
public void setStyleList(String styleList) {
this.styleList = styleList;
}
/**
* @return the styleEdit
*/
public String getStyleEdit() {
return styleEdit;
}
/**
* @param styleEdit the styleEdit to set
*/
public void setStyleEdit(String styleEdit) {
this.styleEdit = styleEdit;
}
/**
* @return the collapsed
*/
public boolean isCollapsed() {
return collapsed;
}
/**
* @param collapsed the collapsed to set
*/
public void setCollapsed(boolean collapsed) {
this.collapsed = collapsed;
}
/**
* @return the optional
*/
public boolean isOptional() {
return optional;
}
/**
* @param optional the optional to set
*/
public void setOptional(boolean optional) {
this.optional = optional;
}
/**
* @return the vascEntryFieldIds
*/
public List<String> getVascEntryFieldIds() {
return vascEntryFieldIds;
}
/**
* @param vascEntryFieldIds the vascEntryFieldIds to set
*/
public void addVascEntryFieldId(String vascEntryFieldId) {
vascEntryFieldIds.add(vascEntryFieldId);
}
/**
* @param vascEntryFieldIds the vascEntryFieldIds to set
*/
public void removeVascEntryFieldId(String vascEntryFieldId) {
vascEntryFieldIds.remove(vascEntryFieldId);
}
private static final long serialVersionUID = -7205732470572097379L;
}

View file

@ -0,0 +1,36 @@
/*
* 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 net.forwardfire.vasc.core.AbstractVascEntryLinkLocal;
/**
* DefaultVascEntryLink
*
* @author Willem Cazander
* @version 1.0 Oct 27, 2007
*/
public class DefaultVascEntryLink extends AbstractVascEntryLinkLocal {
private static final long serialVersionUID = 3531875301982217410L;
}

View file

@ -0,0 +1,36 @@
/*
* 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 net.forwardfire.vasc.core.AbstractVascEntryListOptionLocal;
/**
* DefaultVascEntryListOption
*
* @author Willem Cazander
* @version 1.0 Jun 3, 2012
*/
public class DefaultVascEntryListOption extends AbstractVascEntryListOptionLocal {
private static final long serialVersionUID = 714184775525590003L;
}

View file

@ -31,6 +31,6 @@ import net.forwardfire.vasc.core.AbstractVascEntryState;
* @version 1.0 Dec 15, 2009
*/
public class DefaultVascEntryState extends AbstractVascEntryState {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = -4795966794621554844L;
}

View file

@ -22,10 +22,6 @@
package net.forwardfire.vasc.impl;
import java.util.Locale;
import java.util.ResourceBundle;
import net.forwardfire.vasc.backend.VascBackend;
import net.forwardfire.vasc.backend.proxy.VascBackendProxyCache;
import net.forwardfire.vasc.backend.proxy.VascBackendProxyEventExecutor;
import net.forwardfire.vasc.backend.proxy.VascBackendProxyFilter;
@ -36,11 +32,10 @@ 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.VascEntryField;
import net.forwardfire.vasc.core.VascEntryLocal;
import net.forwardfire.vasc.core.VascException;
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
import net.forwardfire.vasc.frontend.VascFrontendData;
import net.forwardfire.vasc.impl.entry.DefaultVascEntryResourceResolver;
import net.forwardfire.vasc.core.VascInterfaceKey;
import net.forwardfire.vasc.core.VascInterfaceKeyFrontend;
import net.forwardfire.vasc.impl.entry.VascValidatorsValidatorService;
import net.forwardfire.vasc.impl.entry.config.VascActionsFinalizer;
import net.forwardfire.vasc.impl.entry.config.VascDefaultsFinalizer;
@ -51,6 +46,12 @@ import net.forwardfire.vasc.impl.entry.config.VascIdCheckFinalizer;
import net.forwardfire.vasc.impl.entry.export.VascEntryExporterCsv;
import net.forwardfire.vasc.impl.entry.export.VascEntryExporterXml;
import net.forwardfire.vasc.impl.entry.export.VascEntryExporterXmlTree;
import net.forwardfire.vasc.impl.frontend.DefaultVascFrontendActions;
import net.forwardfire.vasc.impl.frontend.DefaultVascFrontendController;
import net.forwardfire.vasc.impl.frontend.DefaultVascFrontendDataSelector;
import net.forwardfire.vasc.impl.frontend.DefaultVascFrontendPager;
import net.forwardfire.vasc.impl.frontend.DummyVascFrontendUserController;
import net.forwardfire.vasc.impl.frontend.DummyVascFrontendUserSettingController;
import net.forwardfire.vasc.impl.type.DefaultVascEntryFieldTypeController;
/**
@ -62,10 +63,28 @@ import net.forwardfire.vasc.impl.type.DefaultVascEntryFieldTypeController;
public class DefaultVascFactory {
static public VascController getDefaultVascController(Long userId,String userName,String...roles) throws VascException {
static public VascController getDefaultVascController() throws VascException {
// Create
DefaultVascEntryConfigController vascConfig = new DefaultVascEntryConfigController();
vascConfig.putVascInterfaceImplemention(VascInterfaceKey.VASC_ENTRY, DefaultVascEntry.class);
vascConfig.putVascInterfaceImplemention(VascInterfaceKey.VASC_ENTRY_FIELD, DefaultVascEntryField.class);
vascConfig.putVascInterfaceImplemention(VascInterfaceKey.VASC_ENTRY_FIELD_SET, DefaultVascEntryFieldSet.class);
vascConfig.putVascInterfaceImplemention(VascInterfaceKey.VASC_ENTRY_STATE, DefaultVascEntryState.class);
vascConfig.putVascInterfaceImplemention(VascInterfaceKey.VASC_ENTRY_LINK, DefaultVascEntryLink.class);
vascConfig.putVascInterfaceImplemention(VascInterfaceKey.VASC_ENTRY_LIST_OPTION, DefaultVascEntryListOption.class);
vascConfig.putVascInterfaceImplemention(VascInterfaceKey.VASC_BACKEND_STATE, DefaultVascBackendState.class);
vascConfig.putVascInterfaceImplemention(VascInterfaceKey.VASC_FRONTEND_CONTROLLER_LOCAL, DefaultVascFrontendController.class);
vascConfig.putVascInterfaceImplementionFrontend(VascInterfaceKeyFrontend.VASC_FRONTEND_ACTIONS, DefaultVascFrontendActions.class);
vascConfig.putVascInterfaceImplementionFrontend(VascInterfaceKeyFrontend.VASC_FRONTEND_DATA_SELECTOR, DefaultVascFrontendDataSelector.class);
vascConfig.putVascInterfaceImplementionFrontend(VascInterfaceKeyFrontend.VASC_FRONTEND_PAGER, DefaultVascFrontendPager.class);
vascConfig.putVascInterfaceImplementionFrontend(VascInterfaceKeyFrontend.VASC_FRONTEND_USER_CONTROLLER, DummyVascFrontendUserController.class);
vascConfig.putVascInterfaceImplementionFrontend(VascInterfaceKeyFrontend.VASC_FRONTEND_USER_SETTING_CONTROLLER, DummyVascFrontendUserSettingController.class);
// Add all backend proxy in ORDER
vascConfig.addVascBackendProxy(new VascBackendProxyTimerLogger());
vascConfig.addVascBackendProxy(new VascBackendProxyEventExecutor());
@ -88,125 +107,24 @@ public class DefaultVascFactory {
vascConfig.addVascEntryExporter(new VascEntryExporterXml());
vascConfig.addVascEntryExporter(new VascEntryExporterCsv());
// Add per default the internal vasc validator
// Add only the default internal vasc validator.
vascConfig.addVascEntryFieldValidatorService(new VascValidatorsValidatorService());
// Create default controller and fill resolvers.
DefaultVascController c = new DefaultVascController();
c.setVascEntryConfigController(vascConfig);
c.setVascBackendController(new DefaultVascBackendController());
c.setVascEntryController(new DefaultVascEntryController());
c.setVascEntryFieldTypeController(new DefaultVascEntryFieldTypeController());
DefaultVascBackendController vascBackendController = new DefaultVascBackendController();
c.setVascBackendController(vascBackendController);
DefaultVascEntryController vascEntryController = new DefaultVascEntryController();
c.setVascEntryController(vascEntryController);
DefaultVascEntryFieldTypeController vascEntryFieldTypeController = new DefaultVascEntryFieldTypeController();
c.setVascEntryFieldTypeController(vascEntryFieldTypeController);
DefaultVascUserRoleController vascUserRoleController = new DefaultVascUserRoleController(userId,userName,roles);
c.setVascUserRoleController(vascUserRoleController);
// Ready to go
return c;
}
static public VascFrontendData getDefaultVascFrontendData(String resourceBundle,Locale locale) {
ResourceBundle bundle = ResourceBundle.getBundle(resourceBundle, locale);
return getDefaultVascFrontendData(bundle);
}
static public VascFrontendData getDefaultVascFrontendData(ResourceBundle resourceBundle) {
// Create default frontend data obj where controller is set by vasc
DefaultVascFrontendData vascFrontendData = new DefaultVascFrontendData(); //
vascFrontendData.setVascEntryState(new DefaultVascEntryState());
vascFrontendData.getVascEntryState().setVascBackendState(new DefaultVascBackendState());
vascFrontendData.getVascEntryState().getVascBackendState().setPageSize(100);
vascFrontendData.getVascEntryState().getVascBackendState().setPageSizeMax(1000); // max 1k records on screen.
// init resource resultsers
vascFrontendData.setVascEntryResourceResolver(new DefaultVascEntryResourceResolver(resourceBundle));
vascFrontendData.setVascFrontendHelper(new DefaultVascFrontendHelper());
//vascFrontendData.setVascEntryResourceImageResolver(new ImageResources());
vascFrontendData.addVascValidatorService(new VascValidatorsValidatorService());
return vascFrontendData;
}
static public void fillVascControllerLocalEntries(VascEntryControllerLocal c,VascController vascController) throws VascException {
for (String id:c.getVascEntryIds()) {
VascEntry entry = c.getMasterVascEntryById(id);
VascEntryLocal entry = (VascEntryLocal)c.getMasterVascEntryById(id);
vascController.getVascEntryConfigController().configVascEntry(vascController, entry);
}
}
/* MOVED to VascEntryConfigController
/*
DefaultVascEntryResourceResolver t = new DefaultVascEntryResourceResolver(resourceBundle);
if (t.getTextValue(entry.getEditDescription()).equals(entry.getEditDescription())) {
entry.setEditDescription("generic.editDescription");
}
if (t.getTextValue(entry.getDeleteDescription()).equals(entry.getDeleteDescription())) {
entry.setDeleteDescription("generic.deleteDescription");
}
if (t.getTextValue(entry.getCreateDescription()).equals(entry.getCreateDescription())) {
entry.setCreateDescription("generic.createDescription");
}
*/
/*
for (String key:entry.getEntryParameterKeys()) {
Object value = entry.getEntryParameter(key);
if (value instanceof String==false) {
continue;
}
String paraValue = (String)value;
if (paraValue.startsWith("userPara")==false) {
continue;
}
String[] ps = paraValue.split(":");
String type = ps[1];
String paraTypeValue = ps[2];
SetParameterBackendListener listener = new SetParameterBackendListener(vui.userId,vui.username);
listener.setName(key);
listener.setType(type);
listener.setValue(paraTypeValue);
entry.getVa
}
// hackje om deze manuale actions van i18n keys te voorzien;
// this is temp untill x4o templaing
DefaultVascBackedEntryFinalizer f = new DefaultVascBackedEntryFinalizer();
f.finalizeVascEntry(entry, con);
// execute backend event listeners NOTE: moved to default factory fillings
// VascBackend vb = c.getVascBackendController().getVascBackendById(entry.getBackendId());
// vb = new VascBackendProxyEventExecutor(vb,entry);
// ((VascBackendControllerLocal)c.getVascBackendController()).addVascBackend(vb);
}
}
*/
static public void fillVascEntryFrontend(VascEntry entry,VascController vascController,VascFrontendData frontendData) throws VascException {
frontendData.setVascController(vascController);
entry.setVascFrontendData(frontendData);
VascBackend backend = vascController.getVascEntryConfigController().configVascBackendProxied(vascController, entry);
frontendData.getVascEntryState().setVascBackend(backend);
frontendData.getVascEntryState().setVascEntry(entry);
for (VascEntryField field:entry.getVascEntryFields()) {
if (field.getVascEntryFieldValue()==null) {
VascEntryFieldValue v = backend.provideVascEntryFieldValue(field);
field.setVascEntryFieldValue(v);
}
}
frontendData.setVascFrontendPager(new DefaultVascFrontendPager(entry));
frontendData.setVascFrontendActions(new DefaultVascFrontendActions(entry));
}
}

View file

@ -0,0 +1,155 @@
/*
* 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 net.forwardfire.vasc.backend.VascBackendState;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryConfigControllerLocal;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.VascEntryFieldSet;
import net.forwardfire.vasc.core.VascEntryLink;
import net.forwardfire.vasc.core.VascEntryListOption;
import net.forwardfire.vasc.core.VascEntryState;
import net.forwardfire.vasc.core.VascInterfaceKey;
import net.forwardfire.vasc.core.VascInterfaceKeyFrontend;
import net.forwardfire.vasc.core.VascInterfaceLoader;
import net.forwardfire.vasc.frontend.VascFrontendActions;
import net.forwardfire.vasc.frontend.VascFrontendControllerLocal;
import net.forwardfire.vasc.frontend.VascFrontendDataSelector;
import net.forwardfire.vasc.frontend.VascFrontendPager;
import net.forwardfire.vasc.frontend.VascFrontendUserController;
import net.forwardfire.vasc.frontend.VascFrontendUserSettingController;
/**
* DefaultVascInterfaceLoader is auto caster.
*
* @author Willem Cazander
* @version 1.0 May 9, 2012
*/
public class DefaultVascInterfaceLoader implements VascInterfaceLoader {
private VascEntryConfigControllerLocal localConfig = null;
public DefaultVascInterfaceLoader(VascEntryConfigControllerLocal localConfig) {
this.localConfig=localConfig;
}
private Object createImpl(VascInterfaceKey key) {
return localConfig.createVascInterfaceImplemention(key);
}
private Object createImpl(VascInterfaceKeyFrontend key,VascEntry entry) {
return localConfig.createVascInterfaceImplementionFrontend(key,entry);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascEntryImpl()
*/
public VascEntry createVascEntryImpl() {
return (VascEntry)createImpl(VascInterfaceKey.VASC_ENTRY);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascEntryFieldImpl()
*/
public VascEntryField createVascEntryFieldImpl() {
return (VascEntryField)createImpl(VascInterfaceKey.VASC_ENTRY_FIELD);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascEntryStateImpl()
*/
public VascEntryState createVascEntryStateImpl() {
return (VascEntryState)createImpl(VascInterfaceKey.VASC_ENTRY_STATE);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascEntryFieldSetImpl()
*/
public VascEntryFieldSet createVascEntryFieldSetImpl() {
return (VascEntryFieldSet)createImpl(VascInterfaceKey.VASC_ENTRY_FIELD_SET);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascEntryLinkImpl()
*/
public VascEntryLink createVascEntryLinkImpl() {
return (VascEntryLink)createImpl(VascInterfaceKey.VASC_ENTRY_LINK);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascEntryListOptionImpl()
*/
public VascEntryListOption createVascEntryListOptionImpl() {
return (VascEntryListOption)createImpl(VascInterfaceKey.VASC_ENTRY_LIST_OPTION);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascBackendStateImpl()
*/
public VascBackendState createVascBackendStateImpl() {
return (VascBackendState)createImpl(VascInterfaceKey.VASC_BACKEND_STATE);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascFrontendControllerLocalImpl()
*/
public VascFrontendControllerLocal createVascFrontendControllerLocalImpl() {
return (VascFrontendControllerLocal)createImpl(VascInterfaceKey.VASC_FRONTEND_CONTROLLER_LOCAL);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascFrontendPagerImpl()
*/
public VascFrontendPager createVascFrontendPagerImpl(VascEntry entry) {
return (VascFrontendPager)createImpl(VascInterfaceKeyFrontend.VASC_FRONTEND_PAGER,entry);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascFrontendActionsImpl()
*/
public VascFrontendActions createVascFrontendActionsImpl(VascEntry entry) {
return (VascFrontendActions)createImpl(VascInterfaceKeyFrontend.VASC_FRONTEND_ACTIONS,entry);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascFrontendDataSelectorImpl()
*/
public VascFrontendDataSelector createVascFrontendDataSelectorImpl(VascEntry entry) {
return (VascFrontendDataSelector)createImpl(VascInterfaceKeyFrontend.VASC_FRONTEND_DATA_SELECTOR,entry);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascFrontendUserControllerImpl()
*/
public VascFrontendUserController createVascFrontendUserControllerImpl(VascEntry entry) {
return (VascFrontendUserController)createImpl(VascInterfaceKeyFrontend.VASC_FRONTEND_USER_CONTROLLER,entry);
}
/**
* @see net.forwardfire.vasc.core.VascInterfaceLoader#createVascFrontendUserSettingControllerImpl()
*/
public VascFrontendUserSettingController createVascFrontendUserSettingControllerImpl(VascEntry entry) {
return (VascFrontendUserSettingController)createImpl(VascInterfaceKeyFrontend.VASC_FRONTEND_USER_SETTING_CONTROLLER,entry);
}
}

View file

@ -23,19 +23,17 @@
package net.forwardfire.vasc.impl.actions;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.actions.AbstractVascAction;
import net.forwardfire.vasc.core.actions.RowVascAction;
import net.forwardfire.vasc.core.actions.AbstractVascRowActionLocal;
/**
* AddRowAction
*
* @author Willem Cazander
* @version 1.0 Mar 30, 2007
*/
public class AddRowAction extends AbstractVascAction implements RowVascAction {
public class AddRowAction extends AbstractVascRowActionLocal {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 3400966729022979875L;
static public final String ACTION_ID = "addRowAction";
protected String getActionId() {
@ -44,10 +42,10 @@ public class AddRowAction extends AbstractVascAction implements RowVascAction {
public void doRowAction(VascEntry entry,Object rowObject) throws Exception {
entry.getVascFrontendData().getVascEntryState().setEditCreate(true);
Object object = entry.getVascFrontendData().getVascFrontendActions().createObject();
entry.getVascFrontendData().getVascEntryState().setEntryDataObject(object);
entry.getVascFrontendData().getVascFrontend().renderEdit();
entry.getVascFrontendController().getVascEntryState().setEditCreate(true);
Object object = entry.getVascFrontendController().getVascFrontendActions().createObject();
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(object);
entry.getVascFrontendController().getVascFrontend().renderEdit();
}
/**

View file

@ -23,19 +23,17 @@
package net.forwardfire.vasc.impl.actions;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.actions.AbstractVascAction;
import net.forwardfire.vasc.core.actions.RowVascAction;
import net.forwardfire.vasc.core.actions.AbstractVascRowActionLocal;
/**
* DeleteRowAction
*
* @author Willem Cazander
* @version 1.0 Mar 30, 2007
*/
public class DeleteRowAction extends AbstractVascAction implements RowVascAction {
public class DeleteRowAction extends AbstractVascRowActionLocal {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1162940569489964980L;
static public final String ACTION_ID = "deleteRowAction";
protected String getActionId() {
@ -46,8 +44,8 @@ public class DeleteRowAction extends AbstractVascAction implements RowVascAction
if (rowObject==null) {
return; // nothing selected
}
entry.getVascFrontendData().getVascEntryState().setEntryDataObject(rowObject);
entry.getVascFrontendData().getVascFrontend().renderDelete();
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(rowObject);
entry.getVascFrontendController().getVascFrontend().renderDelete();
}
/**

View file

@ -23,20 +23,18 @@
package net.forwardfire.vasc.impl.actions;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.actions.AbstractVascAction;
import net.forwardfire.vasc.core.actions.RowVascAction;
import net.forwardfire.vasc.core.actions.AbstractVascRowActionLocal;
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener.VascFrontendEventType;
/**
* EditRowAction
*
* @author Willem Cazander
* @version 1.0 Mar 30, 2007
*/
public class EditRowAction extends AbstractVascAction implements RowVascAction {
public class EditRowAction extends AbstractVascRowActionLocal {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 8159548546452740185L;
static public final String ACTION_ID = "editRowAction";
protected String getActionId() {
@ -48,10 +46,10 @@ public class EditRowAction extends AbstractVascAction implements RowVascAction {
if (rowObject==null) {
return; // nothing selected
}
entry.getVascFrontendData().getVascEntryState().setEditCreate(false);
entry.getVascFrontendData().fireVascFrontendEvent(entry, VascFrontendEventType.SELECT, rowObject);
entry.getVascFrontendData().getVascEntryState().setEntryDataObject(rowObject);
entry.getVascFrontendData().getVascFrontend().renderEdit();
entry.getVascFrontendController().getVascEntryState().setEditCreate(false);
entry.getVascFrontendController().fireVascFrontendEvent(entry, VascFrontendEventType.SELECT, rowObject);
entry.getVascFrontendController().getVascEntryState().setEntryDataObject(rowObject);
entry.getVascFrontendController().getVascFrontend().renderEdit();
}

Some files were not shown because too many files have changed in this diff Show more