Interface AccountManager


  • public interface AccountManager
    Deprecated.
    since CQ 6.2 Use com.adobe.cq.account.api.AccountManagementService instead.
    Simple Utility for User-Account self services. Provides basics for creation and password handling. The Profile can be read and stored via its API
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      User createAccount​(java.lang.String uid, java.lang.String pwd, java.lang.String group, java.util.Map<java.lang.String,​RequestParameter[]> properties)
      Deprecated.
      Convenience to create a new User together with setting properties in one method call.
      User findAccount​(java.lang.String fragment)
      Deprecated.
       
      User getOrCreateAccount​(java.lang.String id, java.lang.String pwd, java.lang.String group, java.util.Map<java.lang.String,​RequestParameter[]> properties)
      Deprecated.
      Convenience to either search and update an existing account or create it
      boolean requestAccount​(java.lang.String email, java.net.URL requestUrl)
      Deprecated.
      Request for creating a new account.
      boolean requestPasswordReset​(User user, java.net.URL requestUrl)
      Deprecated.
      Request a password rest.
      java.lang.String resetPassword​(User user)
      Deprecated.
      Reset the Password of the Account to a randomly generated
      java.lang.String resetPassword​(User user, java.lang.String key)
      Deprecated.
      Reset the Password of the Account to a randomly generated, requires a key in order to verify, that the reset has been requested by the key owner.
      boolean sendMail​(User user, java.lang.String from, java.lang.String subject, java.lang.String body, java.util.Map<java.lang.String,​java.lang.String> replace)
      Deprecated.
      Simple utility to send a mail to a given user account.
      boolean setPassword​(User user, java.lang.String key, java.lang.String pwd)
      Deprecated.
      Set the Password of the Account to a given password.
      void updateAccount​(User user, java.util.Map<java.lang.String,​RequestParameter[]> properties)
      Deprecated.
      Convenience update an Account with a set of properties with setting properties in one method call.
    • Method Detail

      • findAccount

        User findAccount​(java.lang.String fragment)
        Deprecated.
        Parameters:
        fragment - of the id / name
        Returns:
        User or {@link null null} if no User is related to the fragment
      • updateAccount

        void updateAccount​(User user,
                           java.util.Map<java.lang.String,​RequestParameter[]> properties)
                    throws RepositoryException
        Deprecated.
        Convenience update an Account with a set of properties with setting properties in one method call.
        Parameters:
        user - to update
        properties - to set
        Throws:
        RepositoryException - in case of error updating the account
      • requestPasswordReset

        boolean requestPasswordReset​(User user,
                                     java.net.URL requestUrl)
                              throws RepositoryException
        Deprecated.
        Request a password rest. Results in a key that has to be presented in order to finally set the Password to some new value.
        Parameters:
        user - to reset the password for
        requestUrl - the url called to request the reset
        Returns:
        a key that allows to reset the password
        Throws:
        RepositoryException - in case of error creating the user
        AccessDeniedException - in case of missing privileges to create accounts
        See Also:
        resetPassword(User, String)
      • requestAccount

        boolean requestAccount​(java.lang.String email,
                               java.net.URL requestUrl)
                        throws RepositoryException
        Deprecated.
        Request for creating a new account. Results in a mail being sent to the requester which contains further information how to complete account generation.
        Parameters:
        email - email address of requester
        requestUrl - the url called to request the reset
        Returns:
        true if account request succeeded, false otherwise
        Throws:
        RepositoryException
      • sendMail

        boolean sendMail​(User user,
                         java.lang.String from,
                         java.lang.String subject,
                         java.lang.String body,
                         java.util.Map<java.lang.String,​java.lang.String> replace)
                  throws RepositoryException
        Deprecated.
        Simple utility to send a mail to a given user account. Adds the ability to replace variables within the mail body with properties from the User. This Properties can be addressed by using their name as variable name.
        Parameters:
        user - to receive the mail
        from - the from e-mail address
        subject - of the mail to send
        body - of the mail to send
        replace - map of replacements for variables, with variable name as key and value as value
        Returns:
        true if the mail could be send
        Throws:
        RepositoryException - in case of error accessing the repository