Class ContextPreferencesRepositoryImpl
java.lang.Object
org.craftercms.commons.mongo.AbstractJongoRepository<ContextPreferences>
org.craftercms.social.repositories.system.impl.ContextPreferencesRepositoryImpl
- All Implemented Interfaces:
org.craftercms.commons.mongo.CrudRepository<ContextPreferences>
,ContextPreferencesRepository
public class ContextPreferencesRepositoryImpl
extends org.craftercms.commons.mongo.AbstractJongoRepository<ContextPreferences>
implements ContextPreferencesRepository
-
Field Summary
Fields inherited from class org.craftercms.commons.mongo.AbstractJongoRepository
clazz, collectionName, gridfs, jongo, queries
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
deleteContextPreferences
(String context, List<String> preferences) findNotificationTemplate
(String contextId, String notificationType) getContextAllPreferences
(String contextId) getContextPreferences
(String contextId) getEmailPreference
(String contextId) void
saveAllContextPreferences
(String contextId, Map<String, Object> newPreferences) saveEmailConfig
(String contextId, Map<String, Object> emailPref) void
saveEmailPreference
(String contextId, Map<String, Object> emailPreferences) boolean
saveEmailTemplate
(String context, String type, String template) boolean
setContextPreferences
(Map<String, Object> preferences, String contextId) Methods inherited from class org.craftercms.commons.mongo.AbstractJongoRepository
count, count, count, createSortQuery, deleteFile, deleteFile, find, find, findAll, findById, findByStringId, findOne, findOne, getCollection, getFileInfo, getFileInfo, getQueryFor, init, insert, insert, listFilesByName, readFile, readFile, remove, remove, removeById, removeByStringId, returnList, returnSimple, save, save, saveFile, saveFile, setJongo, setQueries, update, update, update, update, updateFile, updateFile, updateFile, validateObject, validateObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.craftercms.commons.mongo.CrudRepository
count, count, count, deleteFile, deleteFile, find, find, findAll, findById, findByStringId, findOne, findOne, getFileInfo, getFileInfo, insert, insert, listFilesByName, readFile, readFile, remove, remove, removeById, removeByStringId, save, save, saveFile, saveFile, update, update, update, update, updateFile, updateFile, updateFile
-
Constructor Details
-
ContextPreferencesRepositoryImpl
public ContextPreferencesRepositoryImpl()
-
-
Method Details
-
getEmailPreference
- Specified by:
getEmailPreference
in interfaceContextPreferencesRepository
- Throws:
SocialException
-
saveEmailConfig
public Map<String,Object> saveEmailConfig(String contextId, Map<String, Object> emailPref) throws SocialException- Specified by:
saveEmailConfig
in interfaceContextPreferencesRepository
- Throws:
SocialException
-
findNotificationTemplate
public String findNotificationTemplate(String contextId, String notificationType) throws SocialException - Specified by:
findNotificationTemplate
in interfaceContextPreferencesRepository
- Throws:
SocialException
-
getContextPreferences
- Specified by:
getContextPreferences
in interfaceContextPreferencesRepository
-
getContextAllPreferences
- Specified by:
getContextAllPreferences
in interfaceContextPreferencesRepository
-
setContextPreferences
- Specified by:
setContextPreferences
in interfaceContextPreferencesRepository
-
deleteContextPreferences
- Specified by:
deleteContextPreferences
in interfaceContextPreferencesRepository
-
saveEmailPreference
public void saveEmailPreference(String contextId, Map<String, Object> emailPreferences) throws SocialException- Throws:
SocialException
-
saveAllContextPreferences
public void saveAllContextPreferences(String contextId, Map<String, Object> newPreferences) throws SocialException- Specified by:
saveAllContextPreferences
in interfaceContextPreferencesRepository
- Throws:
SocialException
-
saveEmailTemplate
public boolean saveEmailTemplate(String context, String type, String template) throws SocialException - Specified by:
saveEmailTemplate
in interfaceContextPreferencesRepository
- Throws:
SocialException
-