public static void registerCustomFormItem(String key, DataSourceFieldFactory fieldType, FormItemFactory editorType,
			List<Validator> validators) {
		if (key == null || fieldType == null || editorType == null) {
			throw new IllegalArgumentException("Cannot provide null values when registering new form items.");
		}

		DATA_SOURCE_FIELDS.put(key, fieldType);
		FORM_ITEMS.put(key, editorType);
		FIELD_VALIDATORS.put(key, null == validators ? new ArrayList<Validator>() : validators);
	}
public static void registerCustomFormItem ( String key , DataSourceFieldFactory fieldType , FormItemFactory editorType , List < Validator > validators ) { if ( key == null || fieldType == null || editorType == null ) { throw new IllegalArgumentException ( "Cannot provide null values when registering new form items." ) ; } DATA_SOURCE_FIELDS . put ( key , fieldType ) ; FORM_ITEMS . put ( key , editorType ) ; FIELD_VALIDATORS . put ( key , null == validators ? new ArrayList < Validator > ( ) : validators ) ; }
<p>
Register a new type of {@link FormItem} and {@link DataSourceField} for a certain kind of attribute or key. If
there already was a definition registered for the given key, than it will be replaced by the new one. For all
known attribute types (integer, string, date, url, float, many-to-one, ...) there are default definitions within
this registry. New types can be added or these existing types can be overwritten, that's up to you.
</p>
<p>
In order to use completely new custom defined form item types, you can always define the
<code>formInputType</code> in the attribute definitions of the vector layers, and then register a form item with
the same key here in this factory.
</p>

@param key The key associated with the given {@link FormItemFactory} and {@link DataSourceFieldFactory}. This key
is either the name of an attribute type (i.e. <code>PrimitiveType.DATE.name()</code>) to overwrite the
default definitions, or a completely new type which can be configured in the attribute definitions with
the <code>formInputType</code> field.
@param fieldType The type of {@link DataSourceFieldFactory} associated with the given key. This factory will
create the correct {@link DataSourceField} for the given key.
@param editorType The type of {@link FormItemFactory} associated with the given key. This factory will create the
correct {@link FormItem} for the given key.
@param validators A list of validators that can be applied to the {@link DataSourceField}. This is optional and
can be null. These validators protect the data, and can for example make sure that a user does not use any
letters while filling an integer type field.