Package org.craftercms.profile.utils.db
Class ProfileUpdater
- java.lang.Object
-
- org.craftercms.profile.utils.db.ProfileUpdater
-
public class ProfileUpdater extends Object
Created by alfonsovasquez on 14/6/16.
-
-
Field Summary
Fields Modifier and Type Field Description protected Profile
profile
protected ProfileRepository
profileRepository
protected org.craftercms.commons.mongo.UpdateHelper
updateHelper
-
Constructor Summary
Constructors Constructor Description ProfileUpdater(Profile profile, org.craftercms.commons.mongo.UpdateHelper updateHelper, ProfileRepository profileRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttributes(Map<String,Object> attributes)
void
addRoles(Collection<String> roles)
Profile
getProfile()
void
removeAttributes(Collection<String> attributeNames)
void
removeRoles(Collection<String> roles)
void
setAttributes(Map<String,Object> attributes)
void
setEmail(String email)
void
setEnabled(boolean enabled)
void
setFailedLoginAttempts(int failedLoginAttempts)
void
setLastFailedLogin(Date lastFailedLogin)
void
setLastModified(Date lastModified)
void
setPassword(String password)
void
setRoles(Set<String> roles)
void
setUsername(String username)
void
setVerified(boolean verified)
void
update()
-
-
-
Field Detail
-
profile
protected Profile profile
-
updateHelper
protected org.craftercms.commons.mongo.UpdateHelper updateHelper
-
profileRepository
protected ProfileRepository profileRepository
-
-
Constructor Detail
-
ProfileUpdater
public ProfileUpdater(Profile profile, org.craftercms.commons.mongo.UpdateHelper updateHelper, ProfileRepository profileRepository)
-
-
Method Detail
-
getProfile
public Profile getProfile()
-
setUsername
public void setUsername(String username)
-
setPassword
public void setPassword(String password)
-
setEmail
public void setEmail(String email)
-
setVerified
public void setVerified(boolean verified)
-
setEnabled
public void setEnabled(boolean enabled)
-
setLastModified
public void setLastModified(Date lastModified)
-
addRoles
public void addRoles(Collection<String> roles)
-
removeRoles
public void removeRoles(Collection<String> roles)
-
removeAttributes
public void removeAttributes(Collection<String> attributeNames)
-
setFailedLoginAttempts
public void setFailedLoginAttempts(int failedLoginAttempts)
-
setLastFailedLogin
public void setLastFailedLogin(Date lastFailedLogin)
-
update
public void update() throws org.craftercms.commons.mongo.MongoDataException
- Throws:
org.craftercms.commons.mongo.MongoDataException
-
-