Class UserAuditFactory


  • public class UserAuditFactory
    extends java.lang.Object
    • Constructor Detail

      • UserAuditFactory

        public UserAuditFactory()
    • 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 password
        uid - uid of user that changed password
        previousPassword - previous password (hashed)
        previousEncoding - encoding of previous password
        Returns:
      • 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)