|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.forms.processor.AbstractFormProcessor
org.alfresco.repo.forms.processor.FilteredFormProcessor
org.alfresco.repo.forms.processor.node.ContentModelFormProcessor
org.alfresco.repo.forms.processor.node.TypeFormProcessor
public class TypeFormProcessor
FormProcessor implementation that can generate and persist Form objects for types in the Alfresco content model.
Field Summary | |
---|---|
static java.lang.String |
DESTINATION
|
protected static java.lang.String |
NAME_PROP_DATA
|
Fields inherited from class org.alfresco.repo.forms.processor.node.ContentModelFormProcessor |
---|
ASSOC, ASSOC_DATA_ADDED_SUFFIX, ASSOC_DATA_PREFIX, ASSOC_DATA_REMOVED_SUFFIX, associationNamePattern, contentService, DATA_KEY_SEPARATOR, DEFAULT_CONTENT_MIMETYPE, dictionaryService, fileFolderService, MSG_ENCODING_DESC, MSG_ENCODING_LABEL, MSG_MIMETYPE_DESC, MSG_MIMETYPE_LABEL, MSG_SIZE_DESC, MSG_SIZE_LABEL, namespaceService, nodeService, ON, PROP, PROP_DATA_PREFIX, propertyNamePattern, TRANSIENT_ENCODING, TRANSIENT_MIMETYPE, TRANSIENT_SIZE, transientPropertyPattern |
Fields inherited from class org.alfresco.repo.forms.processor.FilteredFormProcessor |
---|
filterRegistry |
Fields inherited from class org.alfresco.repo.forms.processor.AbstractFormProcessor |
---|
active, matchPattern, patternMatcher, processorRegistry |
Constructor Summary | |
---|---|
TypeFormProcessor()
|
Method Summary | |
---|---|
protected NodeRef |
createNode(TypeDefinition typeDef,
FormData data)
Creates a new instance of the given type. |
protected void |
generateAllAssociationFields(TypeDefinition typeDef,
Form form)
Sets up the field definitions for all the type's associations. |
protected void |
generateAllPropertyFields(TypeDefinition typeDef,
Form form)
Sets up the field definitions for all the type's properties. |
protected void |
generateType(TypeDefinition typeDef,
java.util.List fields,
java.util.List forcedFields,
Form form)
Sets up the Form object for the given NodeRef |
protected org.apache.commons.logging.Log |
getLogger()
Retrieves a logger instance to log to. |
protected TypeDefinition |
getTypedItem(Item item)
Returns a typed Object representing the given item. |
protected void |
internalGenerate(TypeDefinition item,
java.util.List fields,
java.util.List forcedFields,
Form form,
java.util.Map context)
Generates the form. |
protected NodeRef |
internalPersist(TypeDefinition item,
FormData data)
Persists the form data. |
Methods inherited from class org.alfresco.repo.forms.processor.FilteredFormProcessor |
---|
generate, persist, setFilterRegistry |
Methods inherited from class org.alfresco.repo.forms.processor.AbstractFormProcessor |
---|
isActive, isApplicable, register, setActive, setFormItemType, setFormItemUrl, setMatchPattern, setProcessorRegistry, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String NAME_PROP_DATA
public static final java.lang.String DESTINATION
Constructor Detail |
---|
public TypeFormProcessor()
Method Detail |
---|
protected org.apache.commons.logging.Log getLogger()
ContentModelFormProcessor
getLogger
in class ContentModelFormProcessor
protected TypeDefinition getTypedItem(Item item)
FilteredFormProcessor
Subclasses that represent a form type will return a typed object that is then passed to each of it's handlers, the handlers can therefore safely cast the Object to the type they expect.
getTypedItem
in class FilteredFormProcessor
item
- The item to get a typed object for
protected void internalGenerate(TypeDefinition item, java.util.List fields, java.util.List forcedFields, Form form, java.util.Map context)
FilteredFormProcessor
internalGenerate
in class FilteredFormProcessor
item
- The object to generate a form forfields
- Restricted list of fields to includeforcedFields
- List of fields to forcibly includeform
- The form object being generatedcontext
- Map representing optional context that can be used during
retrieval of the formprotected void generateType(TypeDefinition typeDef, java.util.List fields, java.util.List forcedFields, Form form)
nodeRef
- The NodeRef to generate a Form forfields
- Restricted list of fields to includeforcedFields
- List of fields to forcibly includeform
- The Form instance to populateprotected void generateAllPropertyFields(TypeDefinition typeDef, Form form)
typeDef
- The type being setupform
- The Form instance to populateprotected void generateAllAssociationFields(TypeDefinition typeDef, Form form)
typeDef
- The type being setupform
- The Form instance to populateprotected NodeRef internalPersist(TypeDefinition item, FormData data)
FilteredFormProcessor
internalPersist
in class FilteredFormProcessor
item
- The object to persist the form fordata
- The data to persist
protected NodeRef createNode(TypeDefinition typeDef, FormData data)
If the form data has the name property present it is used as the name of the node.
The new node is placed in the location defined by the "destination" data item in the form data (this will usually be a hidden field), this will also be the NodeRef representation of the parent for the new node.
typeDef
- The type defintion of the type to createdata
- The form data
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |