Interface NodeService

All Known Implementing Classes:
MongoNodeService

public interface NodeService
Service abstraction for persisting and retrieving node metadata within the vault. Implementations typically store NodeWrapper instances in a backing store such as MongoDB.

The API is intentionally minimal and focused on CRUD-style operations. Higher level orchestration of archive and restore flows is handled by VaultService.

  • Method Details

    • save

      void save(NodeWrapper node)
      Persists the given wrapped node metadata.
      Parameters:
      node - the node wrapper to store
    • findById

      NodeWrapper findById(String nodeId)
      Retrieves a node wrapper by its identifier.
      Parameters:
      nodeId - the Alfresco node identifier
      Returns:
      the stored NodeWrapper
      Throws:
      NodeNotFoundOnVaultException - if the node does not exist in the vault
    • findByArchiveDateRange

      org.springframework.data.domain.Page<NodeWrapper> findByArchiveDateRange(Instant from, Instant to, org.springframework.data.domain.Pageable pageable)
      Retrieves node wrappers archived within the specified date range using pagination. Both bounds are inclusive. Passing null for one of the parameters will make the range open-ended on that side.
      Parameters:
      from - the lower bound of the archive date range, inclusive
      to - the upper bound of the archive date range, inclusive
      pageable - pagination information
      Returns:
      page of NodeWrapper
    • findByNtx

      Iterable<NodeWrapper> findByNtx(String ntx)
      Retrieves all node wrappers having the given notarization transaction ID. A null transaction ID is used to select nodes that have not yet been notarized.
      Parameters:
      ntx - the notarization transaction ID to filter by
      Returns:
      iterable collection of NodeWrapper
    • findByKv

      Iterable<NodeWrapper> findByKv(int kv)
      Retrieves all node wrappers associated with the specified encryption key version.
      Parameters:
      kv - the encryption key version to filter by
      Returns:
      iterable collection of NodeWrapper
    • findAll

      Iterable<NodeWrapper> findAll()
      Retrieves all stored node wrappers.
      Returns:
      iterable collection of NodeWrapper
    • deleteById

      void deleteById(String nodeId)
      Removes the stored node metadata identified by the given ID.
      Parameters:
      nodeId - the Alfresco node identifier