Class UploadDataAccessFirebase
- java.lang.Object
-
- in.cs699.tensors.delagram.content_upload_service.repository.UploadDataAccessFirebase
-
- All Implemented Interfaces:
UploadDataAccess
@Repository public class UploadDataAccessFirebase extends Object implements UploadDataAccess
A Firebase based implementation of Persistance.- Author:
- swaroop_nath
-
-
Constructor Summary
Constructors Constructor Description UploadDataAccessFirebase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description User
fetchUserByID(String currentUserID)
The implementation of the abstraction, based on Firebase Firestore databaseboolean
updateUserMemories(List<Memory> uploadedMemories, String userID)
The implementation of the abstraction, based on Firebase Firestore database
-
-
-
Method Detail
-
updateUserMemories
public boolean updateUserMemories(List<Memory> uploadedMemories, String userID) throws UploadNotCompleteException
The implementation of the abstraction, based on Firebase Firestore database- Specified by:
updateUserMemories
in interfaceUploadDataAccess
- Parameters:
uploadedMemories
- The list of memoriesuserID
- 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
public User fetchUserByID(String currentUserID) throws InternalServerException
The implementation of the abstraction, based on Firebase Firestore database- Specified by:
fetchUserByID
in interfaceUploadDataAccess
- 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
-
-