Class TypeFormProcessor
java.lang.Object
org.alfresco.repo.forms.processor.AbstractFormProcessor
org.alfresco.repo.forms.processor.FilteredFormProcessor<ItemType,PersistType>
org.alfresco.repo.forms.processor.node.ContentModelFormProcessor<TypeDefinition,NodeRef>
org.alfresco.repo.forms.processor.node.TypeFormProcessor
- All Implemented Interfaces:
FormProcessor
FormProcessor implementation that can generate and persist Form objects for types in the Alfresco content model.
- Author:
- Gavin Cornwell, Nick Smith, 3.4
-
Field Summary
FieldsFields inherited from class org.alfresco.repo.forms.processor.node.ContentModelFormProcessor
associationNamePattern, contentService, dictionaryService, fileFolderService, namespaceService, nodeService, permissionService, propertyNamePattern, transientPropertyPatternFields inherited from class org.alfresco.repo.forms.processor.FilteredFormProcessor
fieldProcessorRegistry, filterRegistryFields inherited from class org.alfresco.repo.forms.processor.AbstractFormProcessor
active, DESTINATION, matchPattern, patternMatcher, processorRegistry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NodeRefcreateNode(TypeDefinition typeDef, FormData data) Creates a new instance of the given type.protected Map<QName,Serializable> protected TypeDefinitiongetBaseType(TypeDefinition type) protected StringgetItemType(TypeDefinition item) Returns aStringdescribing the type fo the specified item.protected StringgetItemURI(TypeDefinition item) Returns the URI location of the specified item.protected org.apache.commons.logging.LogRetrieves a logger instance to log to.protected Map<QName,Serializable> protected TypeDefinitiongetTypedItem(Item item) Returns a typed Object representing the given item.protected NodeRefinternalPersist(TypeDefinition item, FormData data) Persists the form data.Methods inherited from class org.alfresco.repo.forms.processor.node.ContentModelFormProcessor
addPropertyDataIfRequired, determineDefaultMimetype, generateDefaultFields, getAspectNames, getDefaultIgnoredFields, makeItemData, persistNode, processAssociationPersist, processContentPropertyPersist, processEncodingPropertyPersist, processMimetypePropertyPersist, processNamePropertyPersist, processPropertyPersist, setContentService, setDictionaryService, setFileFolderService, setNamespaceService, setNodeService, setPermissionServiceMethods inherited from class org.alfresco.repo.forms.processor.FilteredFormProcessor
generate, generateSelectedFields, internalGenerate, persist, populateForm, setFieldProcessorRegistry, setFilterRegistry, setIgnoredFieldsMethods inherited from class org.alfresco.repo.forms.processor.AbstractFormProcessor
isActive, isApplicable, register, setActive, setFormItemType, setFormItemUrl, setMatchPattern, setProcessorRegistry, toString
-
Field Details
-
NAME_PROP_DATA
- See Also:
-
-
Constructor Details
-
TypeFormProcessor
public TypeFormProcessor()
-
-
Method Details
-
getLogger
protected org.apache.commons.logging.Log getLogger()Description copied from class:FilteredFormProcessorRetrieves a logger instance to log to.- Specified by:
getLoggerin classFilteredFormProcessor<TypeDefinition,NodeRef> - Returns:
- Log instance to log to.
-
getTypedItem
Description copied from class:FilteredFormProcessorReturns a typed Object representing the given item.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.
- Specified by:
getTypedItemin classFilteredFormProcessor<TypeDefinition,NodeRef> - Parameters:
item- The item to get a typed object for- Returns:
- The typed object
-
internalPersist
Description copied from class:FilteredFormProcessorPersists the form data.- Specified by:
internalPersistin classFilteredFormProcessor<TypeDefinition,NodeRef> - Parameters:
item- The object to persist the form fordata- The data to persist- Returns:
- The object that got created or modified
-
createNode
Creates a new instance of the given type.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.
- Parameters:
typeDef- The type defintion of the type to createdata- The form data- Returns:
- NodeRef representing the newly created node
-
getItemType
Description copied from class:FilteredFormProcessorReturns aStringdescribing the type fo the specified item.- Specified by:
getItemTypein classFilteredFormProcessor<TypeDefinition,NodeRef> - Parameters:
item- ItemType- Returns:
- String
-
getItemURI
Description copied from class:FilteredFormProcessorReturns the URI location of the specified item.- Specified by:
getItemURIin classFilteredFormProcessor<TypeDefinition,NodeRef> - Parameters:
item- ItemType- Returns:
- String
-
getBaseType
- Specified by:
getBaseTypein classContentModelFormProcessor<TypeDefinition,NodeRef>
-
getAssociationValues
- Specified by:
getAssociationValuesin classContentModelFormProcessor<TypeDefinition,NodeRef>
-
getPropertyValues
- Specified by:
getPropertyValuesin classContentModelFormProcessor<TypeDefinition,NodeRef>
-
getTransientValues
- Specified by:
getTransientValuesin classContentModelFormProcessor<TypeDefinition,NodeRef>
-