Class Util
java.lang.Object
org.wso2.carbon.email.verification.util.Util
The utility methods of the Email Verifier component
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfirmationBeanconfirmUser(String secretKey) Confirms that the link the user clicked is valid.static org.wso2.carbon.registry.core.session.UserRegistrygetConfigSystemRegistry(int tenantId) static org.wso2.carbon.registry.core.service.RegistryServicestatic EmailVerifierConfigloadeMailVerificationConfig(String configFilename) Loads the email configuration from the respective components.static voidrequestUserVerification(Map<String, String> data, EmailVerifierConfig serviceConfig) Sends an email to the user with the link to verify.static voidsetRegistryService(org.wso2.carbon.registry.core.service.RegistryService service)
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
setRegistryService
public static void setRegistryService(org.wso2.carbon.registry.core.service.RegistryService service) -
getRegistryService
public static org.wso2.carbon.registry.core.service.RegistryService getRegistryService() -
getConfigSystemRegistry
public static org.wso2.carbon.registry.core.session.UserRegistry getConfigSystemRegistry(int tenantId) throws org.wso2.carbon.registry.core.exceptions.RegistryException - Throws:
org.wso2.carbon.registry.core.exceptions.RegistryException
-
loadeMailVerificationConfig
Loads the email configuration from the respective components.- Parameters:
configFilename- , the file that contains the email configurations- Returns:
- EmailVerfierConfig
-
confirmUser
Confirms that the link the user clicked is valid.- Parameters:
secretKey- , the key that is sent to the user with the email.- Returns:
- the ConfirmationBean with the redirect path and data.
- Throws:
Exception
-
requestUserVerification
public static void requestUserVerification(Map<String, String> data, EmailVerifierConfig serviceConfig) throws ExceptionSends an email to the user with the link to verify.- Parameters:
data- of the userserviceConfig- , EmailVerifier Configuration.- Throws:
Exception
-