Class PasswordResetService

  • All Implemented Interfaces:
    java.io.Serializable

    @Named("passwordResetService")
    public class PasswordResetService
    extends java.lang.Object
    implements java.io.Serializable
    Provides operations with password reset requests
    Author:
    Yuriy Movchan Date: 09/01/2018
    See Also:
    Serialized Form
    • Constructor Detail

      • PasswordResetService

        public PasswordResetService()
    • Method Detail

      • addBranch

        public void addBranch()
      • containsBranch

        public boolean containsBranch()
      • prepareBranch

        public void prepareBranch()
      • findPasswordResetRequest

        public PasswordResetRequest findPasswordResetRequest​(java.lang.String guid)
        Get password reset request by DN
        Parameters:
        DN - password reset request DN
        Returns:
        PasswordResetRequest Password reset request
      • addPasswordResetRequest

        public void addPasswordResetRequest​(PasswordResetRequest passwordResetRequest)
        Add new password reset request
        Parameters:
        PasswordResetRequest - Password reset request
      • updatePasswordResetRequest

        public void updatePasswordResetRequest​(PasswordResetRequest passwordResetRequest)
        Update new password reset request
        Parameters:
        PasswordResetRequest - Password reset request
      • removePasswordResetRequest

        public void removePasswordResetRequest​(PasswordResetRequest passwordResetRequest)
        Remove new password reset request
        Parameters:
        PasswordResetRequest - Password reset request
      • containsPasswordResetRequest

        public boolean containsPasswordResetRequest​(java.lang.String dn)
        Check if there is password reset request with specified attributes
        Returns:
        True if password reset request with specified attributes exist
      • findPasswordResetRequests

        public java.util.List<PasswordResetRequest> findPasswordResetRequests​(PasswordResetRequest passwordResetRequest)
        Get password reset requests by example
        Parameters:
        PasswordResetRequest - passwordResetRequest
        Returns:
        List of PasswordResetRequests which conform example
      • getAllPasswordResetRequests

        public java.util.List<PasswordResetRequest> getAllPasswordResetRequests​(java.lang.String... ldapReturnAttributes)
        Get all password reset requests
        Returns:
        List of password reset requests
      • findActualPasswordResetRequest

        public PasswordResetRequest findActualPasswordResetRequest​(java.lang.String personInum)
        Search latest user password reset request by person inum
        Parameters:
        pattern - Pattern
        sizeLimit - Maximum count of results
        Returns:
        List of password reset requests
      • getExpiredPasswordResetRequests

        public java.util.List<PasswordResetRequest> getExpiredPasswordResetRequests​(org.gluu.persist.model.BatchOperation<PasswordResetRequest> batchOperation,
                                                                                    java.util.Date expirationDate,
                                                                                    java.lang.String[] returnAttributes,
                                                                                    int sizeLimit,
                                                                                    int chunkSize)
      • cleanup

        public void cleanup​(java.util.Date expirationDate)
      • generateGuidForNewPasswordResetRequest

        public java.lang.String generateGuidForNewPasswordResetRequest()
        Generate new guid for password reset request
        Returns:
        new guid for password reset request
      • getDnForPasswordResetRequest

        public java.lang.String getDnForPasswordResetRequest​(java.lang.String guid)
        Build DN string for password reset request