Interface UploadDataAccess

  • All Known Implementing Classes:
    UploadDataAccessFirebase

    public interface UploadDataAccess
    The interface that abstracts the services available for persistance, in this microservice.
    Author:
    swaroop_nath
    • Method Detail

      • updateUserMemories

        boolean updateUserMemories​(List<Memory> uploadedMemories,
                                   String userID)
                            throws UploadNotCompleteException
        An abstraction that allows the updation of the list of memories a user holds on the database
        Parameters:
        uploadedMemories - The list of memories
        userID - The identifier for the user
        Returns:
        Returns true if the upload was successful
        Throws:
        UploadNotCompleteException - Thrown in case the upload couldn't be completed
      • fetchUserByID

        User fetchUserByID​(String currentUserID)
                    throws InternalServerException
        An abstraction that allows to fetch the currently logged in user, by the user id
        Parameters:
        currentUserID - The identification of the user
        Returns:
        The logged in user as a User object
        Throws:
        InternalServerException - Thrown in case there are any issues while fetching from the database