Class RFC822MetadataExtracter
- java.lang.Object
-
- org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter
-
- org.alfresco.repo.content.metadata.RFC822MetadataExtracter
-
- All Implemented Interfaces:
ContentWorker,MetadataEmbedder,MetadataExtracter,MetadataExtractorPropertyMappingOverride,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.context.ApplicationContextAware
@Deprecated public class RFC822MetadataExtracter extends AbstractMappingMetadataExtracter implements MetadataExtractorPropertyMappingOverride
Deprecated.OOTB extractors have being moved to T-Engines. This class originally provided metadata extraction of RFC822 mimetype emails. It will no longer be used for that purpose as that work has been off loaded to a T-Engine via the AsynchronousExtractor. It still exists because the governance services (RM) AMP overrides it to provide alternate property mappings and to filter out some of these properties if the node does not have the "record" or "dod5015record" aspects.We still also have the Default configuration file (RFC822MetadataExtracter.properties) file which contains the default set of properties, which may be manipulated by RM.
messageFrom: -- imap:messageFrom, cm:originator messageTo: -- imap:messageTo messageCc: -- imap:messageCc messageSubject: -- imap:messageSubject, cm:title, cm:description, cm:subjectline messageSent: -- imap:dateSent, cm:sentdate messageReceived: -- imap:dateReceived All
This class now provides an alternative property mapping in the request to the T-Engine. Unlike the previous implementation the filtering of properties takes place before rather than after the extraction. This is done in this class making the code within the org.alfresco.module.org_alfresco_module_rm.email.RFC822MetadataExtracter filterSystemProperties method redundant.header names: Thread-Index: -- imap:threadIndex Message-ID: -- imap:messageId- Author:
- adavis
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.content.metadata.MetadataExtracter
MetadataExtracter.OverwritePolicy
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter
dictionaryService, MEGABYTE_SIZE, NAMESPACE_PROPERTY_PREFIX, PROPERTY_COMPONENT_EMBED, PROPERTY_COMPONENT_EXTRACT, PROPERTY_PREFIX_METADATA
-
-
Constructor Summary
Constructors Constructor Description RFC822MetadataExtracter()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected Map<String,Serializable>extractRaw(ContentReader reader)Deprecated.Override to provide the raw extracted metadata values.Map<String,Set<QName>>getCurrentMapping()Deprecated.Back door for RMMap<String,Set<String>>getExtractMapping(NodeRef nodeRef)Deprecated.Returns the extract mapping to be passed to the T-Engine.booleanmatch(String sourceMimetype)Deprecated.Indicates if theMetadataExtractorPropertyMappingOverride.getExtractMapping(NodeRef)will provide extract properties to override those in the T-Engine.voidsetNodeService(NodeService nodeService)Deprecated.-
Methods inherited from class org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter
checkIsEmbedSupported, checkIsSupported, convertSystemPropertyValues, embed, embed, embedInternal, embedInternal, extract, extract, extract, extract, extract, extractRawInThread, extractRawThreadFinished, filterSystemProperties, getBeanName, getDefaultEmbedMapping, getDefaultMapping, getEmbedMapping, getExecutorService, getLimits, getMapping, getMimetypeService, getSupportedMimetypes, init, isEmbeddingSupported, isEnabled, isSupported, makeDate, mapSystemToRaw, newRawMap, putRawValue, readEmbedMappingProperties, readEmbedMappingProperties, readGlobalEmbedMappingProperties, readGlobalExtractMappingProperties, readMappingProperties, readMappingProperties, register, setApplicationContext, setBeanName, setDictionaryService, setEmbedMapping, setEmbedMappingProperties, setEnableStringTagging, setExecutorService, setFailOnTypeConversion, setInheritDefaultEmbedMapping, setInheritDefaultMapping, setMapping, setMappingProperties, setMimetypeLimits, setMimetypeService, setOverwritePolicy, setProperties, setRegistry, setSupportedDateFormats, setSupportedEmbedMimetypes, setSupportedMimetypes
-
-
-
-
Method Detail
-
setNodeService
public void setNodeService(NodeService nodeService)
Deprecated.
-
extractRaw
protected Map<String,Serializable> extractRaw(ContentReader reader) throws Throwable
Deprecated.Description copied from class:AbstractMappingMetadataExtracterOverride to provide the raw extracted metadata values. An extracter should extract as many of the available properties as is realistically possible. Even if thedefault mappingdoesn't handle all properties, it is possible for each instance of the extracter to be configured differently and more or less of the properties may be used in different installations.Raw values must not be trimmed or removed for any reason. Null values and empty strings are
- Null: Removed
- Empty String: Passed to the OverwritePolicy
- Non Serializable: Converted to String or fails if that is not possible
Properties extracted and their meanings and types should be thoroughly described in the class-level javadocs of the extracter implementation, for example:
editor: - the document editor --> cm:author title: - the document title --> cm:title user1: - the document summary user2: - the document description --> cm:description user3: - user4: -
- Specified by:
extractRawin classAbstractMappingMetadataExtracter- Parameters:
reader- the document to extract the values from. This stream provided by the reader must be closed if accessed directly.- Returns:
- Returns a map of document property values keyed by property name.
- Throws:
Throwable- All exception conditions can be handled.- See Also:
AbstractMappingMetadataExtracter.getDefaultMapping()
-
getCurrentMapping
public final Map<String,Set<QName>> getCurrentMapping()
Deprecated.Back door for RM- Returns:
- Map
-
match
public boolean match(String sourceMimetype)
Deprecated.Description copied from interface:MetadataExtractorPropertyMappingOverrideIndicates if theMetadataExtractorPropertyMappingOverride.getExtractMapping(NodeRef)will provide extract properties to override those in the T-Engine.- Specified by:
matchin interfaceMetadataExtractorPropertyMappingOverride- Parameters:
sourceMimetype- of the node.- Returns:
trueif there will be override extract properties.
-
getExtractMapping
public Map<String,Set<String>> getExtractMapping(NodeRef nodeRef)
Deprecated.Description copied from interface:MetadataExtractorPropertyMappingOverrideReturns the extract mapping to be passed to the T-Engine.- Specified by:
getExtractMappingin interfaceMetadataExtractorPropertyMappingOverride- Parameters:
nodeRef- of the node having its metadata extracted.- Returns:
- the mapping of document properties to system properties
-
-