diff --git a/doc/README.txt b/doc/README.txt
index 4baa8cb..2f636af 100644
--- a/doc/README.txt
+++ b/doc/README.txt
@@ -10,9 +10,289 @@ Down load http://www.ehecht.com/eclipse_ve/ve.html (lin_mac version)
Unzip and move the plug ins and features into the plug in and features directory of eclipse.
-
Swing will run by default.
+-- XyReasscan ?
+
+zie tables statline.cbs.nl voor bs asielverzoeken nl
+
+
---- Object tree:
+3 layers
+
+- Data Backend
+ - JPA or Hibernate
+ - Meta Query
+ - LDAP
+ # List via geparametered xql query
+ # Save
+ # Merge
+ # Delete
+ # Create ?
+ FilteringDataSource
+ PagingDataSource
+ FilteringPagingDataSource
+ Ordering
+ Parameter
+
+- Data Source Controller
+ - Data Access Controller
+ # User ACL on data items/columns
+ # Create new entry hooks
+
+- Table Controller
+ - User Settings
+
+
+- Data Frontends
+ - Extjs
+ - Swing
+ - WS
+ - SWT via SwingWT
+ - JSF (met utr plugin)
+
+
+
+- default view field
+- Admin fields and order
+- Admin field groups -> 'collapse
+- List filters auto by type
+- search fields
+
+verbose_name_plural
+The plural name for the object:
+verbose_name_plural = "stories"
+If this isn’t given, Django will use verbose_name + "s"
+
+
+- plural
+- ordering
+- order_with_respect_to
+
+# admin
+- date_hierarchy
+- fields = (
+ (None, {
+ 'fields': ('url', 'title', 'content', 'sites')
+ }),
+ ('Advanced options', {
+ 'classes': 'collapse',
+ 'fields' : ('enable_comments', 'registration_required', 'template_name')
+ 'description' : 'sdf'
+ }),
+ )
+- JS
+- list_display_links
+- list_filter = BooleanField, DateField, DateTimeField or ForeignKey.
+- list_per_page
+- ordering def
+- save_as
+- search_fields
+
+@Entity
+@VascAdmin(list=true,edit=true,create=true,delete=false)
+public class BlogPost {
+
+ @VascPrimaryKey
+ @VascName(key="generic.id.name")
+ @VascDescription(key="generic.id.name")
+ @VascHelpId(key="generic.id.help")
+ @VascImage(key="generid.id.image");
+ Integer id;
+
+ @Column(columnName="title")
+ @VascDisplayName
+ @VascUserRoles(list="(floormanager&sitemanager)|admin" editViewOnly="floormanager" edit="sitemanager|admin")
+ String title;
+
+ @VascEditorType(type="slugField")
+ String slug;
+
+ @VascChoices()
+ @VascDefaultValue(key="")
+ String tags;
+
+ @VascRegex(regex="<(.*)>" key="generic.regex.html.tagsNotAllowed")
+ String content;
+
+ @VascEditorType(type="floatField" hints="max_digits=3,decimal_places=2")
+ @VascFieldOptions
+ @VascColumnWidth(width=130)
+ Float price;
+
+ @VascModelReference
+ @VascDefaultValue
+ @VascObjectNotNull
+ BlogStatus blogStatus;
+
+ @VascEditorType(type="dateField" hints="auto_now=true,auto_now_add=true")
+ @VascDefaultValue(key="new_date")
+ @VascUserRoles(list="admin")
+ Date createdDate
+
+ @VascEventChannel(channel="BlogPost.modifiedDate" create=true)
+ Date modifiedDate
+
+ @VascDateFuture
+ Date publicedDate
+}
+
+
+
+$it['ldap']['user']="uid=admin-sudo,ou=services,dc=m4n,dc=nl";
+$it['ldap']['pass']="adminSudo";
+$it['ldap']['baseDN']="ou=sudoers,dc=m4n,dc=nl";
+$it['ldap']['key']="cn";
+
+$it['columns'][0]['name']="Edit";
+$it['columns'][0]['columnType']="edit";
+$it['columns'][1]['name']="Delete";
+$it['columns'][1]['columnType']="delete";
+$it['columns'][2]['name']="User";
+$it['columns'][2]['attr']="cn";
+$it['columns'][3]['name']="Description";
+$it['columns'][3]['attr']="description";
+$it['columns'][4]['name']="sudoCommand";
+$it['columns'][4]['attr']="sudocommand";
+$it['columns'][4]['columnType']="list";
+$it['columns'][5]['name']="sudoHost";
+$it['columns'][5]['attr']="sudohost";
+$it['columns'][5]['columnType']="list";
+$it['columns'][6]['name']="sudoUser";
+$it['columns'][6]['attr']="sudouser";
+$it['columns'][6]['columnType']="list";
+
+$it['list']['filter']="(&(objectClass=sudoRole))";
+$it['list']['columns']="0,2,6,4,5,1";
+$it['delete']['filter']="cn=%s";
+
+$it['edit']['filter']="(cn=%s)";
+$it['edit']['create_dn_key']="cn=%s";
+$it['edit']['columns_edit']="2,3,4,5,6";
+$it['edit']['columns_edit_readonly']="2";
+$it['edit']['columns_create']="2,3,4,5,6";
+$it['edit']['map']['objectclass'][]="sudoRole";
+$it['edit']['map']['objectclass'][]="top";
+$it['edit']['map']['cn']="\$key";
+$it['edit']['map']['description']="\$formData['description']";
+
+
+ vasc
+
+ admin=true
+ backend=extjs
+ path=/js/extjs/*
+
+
+ vasc
+ /vasc/*
+
+
+
+DefaultVascController r = new D..();
+
+r.set
+
+
+EmployeeDataSource dataSource = new EmployeeDataSource();
+dataSource.setJdbcTemplate(new JdbcTemplate(employeeDataSource()));
+ FilteringPaginator filteringPaginator = new FilteringPaginator(dataSource, EmployeeReportObject.class);
+ JsfCrudAdapter adapter = new JsfCrudAdapter(filteringPaginator, (CrudController)empCrud().getController()){
+ public Serializable getEntity() {
+ Object object = ((Row)getModel().getRowData()).getObject();
+ EmployeeReportObject employeeReportObject = (EmployeeReportObject) object;
+ Employee employee = new Employee();
+ employee.setId(employeeReportObject.getId());
+ return employee;
+ }
+ };
+
+ return adapter;
+
+
+
+EVt;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Table def:
+
+
+
+
+
+
+@SuppressWarnings({ "unchecked", "serial" })
+@Bean(scope = DefaultScopes.SESSION)
+public JsfCrudAdapter empRecordCrud() {
+ EmployeeDataSource dataSource = new EmployeeDataSource();
+ dataSource.setJdbcTemplate(new JdbcTemplate(employeeDataSource()));
+ FilteringPaginator filteringPaginator = new FilteringPaginator(dataSource, EmployeeReportObject.class);
+ JsfCrudAdapter adapter = new JsfCrudAdapter(filteringPaginator, (CrudController)empCrud().getController()){
+ public Serializable getEntity() {
+ Object object = ((Row)getModel().getRowData()).getObject();
+ EmployeeReportObject employeeReportObject = (EmployeeReportObject) object;
+ Employee employee = new Employee();
+ employee.setId(employeeReportObject.getId());
+ return employee;
+ }
+ };
+
+ return adapter;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/idcanet-x4o-bin.jar b/lib/idcanet-x4o-bin.jar
index 1a5c7aa..bb27fcb 100644
Binary files a/lib/idcanet-x4o-bin.jar and b/lib/idcanet-x4o-bin.jar differ
diff --git a/src/META-INF/fieldtype-lang.eld b/src/META-INF/fieldtype-lang.eld
new file mode 100644
index 0000000..235da1e
--- /dev/null
+++ b/src/META-INF/fieldtype-lang.eld
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/META-INF/fieldtype-namespaces.xml b/src/META-INF/fieldtype-namespaces.xml
new file mode 100644
index 0000000..e81ccd1
--- /dev/null
+++ b/src/META-INF/fieldtype-namespaces.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ Vasc namespace for the fieldtype language
+
+ META-INF/fieldtype-lang.eld
+
\ No newline at end of file
diff --git a/src/META-INF/vasc-fields.xml b/src/META-INF/fieldtypes.xml
similarity index 91%
rename from src/META-INF/vasc-fields.xml
rename to src/META-INF/fieldtypes.xml
index adc9931..ae2469a 100644
--- a/src/META-INF/vasc-fields.xml
+++ b/src/META-INF/fieldtypes.xml
@@ -1,15 +1,17 @@
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+-->
+
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/backends/ldap/LdapVascBackend.java b/src/com/idcanet/vasc/backends/ldap/LdapVascBackend.java
index 8370b51..144123f 100644
--- a/src/com/idcanet/vasc/backends/ldap/LdapVascBackend.java
+++ b/src/com/idcanet/vasc/backends/ldap/LdapVascBackend.java
@@ -115,6 +115,7 @@ public class LdapVascBackend extends AbstractVascBackend {
/**
* @see com.idcanet.vasc.core.entry.VascEntryFieldValue#getValue(com.idcanet.vasc.core.VascEntryField, java.lang.Object)
*/
+ @SuppressWarnings("unchecked")
public Object getValue(VascEntryField field, Object record) throws ElementParameterException,ElementParameterNotFoundException {
Map map = (Map)record;
return map.get(field.getBackendName());
@@ -123,6 +124,7 @@ public class LdapVascBackend extends AbstractVascBackend {
/**
* @see com.idcanet.vasc.core.entry.VascEntryFieldValue#setValue(com.idcanet.vasc.core.VascEntryField, java.lang.Object, java.lang.Object)
*/
+ @SuppressWarnings("unchecked")
public void setValue(VascEntryField field, Object record,Object value) throws ElementParameterException,ElementParameterNotFoundException {
Map map = (Map)record;
map.put(field.getBackendName(), value);
diff --git a/src/com/idcanet/vasc/backends/ldap/SimpleLdapConnectionProvider.java b/src/com/idcanet/vasc/backends/ldap/SimpleLdapConnectionProvider.java
index bade087..b353a88 100644
--- a/src/com/idcanet/vasc/backends/ldap/SimpleLdapConnectionProvider.java
+++ b/src/com/idcanet/vasc/backends/ldap/SimpleLdapConnectionProvider.java
@@ -26,11 +26,7 @@
package com.idcanet.vasc.backends.ldap;
-import java.security.Security;
-
import com.novell.ldap.LDAPConnection;
-import com.novell.ldap.LDAPJSSESecureSocketFactory;
-import com.novell.ldap.LDAPSocketFactory;
/**
*
@@ -45,7 +41,6 @@ public class SimpleLdapConnectionProvider implements LdapConnectionProvider {
private int ldapVersion = LDAPConnection.LDAP_V3;
private String bindUser = null;
private String bindPass = null;
-
/**
* @see com.idcanet.vasc.backends.ldap.LdapConnectionProvider#getLdapConnection()
@@ -71,7 +66,6 @@ public class SimpleLdapConnectionProvider implements LdapConnectionProvider {
}
}
-
/**
* @return the ldapHost
*/
diff --git a/src/com/idcanet/vasc/core/AbstractVascEntryFieldType.java b/src/com/idcanet/vasc/core/AbstractVascEntryFieldType.java
new file mode 100644
index 0000000..c36a7a6
--- /dev/null
+++ b/src/com/idcanet/vasc/core/AbstractVascEntryFieldType.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. 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 IDCA 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 IDCA 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.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.idcanet.vasc.core.ui.VascUIComponent;
+import com.idcanet.vasc.validators.VascValidator;
+
+/**
+ *
+ * @author Willem Cazander
+ * @version 1.0 Aug 2, 2007
+ */
+abstract public class AbstractVascEntryFieldType implements VascEntryFieldType {
+
+ private String id = null;
+ private Class> autoFieldClass = null;
+ private ObjectConverter objectConverter = null;
+ private VascUIComponent vascUIComponent = null;
+ private List vascValidators = null;
+ private Map properties = null;
+ private String parentEntryFieldTypeName = null;
+
+ public AbstractVascEntryFieldType() {
+ vascValidators = new ArrayList(4);
+ properties = new HashMap();
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#addVascValidator(com.idcanet.vasc.validators.VascValidator)
+ */
+ public void addVascValidator(VascValidator vascValidator) {
+ vascValidators.add(vascValidator);
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#getAutoFieldClass()
+ */
+ public Class> getAutoFieldClass() {
+ return autoFieldClass;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#getId()
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#getObjectConverter()
+ */
+ public ObjectConverter getObjectConverter() {
+ return objectConverter;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#getParentEntryFieldTypeName()
+ */
+ public String getParentEntryFieldTypeName() {
+ return parentEntryFieldTypeName;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#getProperty(java.lang.String)
+ */
+ public String getProperty(String name) {
+ return properties.get(name);
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#getPropertyNames()
+ */
+ public List getPropertyNames() {
+ return new ArrayList(properties.keySet());
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#getVascUIComponent()
+ */
+ public VascUIComponent getVascUIComponent() {
+ return vascUIComponent;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#getVascValidators()
+ */
+ public List getVascValidators() {
+ return vascValidators;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#removeVascValidator(com.idcanet.vasc.validators.VascValidator)
+ */
+ public void removeVascValidator(VascValidator vascValidator) {
+ vascValidators.remove(vascValidator);
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#setAutoFieldClass(java.lang.Class)
+ */
+ public void setAutoFieldClass(Class> autoFieldClass) {
+ this.autoFieldClass=autoFieldClass;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#setId(java.lang.String)
+ */
+ public void setId(String id) {
+ this.id=id;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#setObjectConverter(com.idcanet.vasc.core.VascEntryFieldType.ObjectConverter)
+ */
+ public void setObjectConverter(ObjectConverter objectConverter) {
+ this.objectConverter=objectConverter;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#setParentEntryFieldTypeName(java.lang.String)
+ */
+ public void setParentEntryFieldTypeName(String parentEntryFieldTypeName) {
+ this.parentEntryFieldTypeName=parentEntryFieldTypeName;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#setProperty(java.lang.String, java.lang.String)
+ */
+ public void setProperty(String name, String value) {
+ properties.put(name, value);
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.VascEntryFieldType#setVascUIComponent(com.idcanet.vasc.core.ui.VascUIComponent)
+ */
+ public void setVascUIComponent(VascUIComponent vascUIComponent) {
+ this.vascUIComponent=vascUIComponent;
+ }
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/VascController.java b/src/com/idcanet/vasc/core/VascController.java
new file mode 100644
index 0000000..f413eeb
--- /dev/null
+++ b/src/com/idcanet/vasc/core/VascController.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2004-2007 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. 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 IDCA 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 IDCA 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.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.core;
+
+
+/**
+ * Resolvs all the resolvers.
+ *
+ * @author Willem Cazander
+ * @version 1.0 Sep 11, 2008
+ */
+public interface VascController {
+
+ /**
+ * @return Returns the VascBackendControllerResolver
+ */
+ public VascBackendControllerResolver getVascBackendControllerResolver();
+
+ /**
+ *
+ * @return Returns the VascEntryControllerResolver
+ */
+ public VascEntryControllerResolver getVascEntryControllerResolver();
+
+ /**
+ *
+ * @return Returns the VascEntryFieldControllerResolver
+ */
+ public VascEntryFieldTypeControllerResolver getVascEntryFieldTypeControllerResolver();
+}
\ No newline at end of file
diff --git a/src/com/idcanet/vasc/core/VascEntry.java b/src/com/idcanet/vasc/core/VascEntry.java
index 8e3d0b3..dd8372e 100644
--- a/src/com/idcanet/vasc/core/VascEntry.java
+++ b/src/com/idcanet/vasc/core/VascEntry.java
@@ -31,7 +31,6 @@ import java.util.List;
import com.idcanet.vasc.core.actions.ColumnVascAction;
import com.idcanet.vasc.core.actions.GlobalVascAction;
import com.idcanet.vasc.core.actions.RowVascAction;
-import com.idcanet.vasc.core.entry.VascEntryResourceResolver;
/**
*
@@ -45,7 +44,7 @@ import com.idcanet.vasc.core.entry.VascEntryResourceResolver;
* @author Willem Cazander
* @version 1.0 Mar 21, 2007
*/
-public interface VascEntry {
+public interface VascEntry extends Cloneable {
/**
* @return the id
@@ -130,22 +129,22 @@ public interface VascEntry {
/**
* @return the primaryKeyField
*/
- public String getPrimaryKeyField();
+ public String getPrimaryKeyFieldId();
/**
* @param primaryKeyField the primaryKeyField to set
*/
- public void setPrimaryKeyField(String primaryKeyField);
+ public void setPrimaryKeyFieldId(String primaryKeyField);
/**
* @return the displayNameField
*/
- public String getDisplayNameField();
+ public String getDisplayNameFieldId();
/**
* @param displayNameField the displayNameField to set
*/
- public void setDisplayNameField(String displayNameField);
+ public void setDisplayNameFieldId(String displayNameField);
/**
* @return the vascAdmimList
@@ -203,85 +202,10 @@ public interface VascEntry {
public void removeVascEntryField(VascEntryField vascField);
/**
- * @return the entryDataList
+ * @return the vascField
*/
- public List