Class UserAuditFactory
- java.lang.Object
-
- de.hybris.platform.servicelayer.user.impl.UserAuditFactory
-
public class UserAuditFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringIP_ADDRESSprotected ModelServicemodelServiceprotected UserServiceuserService
-
Constructor Summary
Constructors Constructor Description UserAuditFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BruteForceLoginDisabledAuditModelcreateBruteForceLoginDisabledAudit(UserModel user, java.lang.Integer numFailedLogins)UserPasswordChangeAuditModelcreateUserPasswordChangeAudit(PK pk, java.lang.String uid, java.lang.String previousPassword, java.lang.String previousEncoding)Initializes UserAuditModel with uid, pk, previous password and encoding of the user.protected java.lang.StringdetermineContextPath()Tries to return context path if in webcontextprotected java.lang.StringdetermineCurrentUser()Returns user of current sessionprotected <X extends AbstractUserAuditModel>
XprocessAfterCreation(X user)Extension point that allows to modify or store additional data if UserAudit model is extended.voidsetModelService(ModelService modelService)voidsetUserService(UserService userService)
-
-
-
Field Detail
-
userService
protected UserService userService
-
modelService
protected ModelService modelService
-
IP_ADDRESS
protected static final java.lang.String IP_ADDRESS
- See Also:
- Constant Field Values
-
-
Method Detail
-
createUserPasswordChangeAudit
public UserPasswordChangeAuditModel createUserPasswordChangeAudit(PK pk, java.lang.String uid, java.lang.String previousPassword, java.lang.String previousEncoding)
Initializes UserAuditModel with uid, pk, previous password and encoding of the user. Additionally ip address, user and context path of application that caused the change are stored.- Parameters:
pk- pk of user that changed passworduid- uid of user that changed passwordpreviousPassword- previous password (hashed)previousEncoding- encoding of previous password- Returns:
-
createBruteForceLoginDisabledAudit
public BruteForceLoginDisabledAuditModel createBruteForceLoginDisabledAudit(UserModel user, java.lang.Integer numFailedLogins)
-
processAfterCreation
protected <X extends AbstractUserAuditModel> X processAfterCreation(X user)
Extension point that allows to modify or store additional data if UserAudit model is extended. This method is called after createUserAudit and returned object will be the one that is returned by factory.- Parameters:
user-- Returns:
-
determineContextPath
protected java.lang.String determineContextPath()
Tries to return context path if in webcontext- Returns:
- servlet context path or null if not exists
-
determineCurrentUser
protected java.lang.String determineCurrentUser()
Returns user of current session- Returns:
- uid of current user
-
setUserService
public void setUserService(UserService userService)
-
setModelService
public void setModelService(ModelService modelService)
-
-