Package org.pac4j.couch.profile.service
Class CouchProfileService
- java.lang.Object
-
- org.pac4j.core.util.InitializableObject
-
- org.pac4j.core.profile.definition.ProfileDefinitionAware
-
- org.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
-
- org.pac4j.couch.profile.service.CouchProfileService
-
- All Implemented Interfaces:
org.pac4j.core.credentials.authenticator.Authenticator
,org.pac4j.core.profile.service.ProfileService<CouchProfile>
public class CouchProfileService extends org.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
The CouchDB profile service.- Since:
- 2.0.0
- Author:
- Elie Roux
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COUCH_ID
-
Constructor Summary
Constructors Constructor Description CouchProfileService()
CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector)
CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, java.lang.String attributes)
CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, java.lang.String attributes, org.pac4j.core.credentials.password.PasswordEncoder passwordEncoder)
CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, org.pac4j.core.credentials.password.PasswordEncoder passwordEncoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
deleteById(java.lang.String id)
org.ektorp.CouchDbConnector
getCouchDbConnector()
com.fasterxml.jackson.databind.ObjectMapper
getObjectMapper()
protected void
insert(java.util.Map<java.lang.String,java.lang.Object> attributes)
protected void
internalInit()
protected java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
read(java.util.List<java.lang.String> names, java.lang.String key, java.lang.String value)
void
setCouchDbConnector(org.ektorp.CouchDbConnector couchDbConnector)
void
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
java.lang.String
toString()
protected void
update(java.util.Map<java.lang.String,java.lang.Object> attributes)
-
Methods inherited from class org.pac4j.core.profile.service.AbstractProfileService
convertAttributesToProfile, convertProfileAndPasswordToAttributes, create, defineAttributesToRead, findById, findByLinkedId, getAttributes, getIdAttribute, getPasswordAttribute, getPasswordEncoder, getSerializer, getUsernameAttribute, isLegacyMode, remove, removeById, setAttributes, setIdAttribute, setPasswordAttribute, setPasswordEncoder, setSerializer, setUsernameAttribute, update, validate
-
Methods inherited from class org.pac4j.core.profile.definition.ProfileDefinitionAware
defaultProfileDefinition, getProfileDefinition, setProfileDefinition
-
-
-
-
Field Detail
-
COUCH_ID
public static final java.lang.String COUCH_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CouchProfileService
public CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, java.lang.String attributes, org.pac4j.core.credentials.password.PasswordEncoder passwordEncoder)
-
CouchProfileService
public CouchProfileService()
-
CouchProfileService
public CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector)
-
CouchProfileService
public CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, java.lang.String attributes)
-
CouchProfileService
public CouchProfileService(org.ektorp.CouchDbConnector couchDbConnector, org.pac4j.core.credentials.password.PasswordEncoder passwordEncoder)
-
-
Method Detail
-
internalInit
protected void internalInit()
- Overrides:
internalInit
in classorg.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
-
insert
protected void insert(java.util.Map<java.lang.String,java.lang.Object> attributes)
- Specified by:
insert
in classorg.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
-
update
protected void update(java.util.Map<java.lang.String,java.lang.Object> attributes)
- Specified by:
update
in classorg.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
-
deleteById
protected void deleteById(java.lang.String id)
- Specified by:
deleteById
in classorg.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
-
read
protected java.util.List<java.util.Map<java.lang.String,java.lang.Object>> read(java.util.List<java.lang.String> names, java.lang.String key, java.lang.String value)
- Specified by:
read
in classorg.pac4j.core.profile.service.AbstractProfileService<CouchProfile>
-
getCouchDbConnector
public org.ektorp.CouchDbConnector getCouchDbConnector()
-
setCouchDbConnector
public void setCouchDbConnector(org.ektorp.CouchDbConnector couchDbConnector)
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-
setObjectMapper
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-