public class ContentMetadataExtracter extends ActionExecuterAbstractBase
Currently, the default overwrite policy for each extracter is used. (TODO: Add overwrite policy as a parameter.)
MetadataExtracter.OverwritePolicy
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXECUTOR_NAME |
actionDefinition, applicableTypes, publicAction
DISPLAY_LABEL, runtimeActionService
name
PARAM_RESULT
Constructor and Description |
---|
ContentMetadataExtracter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addParameterDefinitions(java.util.List arg0)
Adds the parameter definitions to the list
|
protected void |
addTags(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef,
org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef,
java.io.Serializable rawValue)
Iterates the values of the taggable property which the metadata
extractor should have already attempted to convert values to
NodeRef s. |
void |
executeImpl(Action ruleAction,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Execute the action implementation
|
void |
setCarryAspectProperties(boolean carryAspectProperties)
Whether or not aspect-related properties must be carried to the new version of the node
|
void |
setContentService(ContentService contentService) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictService)
Set the dictionary service
|
void |
setEnableStringTagging(boolean enableStringTagging)
Whether or not to enable mapping of simple strings to cm:taggable tags
|
void |
setMetadataExtracterRegistry(MetadataExtracterRegistry metadataExtracterRegistry) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setTaggingService(TaggingService taggingService) |
createActionDefinition, execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, isApplicableType, setApplicableTypes, setBaseNodeService, setIgnoreLock, setLockService, setPublicAction, setQueueName, setTrackStatus
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getParamDisplayLabel, getParameterDefintions, getTitleKey, setRuntimeActionService, toString
setBeanName
public static final java.lang.String EXECUTOR_NAME
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- the node servicepublic void setContentService(ContentService contentService)
contentService
- The contentService to set.public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictService)
ActionExecuterAbstractBase
setDictionaryService
in class ActionExecuterAbstractBase
dictService
- The DictionaryService to set.public void setTaggingService(TaggingService taggingService)
taggingService
- The TaggingService to set.public void setMetadataExtracterRegistry(MetadataExtracterRegistry metadataExtracterRegistry)
metadataExtracterRegistry
- The metadataExtracterRegistry to set.public void setCarryAspectProperties(boolean carryAspectProperties)
carryAspectProperties
- true (default) to carry all aspect-linked
properties forward. false will clean the
aspect of any unextracted values.public void setEnableStringTagging(boolean enableStringTagging)
enableStringTagging
- true find or create tags for each string
mapped to cm:taggable. false (default)
ignore mapping strings to tags.protected void addTags(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef, java.io.Serializable rawValue)
NodeRef
s.
If conversion by the metadata extracter failed due to a MalformedNodeRefException the taggable property should still contain raw string values.
Mixing of NodeRefs and string values is permitted so each raw value is
checked for a valid NodeRef representation and if so, converts to a NodeRef,
if not, adds as a tag via the TaggingService
.
actionedUponNodeRef
- The NodeRef being actioned uponpropertyDef
- the PropertyDefinition of the taggable propertyrawValue
- the raw value from the metadata extracterpublic void executeImpl(Action ruleAction, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
ActionExecuterAbstractBase
executeImpl
in class ActionExecuterAbstractBase
ruleAction
- the actionactionedUponNodeRef
- the actioned upon nodeorg.alfresco.repo.action.executer.ActionExecuter#execute(org.alfresco.service.cmr.repository.NodeRef,
NodeRef)
protected void addParameterDefinitions(java.util.List arg0)
ParameterizedItemAbstractBase
addParameterDefinitions
in class ParameterizedItemAbstractBase
arg0
- the parameter definitions listCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.