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 header names:
      Thread-Index:          --      imap:threadIndex
      Message-ID:            --      imap:messageId
 
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.
Author:
adavis
  • Constructor Details

    • RFC822MetadataExtracter

      public RFC822MetadataExtracter()
      Deprecated.
  • Method Details

    • setNodeService

      public void setNodeService(NodeService nodeService)
      Deprecated.
    • extractRaw

      protected Map<String,Serializable> extractRaw(ContentReader reader) throws Throwable
      Deprecated.
      Description copied from class: AbstractMappingMetadataExtracter
      Override to provide the raw extracted metadata values. An extracter should extract as many of the available properties as is realistically possible. Even if the default mapping doesn'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:
      extractRaw in class AbstractMappingMetadataExtracter
      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:
    • 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: MetadataExtractorPropertyMappingOverride
      Indicates if the MetadataExtractorPropertyMappingOverride.getExtractMapping(NodeRef) will provide extract properties to override those in the T-Engine.
      Specified by:
      match in interface MetadataExtractorPropertyMappingOverride
      Parameters:
      sourceMimetype - of the node.
      Returns:
      true if there will be override extract properties.
    • getExtractMapping

      public Map<String,Set<String>> getExtractMapping(NodeRef nodeRef)
      Deprecated.
      Description copied from interface: MetadataExtractorPropertyMappingOverride
      Returns the extract mapping to be passed to the T-Engine.
      Specified by:
      getExtractMapping in interface MetadataExtractorPropertyMappingOverride
      Parameters:
      nodeRef - of the node having its metadata extracted.
      Returns:
      the mapping of document properties to system properties