Class MongoNodeService

java.lang.Object
org.saidone.component.BaseComponent
org.saidone.service.MongoNodeService
All Implemented Interfaces:
NodeService, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Service public class MongoNodeService extends BaseComponent implements NodeService
Default NodeService implementation that persists node metadata using a MongoNodeRepositoryImpl. It throws NodeNotFoundOnVaultException when a requested node is not present in the repository.
  • Constructor Details

    • MongoNodeService

      public MongoNodeService()
  • Method Details

    • save

      public void save(NodeWrapper nodeWrapper)
      Saves the given node wrapper to the repository.
      Specified by:
      save in interface NodeService
      Parameters:
      nodeWrapper - node metadata to persist
    • findById

      public NodeWrapper findById(String nodeId)
      Retrieves the stored node wrapper by its identifier.
      Specified by:
      findById in interface NodeService
      Parameters:
      nodeId - the Alfresco node identifier
      Returns:
      the stored NodeWrapper
      Throws:
      NodeNotFoundOnVaultException - if the node does not exist
    • deleteById

      public void deleteById(String nodeId)
      Deletes the node wrapper identified by the given ID.
      Specified by:
      deleteById in interface NodeService
      Parameters:
      nodeId - the Alfresco node identifier