Class NodeFormProcessor
java.lang.Object
org.alfresco.repo.forms.processor.AbstractFormProcessor
org.alfresco.repo.forms.processor.FilteredFormProcessor<ItemType,PersistType>
org.alfresco.repo.forms.processor.node.ContentModelFormProcessor<NodeRef,NodeRef>
org.alfresco.repo.forms.processor.node.NodeFormProcessor
- All Implemented Interfaces:
FormProcessor
FormProcessor implementation that can generate and persist Form objects for
repository nodes.
- Author:
- Gavin Cornwell, Nick Smith
-
Field Summary
Fields 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 TypeMethodDescriptiongetAspectNames(NodeRef nodeRef) protected Map<QName,Serializable> getAssociationValues(NodeRef item) protected TypeDefinitiongetBaseType(NodeRef nodeRef) protected StringgetItemType(NodeRef item) Returns aStringdescribing the type fo the specified item.protected StringgetItemURI(NodeRef 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> getPropertyValues(NodeRef nodeRef) getTransientValues(NodeRef item) protected NodeRefgetTypedItem(Item item) Returns a typed Object representing the given item.protected voidinternalGenerate(NodeRef item, List<String> fields, List<String> forcedFields, Form form, Map<String, Object> context) Generates the form.protected NodeRefinternalPersist(NodeRef item, FormData data) Persists the form data.protected voidprocessWorkingCopy(NodeRef nodeRef, Form form) Determines whether the given node represents a working copy, if it does the name field is searched for and set to protected as the name field should not be edited for a working copy.Methods inherited from class org.alfresco.repo.forms.processor.node.ContentModelFormProcessor
addPropertyDataIfRequired, determineDefaultMimetype, generateDefaultFields, 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, persist, populateForm, setFieldProcessorRegistry, setFilterRegistry, setIgnoredFieldsMethods inherited from class org.alfresco.repo.forms.processor.AbstractFormProcessor
isActive, isApplicable, register, setActive, setFormItemType, setFormItemUrl, setMatchPattern, setProcessorRegistry, toString
-
Constructor Details
-
NodeFormProcessor
public NodeFormProcessor()
-
-
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<NodeRef,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<NodeRef,NodeRef> - Parameters:
item- The item to get a typed object for- Returns:
- The typed object
-
getItemType
Description copied from class:FilteredFormProcessorReturns aStringdescribing the type fo the specified item.- Specified by:
getItemTypein classFilteredFormProcessor<NodeRef,NodeRef> - Parameters:
item- ItemType- Returns:
- String
-
getItemURI
Description copied from class:FilteredFormProcessorReturns the URI location of the specified item.- Specified by:
getItemURIin classFilteredFormProcessor<NodeRef,NodeRef> - Parameters:
item- ItemType- Returns:
- String
-
getPropertyValues
- Specified by:
getPropertyValuesin classContentModelFormProcessor<NodeRef,NodeRef>
-
getAssociationValues
- Specified by:
getAssociationValuesin classContentModelFormProcessor<NodeRef,NodeRef>
-
getTransientValues
- Specified by:
getTransientValuesin classContentModelFormProcessor<NodeRef,NodeRef>
-
getAspectNames
- Overrides:
getAspectNamesin classContentModelFormProcessor<NodeRef,NodeRef>
-
getBaseType
- Specified by:
getBaseTypein classContentModelFormProcessor<NodeRef,NodeRef>
-
processWorkingCopy
Determines whether the given node represents a working copy, if it does the name field is searched for and set to protected as the name field should not be edited for a working copy. If the node is not a working copy this method has no effect.- Parameters:
nodeRef- NodeRef of node to check and potentially processform- The generated form
-
internalGenerate
protected void internalGenerate(NodeRef item, List<String> fields, List<String> forcedFields, Form form, Map<String, Object> context) Description copied from class:FilteredFormProcessorGenerates the form.- Overrides:
internalGeneratein classFilteredFormProcessor<NodeRef,NodeRef> - Parameters:
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 form
-
internalPersist
Description copied from class:FilteredFormProcessorPersists the form data.- Specified by:
internalPersistin classFilteredFormProcessor<NodeRef,NodeRef> - Parameters:
item- The object to persist the form fordata- The data to persist- Returns:
- The object that got created or modified
-