org.wso2.carbon.email.verification.util
Class Util

java.lang.Object
  extended by org.wso2.carbon.email.verification.util.Util

public class Util
extends Object

The utility methods of the Email Verifier component


Constructor Summary
Util()
           
 
Method Summary
static ConfirmationBean confirmUser(String secretKey)
          Confirms that the link the user clicked is valid.
static org.wso2.carbon.registry.core.session.UserRegistry getConfigSystemRegistry(int tenantId)
           
static org.wso2.carbon.registry.core.service.RegistryService getRegistryService()
           
static EmailVerifierConfig loadeMailVerificationConfig(String configFilename)
          Loads the email configuration from the respective components.
static void requestUserVerification(Map<String,String> data, EmailVerifierConfig serviceConfig)
          Sends an email to the user with the link to verify.
static void setRegistryService(org.wso2.carbon.registry.core.service.RegistryService service)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

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

public static EmailVerifierConfig loadeMailVerificationConfig(String configFilename)
Loads the email configuration from the respective components.

Parameters:
configFilename, - the file that contains the email configurations
Returns:
EmailVerfierConfig

confirmUser

public static ConfirmationBean confirmUser(String secretKey)
                                    throws Exception
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, - if confirming the user failed.
Exception

requestUserVerification

public static void requestUserVerification(Map<String,String> data,
                                           EmailVerifierConfig serviceConfig)
                                    throws Exception
Sends an email to the user with the link to verify.

Parameters:
data - of the user
serviceConfig, - EmailVerifier Configuration.
Throws:
Exception, - if sending the user verification mail failed.
Exception


Copyright © 2015 WSO2. All rights reserved.