Package org.apache.stratos.register.ui.clients

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


            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

                (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

     * @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

Related Classes of org.apache.stratos.register.ui.clients.TenantSelfRegistrationClient

Copyright © 2018 www.massapicom. 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.