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 TypeMethodDescriptionbooleandeleteContextPreferences(String context, List<String> preferences) findNotificationTemplate(String contextId, String notificationType) getContextAllPreferences(String contextId) getContextPreferences(String contextId) getEmailPreference(String contextId) voidsaveAllContextPreferences(String contextId, Map<String, Object> newPreferences) saveEmailConfig(String contextId, Map<String, Object> emailPref) voidsaveEmailPreference(String contextId, Map<String, Object> emailPreferences) booleansaveEmailTemplate(String context, String type, String template) booleansetContextPreferences(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, validateObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getEmailPreferencein interfaceContextPreferencesRepository- Throws:
SocialException
-
saveEmailConfig
public Map<String,Object> saveEmailConfig(String contextId, Map<String, Object> emailPref) throws SocialException- Specified by:
saveEmailConfigin interfaceContextPreferencesRepository- Throws:
SocialException
-
findNotificationTemplate
public String findNotificationTemplate(String contextId, String notificationType) throws SocialException - Specified by:
findNotificationTemplatein interfaceContextPreferencesRepository- Throws:
SocialException
-
getContextPreferences
- Specified by:
getContextPreferencesin interfaceContextPreferencesRepository
-
getContextAllPreferences
- Specified by:
getContextAllPreferencesin interfaceContextPreferencesRepository
-
setContextPreferences
- Specified by:
setContextPreferencesin interfaceContextPreferencesRepository
-
deleteContextPreferences
- Specified by:
deleteContextPreferencesin 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:
saveAllContextPreferencesin interfaceContextPreferencesRepository- Throws:
SocialException
-
saveEmailTemplate
public boolean saveEmailTemplate(String context, String type, String template) throws SocialException - Specified by:
saveEmailTemplatein interfaceContextPreferencesRepository- Throws:
SocialException
-