Examples of TenantSelfRegistrationClient


Examples of org.apache.stratos.register.ui.clients.TenantSelfRegistrationClient

            tenantInfoBean.setCreatedDate(Calendar.getInstance());
            // filling captcha info
            captchaInfoBean.setSecretKey(request.getParameter("captcha-secret-key"));
            captchaInfoBean.setUserAnswer(request.getParameter("captcha-user-answer"));

            TenantSelfRegistrationClient selfRegistrationClient =
                    new TenantSelfRegistrationClient(config, session);

            String returnText = selfRegistrationClient.registerTenant(tenantInfoBean, captchaInfoBean);

            return returnText;

        } catch (Exception e) {
            AxisFault fault = new AxisFault(e.getMessage());
View Full Code Here

Examples of org.apache.stratos.register.ui.clients.TenantSelfRegistrationClient

            HttpServletRequest request, ServletConfig config, HttpSession session)
            throws UIException {
        String tenantDomain = null;
        try {
            tenantDomain = resolveDomainName(request.getParameter("domain"));
            TenantSelfRegistrationClient selfRegistrationClient =
                    new TenantSelfRegistrationClient(config, session);
            return selfRegistrationClient.checkDomainAvailability(tenantDomain);
        } catch (Exception e) {
            String msg = "Failed to check the domain availability:" + tenantDomain + ".";
            log.error(msg, e);
            throw new UIException(msg, e);
        }
View Full Code Here

Examples of org.apache.stratos.register.ui.clients.TenantSelfRegistrationClient

                (String) session.getAttribute("temp-domain-to-register"));
        // here successKey can be null, in such cases services will directly go to suggest a name
        String successKey = (String) session.getAttribute("validate-domain-success-key");

        try {
            TenantSelfRegistrationClient selfRegistrationClient =
                    new TenantSelfRegistrationClient(config, session);
            return selfRegistrationClient.validateOrSuggestDomain(tempDomainToRegister, successKey);
        } catch (Exception e) {
            String msg = "Failed to validate or suggest a domain related to :" +
                    tempDomainToRegister + ".";
            log.error(msg, e);
            throw new UIException(msg, e);
View Full Code Here

Examples of org.apache.stratos.register.ui.clients.TenantSelfRegistrationClient

     * @throws UIException, if generating the random captcha fails.
     */
    public static CaptchaInfoBean generateRandomCaptcha(ServletConfig config,
                                                        HttpSession session) throws UIException {
        try {
            TenantSelfRegistrationClient selfRegistrationClient =
                    new TenantSelfRegistrationClient(config, session);
            return selfRegistrationClient.generateRandomCaptcha();
        } catch (Exception e) {
            String msg = "Error in generating the captcha image.";
            log.error(msg, e);
            throw new UIException(msg, e);
        }
View Full Code Here

Examples of org.wso2.carbon.register.ui.clients.TenantSelfRegistrationClient

            tenantInfoBean.setCreatedDate(Calendar.getInstance());
            // filling captcha info
            captchaInfoBean.setSecretKey(request.getParameter("captcha-secret-key"));
            captchaInfoBean.setUserAnswer(request.getParameter("captcha-user-answer"));

            TenantSelfRegistrationClient selfRegistrationClient =
                    new TenantSelfRegistrationClient(config, session);

            String returnText = selfRegistrationClient.registerTenant(tenantInfoBean, captchaInfoBean);

            return returnText;

        } catch (Exception e) {
            AxisFault fault = new AxisFault(e.getMessage());
View Full Code Here

Examples of org.wso2.carbon.register.ui.clients.TenantSelfRegistrationClient

            TenantInfoBean tenantInfoBean = new TenantInfoBean();
            tenantInfoBean.setAdmin(admin);
            tenantInfoBean.setTenantDomain(domain);

            TenantSelfRegistrationClient selfRegistrationClient =
                    new TenantSelfRegistrationClient(config, session);
            return selfRegistrationClient.resetPassword(tenantInfoBean);
        } catch (Exception e) {
            AxisFault fault = new AxisFault(e.getMessage());
            String msg = fault.getReason() + " Failed to reset password. tenant-domain: " + domain +
                    " admin: " + admin;
            log.error(msg, e);
View Full Code Here

Examples of org.wso2.carbon.register.ui.clients.TenantSelfRegistrationClient

        try {
            // filling captcha info
            captchaInfoBean.setSecretKey(request.getParameter("captcha-secret-key"));
            captchaInfoBean.setUserAnswer(request.getParameter("captcha-user-answer"));

            TenantSelfRegistrationClient selfRegistrationClient =
                    new TenantSelfRegistrationClient(config, session);
            return selfRegistrationClient.updateAdminPasswordWithUserInput(
                    tenantInfoBean, captchaInfoBean);
        } catch (Exception e) {
            AxisFault fault = new AxisFault(e.getMessage());
            String msg = fault.getReason() + " Failed to update password. tenant-domain: " + domain;
            log.error(msg, e);
View Full Code Here

Examples of org.wso2.carbon.register.ui.clients.TenantSelfRegistrationClient

            HttpServletRequest request, ServletConfig config, HttpSession session)
            throws UIException {
        String tenantDomain = null;
        try {
            tenantDomain = resolveDomainName(request.getParameter("domain"));
            TenantSelfRegistrationClient selfRegistrationClient =
                    new TenantSelfRegistrationClient(config, session);
            return selfRegistrationClient.checkDomainAvailability(tenantDomain);
        } catch (Exception e) {
            String msg = "Failed to check the domain availability:" + tenantDomain + ".";
            log.error(msg, e);
            throw new UIException(msg, e);
        }
View Full Code Here

Examples of org.wso2.carbon.register.ui.clients.TenantSelfRegistrationClient

                (String) session.getAttribute("temp-domain-to-register"));
        // here successKey can be null, in such cases services will directly go to suggest a name
        String successKey = (String) session.getAttribute("validate-domain-success-key");

        try {
            TenantSelfRegistrationClient selfRegistrationClient =
                    new TenantSelfRegistrationClient(config, session);
            return selfRegistrationClient.validateOrSuggestDomain(tempDomainToRegister, successKey);
        } catch (Exception e) {
            String msg = "Failed to validate or suggest a domain related to :" +
                    tempDomainToRegister + ".";
            log.error(msg, e);
            throw new UIException(msg, e);
View Full Code Here

Examples of org.wso2.carbon.register.ui.clients.TenantSelfRegistrationClient

     * @throws UIException, if generating the random captcha fails.
     */
    public static CaptchaInfoBean generateRandomCaptcha(ServletConfig config,
                                                        HttpSession session) throws UIException {
        try {
            TenantSelfRegistrationClient selfRegistrationClient =
                    new TenantSelfRegistrationClient(config, session);
            return selfRegistrationClient.generateRandomCaptcha();
        } catch (Exception e) {
            String msg = "Error in generating the captcha image.";
            log.error(msg, e);
            throw new UIException(msg, e);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.