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 String |
EXECUTOR_NAME |
protected List<String> |
stringTaggingSeparators |
actionDefinition, applicableTypes, publicAction
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionService
name
PARAM_RESULT
Constructor and Description |
---|
ContentMetadataExtracter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addParameterDefinitions(List<ParameterDefinition> 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,
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 |
setStringTaggingSeparators(List<String> stringTaggingSeparators)
List of string separators - note: all will be applied to a given string
|
void |
setTaggingService(TaggingService taggingService) |
protected List<String> |
splitTag(String str) |
createActionDefinition, execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, isApplicableType, onLogException, setApplicableTypes, setBaseNodeService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
setBeanName
public static final 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.public void setStringTaggingSeparators(List<String> stringTaggingSeparators)
stringTaggingSeparators
- protected void addTags(org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef, org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef, 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 nodeActionExecuter.execute(Action,
NodeRef)
protected void addParameterDefinitions(List<ParameterDefinition> arg0)
ParameterizedItemAbstractBase
addParameterDefinitions
in class ParameterizedItemAbstractBase
arg0
- the parameter definitions listCopyright © 2005–2017 Alfresco Software. All rights reserved.