Interface MetadataEmbedder

All Superinterfaces:
ContentWorker
All Known Implementing Classes:
AbstractMappingMetadataExtracter, AsynchronousExtractor, RFC822MetadataExtracter, XmlMetadataExtracter, XPathMetadataExtracter

@AlfrescoPublicApi public interface MetadataEmbedder extends ContentWorker
Interface for writing metadata properties back into the content file.
Author:
Ray Gauss II
  • Method Details

    • isEmbeddingSupported

      boolean isEmbeddingSupported(String mimetype)
      Determines if the extracter works against the given mimetype.
      Parameters:
      mimetype - the document mimetype
      Returns:
      Returns true if the mimetype is supported, otherwise false.
    • embed

      void embed(Map<QName,Serializable> properties, ContentReader reader, ContentWriter writer) throws ContentIOException
      Embeds the given properties into the file specified by the given content writer. *

      The embedding viability can be determined by an up front call to isEmbeddingSupported(String).

      The source mimetype must be available on the ContentAccessor.getMimetype() method of the writer.

      Parameters:
      properties - the model properties to embed
      reader - the reader for the original source content file
      writer - the writer for the content after metadata has been embedded
      Throws:
      ContentIOException
    • embed

      default void embed(NodeRef nodeRef, Map<QName,Serializable> properties, ContentReader reader, ContentWriter writer) throws ContentIOException
      Identical to embed(Map, ContentReader, ContentWriter) but with the addition of the NodeRef being acted on. By default, the method without the NodeRef is called.
      Parameters:
      nodeRef - the node being acted on.
      properties - the model properties to embed
      reader - the reader for the original source content file
      writer - the writer for the content after metadata has been embedded
      Throws:
      ContentIOException