Class PersistentLoginRepositoryImpl
java.lang.Object
org.craftercms.commons.mongo.AbstractJongoRepository<PersistentLogin>
org.craftercms.profile.repositories.impl.PersistentLoginRepositoryImpl
- All Implemented Interfaces:
org.craftercms.commons.mongo.CrudRepository<PersistentLogin>,PersistentLoginRepository
public class PersistentLoginRepositoryImpl
extends org.craftercms.commons.mongo.AbstractJongoRepository<PersistentLogin>
implements PersistentLoginRepository
Default implementation of
PersistentLogin.- Author:
- avasquez
-
Field Summary
FieldsFields inherited from class org.craftercms.commons.mongo.AbstractJongoRepository
clazz, collectionName, gridfs, jongo, queries -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindByProfileIdAndToken(String profileId, String token) Returns the login associated to the given profile ID and token.voidremoveOlderThan(long seconds) Removes logins with timestamps older than the specified number of seconds.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
-
Field Details
-
KEY_FIND_BY_PROFILE_ID_AND_TOKEN
- See Also:
-
KEY_REMOVE_TOKENS_OLDER_THAN_QUERY
- See Also:
-
-
Constructor Details
-
PersistentLoginRepositoryImpl
public PersistentLoginRepositoryImpl()
-
-
Method Details
-
findByProfileIdAndToken
public PersistentLogin findByProfileIdAndToken(String profileId, String token) throws org.craftercms.commons.mongo.MongoDataException Description copied from interface:PersistentLoginRepositoryReturns the login associated to the given profile ID and token.- Specified by:
findByProfileIdAndTokenin interfacePersistentLoginRepository- Parameters:
profileId- the profile's IDtoken- the token- Returns:
- the login
- Throws:
org.craftercms.commons.mongo.MongoDataException
-
removeOlderThan
public void removeOlderThan(long seconds) throws org.craftercms.commons.mongo.MongoDataException Description copied from interface:PersistentLoginRepositoryRemoves logins with timestamps older than the specified number of seconds.- Specified by:
removeOlderThanin interfacePersistentLoginRepository- Parameters:
seconds- the number of seconds- Throws:
org.craftercms.commons.mongo.MongoDataException
-