public class FieldProcessorRegistry extends Object
| Constructor and Description |
|---|
FieldProcessorRegistry() |
| Modifier and Type | Method and Description |
|---|---|
Field |
buildField(String fieldName,
FormCreationData data)
Attempts to build a
Field. |
FieldProcessor |
get(String key)
Returns the
FieldProcessor that was registered witht he specified key. |
protected FieldProcessor |
getFieldProcessor(String fieldName)
Returns a FieldProcessor for the given field name.
|
protected String |
getKey(String fieldName)
Derives the key used to look up the
FieldProcessor from the fieldName. |
void |
register(String key,
FieldProcessor processor)
Registers a
FieldProcessor with this registry using the specified key. |
void |
setDefaultProcessor(FieldProcessor defaultProcessor)
Sets the default field processor instance.
|
protected boolean |
useDefaultProcessor(String fieldName)
Determines if the defaultProcessor should be used.
|
public void register(String key, FieldProcessor processor)
FieldProcessor with this registry using the specified key.key - Stringprocessor - FieldProcessorpublic FieldProcessor get(String key)
FieldProcessor that was registered witht he specified key.key - Stringpublic Field buildField(String fieldName, FormCreationData data)
Field. The method first tries to derive a key from the fieldname, then uses this key to look up a FieldProcessor.
This FieldProcessor is then used to generate a Field.fieldName - the name of the field to be created.data - A data object used by the FieldProcessor to build the Field.Field or null.protected FieldProcessor getFieldProcessor(String fieldName)
fieldName - Stringprotected boolean useDefaultProcessor(String fieldName)
fieldName - Stringtrue if the defaultProcessor should be used, otherwise false.protected String getKey(String fieldName)
FieldProcessor from the fieldName.fieldName - StringFieldProcessor.public void setDefaultProcessor(FieldProcessor defaultProcessor)
defaultProcessor - the defaultProcessor to setCopyright © 2005–2018 Alfresco Software. All rights reserved.