|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.forms.processor.FieldProcessorRegistry
public class FieldProcessorRegistry
Holds a FieldProcessor implementation for the fields that can be processed by the FormProcessor.
Constructor Summary | |
---|---|
FieldProcessorRegistry()
|
Method Summary | |
---|---|
Field |
buildField(java.lang.String fieldName,
FormCreationData data)
Attempts to build a Field . |
FieldProcessor |
get(java.lang.String key)
Returns the FieldProcessor that was registered witht he specified key. |
protected FieldProcessor |
getFieldProcessor(java.lang.String fieldName)
Returns a FieldProcessor for the given field name. |
protected java.lang.String |
getKey(java.lang.String fieldName)
Derives the key used to look up the FieldProcessor from the fieldName. |
void |
register(java.lang.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(java.lang.String fieldName)
Determines if the defaultProcessor should be used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FieldProcessorRegistry()
Method Detail |
---|
public void register(java.lang.String key, FieldProcessor processor)
FieldProcessor
with this registry using the specified key.
key
- processor
- public FieldProcessor get(java.lang.String key)
FieldProcessor
that was registered witht he specified key.
key
-
public Field buildField(java.lang.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(java.lang.String fieldName)
fieldName
-
protected boolean useDefaultProcessor(java.lang.String fieldName)
fieldName
-
true
if the defaultProcessor should be used, otherwise false
.protected java.lang.String getKey(java.lang.String fieldName)
FieldProcessor
from the fieldName.
fieldName
-
FieldProcessor
.public void setDefaultProcessor(FieldProcessor defaultProcessor)
defaultProcessor
- the defaultProcessor to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |