Interface ContentService

All Known Implementing Classes:
GridFsContentService, S3ContentService

public interface ContentService
Abstraction over the persistence mechanism used to store node content. Implementations handle saving, retrieving and deleting binary files as well as computing cryptographic hashes.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    archiveNodeContent(org.alfresco.core.model.Node node, InputStream inputStream)
    Saves the content of the provided node into the underlying store.
    computeHash(String nodeId, String algorithm)
    Computes the cryptographic hash of a stored node's content using the given algorithm.
    void
    Deletes content associated with the given node id from the store.
    Retrieves previously archived content for the given node id.
  • Method Details

    • archiveNodeContent

      void archiveNodeContent(org.alfresco.core.model.Node node, InputStream inputStream)
      Saves the content of the provided node into the underlying store.
      Parameters:
      node - node whose content should be archived
      inputStream - stream providing the node content
    • getNodeContent

      NodeContent getNodeContent(String nodeId)
      Retrieves previously archived content for the given node id.
      Parameters:
      nodeId - identifier of the node
      Returns:
      a NodeContent descriptor containing stream and metadata
    • deleteNodeContent

      void deleteNodeContent(String nodeId)
      Deletes content associated with the given node id from the store.
      Parameters:
      nodeId - identifier of the node
    • computeHash

      String computeHash(String nodeId, String algorithm)
      Computes the cryptographic hash of a stored node's content using the given algorithm.
      Parameters:
      nodeId - identifier of the node
      algorithm - name of the hash algorithm, e.g. MD5 or SHA-256
      Returns:
      the hexadecimal encoded hash string