public class MongoProfileService extends AbstractProfileService<MongoProfile>
attributeNames, ID, LINKEDID, logger, SERIALIZED_PROFILE
Constructor and Description |
---|
MongoProfileService() |
MongoProfileService(com.mongodb.MongoClient mongoClient) |
MongoProfileService(com.mongodb.MongoClient mongoClient,
PasswordEncoder passwordEncoder) |
MongoProfileService(com.mongodb.MongoClient mongoClient,
String attributes) |
MongoProfileService(com.mongodb.MongoClient mongoClient,
String attributes,
PasswordEncoder passwordEncoder) |
Modifier and Type | Method and Description |
---|---|
protected void |
deleteById(String id)
Delete a profile by its identifier in the storage.
|
protected com.mongodb.client.MongoCollection<org.bson.Document> |
getCollection() |
com.mongodb.MongoClient |
getMongoClient() |
String |
getUsersCollection() |
String |
getUsersDatabase() |
protected void |
insert(Map<String,Object> attributes)
Insert the attributes in the storage.
|
protected void |
internalInit(WebContext context)
Internal initialization of the object.
|
protected List<Map<String,Object>> |
read(List<String> names,
String key,
String value)
Read the list of defined attributes in the storage for key=value query.
|
void |
setMongoClient(com.mongodb.MongoClient mongoClient) |
void |
setUsersCollection(String usersCollection) |
void |
setUsersDatabase(String usersDatabase) |
String |
toString() |
protected void |
update(Map<String,Object> attributes)
Update the attributes in the storage.
|
convertAttributesToProfile, convertProfileAndPasswordToAttributes, create, defineAttributesToRead, findById, findByLinkedId, getAttributes, getIdAttribute, getJavaSerializationHelper, getPasswordAttribute, getPasswordEncoder, getUsernameAttribute, isLegacyMode, remove, removeById, setAttributes, setIdAttribute, setJavaSerializationHelper, setPasswordAttribute, setPasswordEncoder, setUsernameAttribute, update, validate
defaultProfileDefinition, getProfileDefinition, setProfileDefinition
init, reinit
public MongoProfileService()
public MongoProfileService(com.mongodb.MongoClient mongoClient)
public MongoProfileService(com.mongodb.MongoClient mongoClient, String attributes)
public MongoProfileService(com.mongodb.MongoClient mongoClient, String attributes, PasswordEncoder passwordEncoder)
public MongoProfileService(com.mongodb.MongoClient mongoClient, PasswordEncoder passwordEncoder)
protected void internalInit(WebContext context)
InitializableWebObject
internalInit
in class AbstractProfileService<MongoProfile>
context
- the web contextprotected void insert(Map<String,Object> attributes)
AbstractProfileService
insert
in class AbstractProfileService<MongoProfile>
attributes
- the attributesprotected void update(Map<String,Object> attributes)
AbstractProfileService
update
in class AbstractProfileService<MongoProfile>
attributes
- the attributesprotected void deleteById(String id)
AbstractProfileService
deleteById
in class AbstractProfileService<MongoProfile>
id
- the identifierprotected List<Map<String,Object>> read(List<String> names, String key, String value)
AbstractProfileService
read
in class AbstractProfileService<MongoProfile>
names
- the attribute names to readkey
- the key for the queryvalue
- the value for the queryprotected com.mongodb.client.MongoCollection<org.bson.Document> getCollection()
public String getUsersDatabase()
public void setUsersDatabase(String usersDatabase)
public String getUsersCollection()
public void setUsersCollection(String usersCollection)
public com.mongodb.MongoClient getMongoClient()
public void setMongoClient(com.mongodb.MongoClient mongoClient)
Copyright © 2018. All rights reserved.