Package org.saidone.service
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 Summary
Modifier and TypeMethodDescriptionvoid
deleteById
(String nodeId) Removes the stored node metadata identified by the given ID.findAll()
Retrieves all stored node wrappers.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.Retrieves a node wrapper by its identifier.findByKv
(int kv) Retrieves all node wrappers associated with the specified encryption key version.Retrieves all node wrappers having the given notarization transaction ID.void
save
(NodeWrapper node) Persists the given wrapped node metadata.
-
Method Details
-
save
Persists the given wrapped node metadata.- Parameters:
node
- the node wrapper to store
-
findById
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. Passingnull
for one of the parameters will make the range open-ended on that side.- Parameters:
from
- the lower bound of the archive date range, inclusiveto
- the upper bound of the archive date range, inclusivepageable
- pagination information- Returns:
- page of
NodeWrapper
-
findByNtx
Retrieves all node wrappers having the given notarization transaction ID. Anull
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
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
Removes the stored node metadata identified by the given ID.- Parameters:
nodeId
- the Alfresco node identifier
-