Class QNameFieldProcessor<Type extends ClassAttributeDefinition>
java.lang.Object
org.alfresco.repo.forms.processor.AbstractFieldProcessor<ContentModelItemData<?>>
org.alfresco.repo.forms.processor.node.QNameFieldProcessor<Type>
- Type Parameters:
Type-
- All Implemented Interfaces:
FieldProcessor
- Direct Known Subclasses:
AssociationFieldProcessor,DefaultFieldProcessor,PropertyFieldProcessor
public abstract class QNameFieldProcessor<Type extends ClassAttributeDefinition>
extends AbstractFieldProcessor<ContentModelItemData<?>>
FieldProcessor implementation that handles QName fields.- Since:
- 3.4
- Author:
- Nick Smith
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQNameFieldProcessor(NamespaceService namespaceService, DictionaryService dictionaryService) -
Method Summary
Modifier and TypeMethodDescriptiongenerateField(QName fullName, ContentModelItemData<?> itemData, boolean isForcedField) protected FieldgenerateTypedField(String fieldName, FormCreationData formData, ContentModelItemData<?> typedData) The method which actually creates theField.protected Class<ContentModelItemData<?>>protected QNamegetFullName(String name) protected abstract FieldGroupprotected StringgetPrefixedName(ClassAttributeDefinition attribDef) protected abstract TypegetTypeDefinition(QName fullName, ContentModelItemData<?> itemData, boolean isForcedField) protected abstract ObjectgetValue(QName fullName, ContentModelItemData<?> itemData) protected StringmakeDataKeyForName(String propName, String prefix) protected abstract FieldmakeField(Type typeDef, Object value, FieldGroup group) protected voidpopulateFieldDefinition(Type attribDef, FieldDefinition fieldDef, FieldGroup group, String dataKeyPrefix) Sets several properties on theFieldDefinition, including name, label, description, dataKeyName and whether the field is protected.voidsetDictionaryService(DictionaryService dictionaryService) voidsetNamespaceService(NamespaceService namespaceService) Methods inherited from class org.alfresco.repo.forms.processor.AbstractFieldProcessor
generateField, getLogger, getRegistryKey, setFieldProcessorRegistry
-
Field Details
-
namespaceService
-
dictionaryService
-
-
Constructor Details
-
QNameFieldProcessor
public QNameFieldProcessor() -
QNameFieldProcessor
-
-
Method Details
-
generateTypedField
protected Field generateTypedField(String fieldName, FormCreationData formData, ContentModelItemData<?> typedData) Description copied from class:AbstractFieldProcessorThe method which actually creates theField.- Specified by:
generateTypedFieldin classAbstractFieldProcessor<ContentModelItemData<?>>- Parameters:
fieldName- the name of theFieldto be genereated.formData- TODOtypedData- the data used to create the field.- Returns:
- a
Fieldornull.
-
getFullName
-
getPrefixedName
-
generateField
-
populateFieldDefinition
protected void populateFieldDefinition(Type attribDef, FieldDefinition fieldDef, FieldGroup group, String dataKeyPrefix) Sets several properties on theFieldDefinition, including name, label, description, dataKeyName and whether the field is protected. These values are derived from theattribDefparameter.- Parameters:
attribDef- Used to set the values of name, description, label, dataKeyName and isProtected properties on the returned object.fieldDef- A factory object used to create the FieldDefinition to be returned.group- Used to set the group on the returned FieldDefinition.
-
makeDataKeyForName
-
getExpectedDataType
- Specified by:
getExpectedDataTypein classAbstractFieldProcessor<ContentModelItemData<?>>- Returns:
- the expected
Classof thedataparameter for the methodgenerateField.
-
setNamespaceService
- Parameters:
namespaceService- the namespaceService to set
-
setDictionaryService
- Parameters:
dictionaryService- the dictionaryService to set
-
makeField
-
getGroup
-
getValue
-
getTypeDefinition
protected abstract Type getTypeDefinition(QName fullName, ContentModelItemData<?> itemData, boolean isForcedField)
-