Class MongoFCMRegistrationDao
java.lang.Object
dev.getelements.elements.dao.mongo.MongoFCMRegistrationDao
- All Implemented Interfaces:
FCMRegistrationDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRegistration(FCMRegistration fcmRegistration) Creates an instance ofFCMRegistrationand stores it in the database.voiddeleteRegistration(String fcmRegistrationId) Deletes an instance ofFCMRegistrationbased on the supplied id.voiddeleteRegistrationWithRequestingProfile(Profile profile, String fcmRegistrationId) Deletes an instance ofFCMRegistrationbased on the supplied id.dev.morphia.DatastoregetRegistrationsForRecipient(String recipientId) Gets aStream<FCMRegistration>containing all currently registeredFCMRegistrationinstances associated witht he suppliedProfileid of the recipient.voidsetDatastore(dev.morphia.Datastore datastore) voidsetMapper(MapperRegistry mapperRegistry) voidsetMongoApplicationDao(MongoApplicationDao mongoApplicationDao) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetMongoProfileDao(MongoProfileDao mongoProfileDao) voidsetValidationHelper(ValidationHelper validationHelper) updateRegistration(FCMRegistration fcmRegistration) Updates an instance ofFCMRegistrationin the database.voidvalidate(FCMRegistration fcmRegistration) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.sdk.dao.FCMRegistrationDao
getDistinctRegistrationsForRecipient
-
Constructor Details
-
MongoFCMRegistrationDao
public MongoFCMRegistrationDao()
-
-
Method Details
-
createRegistration
Description copied from interface:FCMRegistrationDaoCreates an instance ofFCMRegistrationand stores it in the database.- Specified by:
createRegistrationin interfaceFCMRegistrationDao- Parameters:
fcmRegistration- theFCMRegistration- Returns:
- the
FCMRegistrationinstance as it was created in the database
-
updateRegistration
Description copied from interface:FCMRegistrationDaoUpdates an instance ofFCMRegistrationin the database. Reassigning the values ofFCMRegistration.getProfile()orFCMRegistration.getRegistrationToken()as necessary- Specified by:
updateRegistrationin interfaceFCMRegistrationDao- Parameters:
fcmRegistration- theFCMRegistrationinstance- Returns:
- the
FCMRegistrationisntance as it was written to the database
-
deleteRegistration
Description copied from interface:FCMRegistrationDaoDeletes an instance ofFCMRegistrationbased on the supplied id. The id value corresponds to the value returned byFCMRegistration.getId().- Specified by:
deleteRegistrationin interfaceFCMRegistrationDao- Parameters:
fcmRegistrationId- the id of theFCMRegistrationas supplied byFCMRegistration.getId()
-
deleteRegistrationWithRequestingProfile
Description copied from interface:FCMRegistrationDaoDeletes an instance ofFCMRegistrationbased on the supplied id. The id value corresponds to the value returned byFCMRegistration.getId(). Additionally, this must refuse the if the suppliedProfiledoes not match the owner of the correspendongFCMRegistration.- Specified by:
deleteRegistrationWithRequestingProfilein interfaceFCMRegistrationDao- Parameters:
fcmRegistrationId- the id of theFCMRegistrationas supplied byFCMRegistration.getId()
-
validate
-
getRegistrationsForRecipient
Description copied from interface:FCMRegistrationDaoGets aStream<FCMRegistration>containing all currently registeredFCMRegistrationinstances associated witht he suppliedProfileid of the recipient.- Specified by:
getRegistrationsForRecipientin interfaceFCMRegistrationDao- Parameters:
recipientId- theProfileid of the recipient, as returned byProfile.getId()- Returns:
- a
Stream<FCMRegistration>containing all matchingFCMRegistrationinstances
-
getMapper
-
setMapper
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getMongoProfileDao
-
setMongoProfileDao
-
getValidationHelper
-
getMongoApplicationDao
-
setMongoApplicationDao
-
setValidationHelper
-
getMongoDBUtils
-
setMongoDBUtils
-