Class AccountSetupService
java.lang.Object
org.exoplatform.account.setup.web.AccountSetupService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAccountSetupService(org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.services.organization.OrganizationService organizationService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateAccount(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.booleanbooleanvoidsetSkipSetup(boolean skipSetup)
-
Field Details
-
ACCOUNT_SETUP_NODE
- See Also:
-
ACCOUNT_SETUP_SKIP_PROPERTY
- See Also:
-
-
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
- 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
-