Class AccountSetupService

java.lang.Object
org.exoplatform.account.setup.web.AccountSetupService

public class AccountSetupService extends Object
  • Field Details

  • Constructor Details

    • AccountSetupService

      public AccountSetupService(org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.services.organization.OrganizationService organizationService)
  • Method Details

    • setSkipSetup

      public void setSkipSetup(boolean skipSetup)
    • mustSkipAccountSetup

      public boolean mustSkipAccountSetup()
    • isAccountSetupAllowed

      public boolean isAccountSetupAllowed()
      Returns:
      true when a read of the stored state, never of a cache, positively says that the setup is not done
    • getStoredSetupDone

      public Boolean getStoredSetupDone()
      Returns:
      the setup state read from the store, never from a cache: true when the setup is done (or skipped), false when it is not, null when this can't be told (the read failed)
    • createAccount

      public boolean createAccount(String userNameAccount, String firstNameAccount, String lastNameAccount, String emailAccount, String userPasswordAccount, String adminPassword)
      Creates the first administrator only when the stored state says that the setup is not done, checked under a lock on this node. Before the setup is done, a concurrent submission on this node waits on its request thread until the first one has finished. Once the setup is done, the action's own check refuses the request before this method, and the stored-state check below refuses one that a cached read let through.
      Returns:
      true when the setup ran (each step's failure is logged), false when the request was refused and nothing has been changed