Examples of TenantServiceClient


Examples of org.apache.stratos.tenant.mgt.ui.clients.TenantServiceClient

            tenantInfoBean.setAdminPassword(request.getParameter("admin-password"));
            tenantInfoBean.setTenantDomain(request.getParameter("domain"));
            tenantInfoBean.setEmail(request.getParameter("admin-email"));
            tenantInfoBean.setUsagePlan(request.getParameter("usage-plan-name"));
            tenantInfoBean.setCreatedDate(Calendar.getInstance());
            TenantServiceClient serviceClient = new TenantServiceClient(config, session);
            serviceClient.addTenant(tenantInfoBean);
           
        } catch (Exception e) {
            String msg = "Failed to add tenant config. tenant-domain: "
                    + tenantInfoBean.getTenantDomain() + ", " + "tenant-admin: "
                    + tenantInfoBean.getAdmin() + ".";
View Full Code Here

Examples of org.apache.stratos.tenant.mgt.ui.clients.TenantServiceClient

            tenantInfoBean.setLastname(request.getParameter("admin-lastname"));
            tenantInfoBean.setAdminPassword(request.getParameter("admin-password"));
            tenantInfoBean.setTenantDomain(request.getParameter("domain"));
            tenantInfoBean.setEmail(request.getParameter("admin-email"));
            tenantInfoBean.setUsagePlan(request.getParameter("usage-plan-name"));
            TenantServiceClient serviceClient = new TenantServiceClient(config, session);
            serviceClient.updateTenant(tenantInfoBean);
            //UsagePlanClient usagePlanClient = new UsagePlanClient(config, session);
            //update usage plan(subscription) per tenant
            //usagePlanClient.updateUsagePlan(tenantInfoBean);
        } catch (Exception e) {
            String msg = "Failed to update the tenant config. tenant-domain: "
View Full Code Here

Examples of org.apache.stratos.tenant.mgt.ui.clients.TenantServiceClient

    public static TenantInfoBean[] getTenants(HttpServletRequest request, ServletConfig config,
                                              HttpSession session) throws Exception {

        try {

            TenantServiceClient serviceClient = new TenantServiceClient(config, session);
            return serviceClient.retrieveTenants();
        } catch (Exception e) {
            String msg = "Failed to get the minimum information bean of tenants. ";
            log.error(msg, e);
            throw new Exception(msg, e);
        }
View Full Code Here

Examples of org.apache.stratos.tenant.mgt.ui.clients.TenantServiceClient

    public static TenantInfoBean getTenant(HttpServletRequest request, ServletConfig config,
                                           HttpSession session) throws Exception {
        String tenantDomain = "";
        try {
            tenantDomain = request.getParameter("domain");
            TenantServiceClient serviceClient = new TenantServiceClient(config, session);
            TenantInfoBean tenantBean=serviceClient.getTenant(tenantDomain);
            return tenantBean;
        } catch (Exception e) {
            String msg = "Failed to get existing details of the tenant:" + tenantDomain;
            log.error(msg, e);
            throw new Exception(msg, e);
View Full Code Here

Examples of org.apache.stratos.tenant.mgt.ui.clients.TenantServiceClient

    public static void activateTenant(HttpServletRequest request, ServletConfig config,
                                      HttpSession session) throws Exception {
        String tenantDomain = "";
        try {
            tenantDomain = request.getParameter("activate.domain");
            TenantServiceClient serviceClient = new TenantServiceClient(config, session);
            serviceClient.activateTenant(tenantDomain);
        } catch (Exception e) {
            String msg = "Failed to activate the tenant:" + tenantDomain;
            log.error(msg, e);
            throw new Exception(msg, e);
        }
View Full Code Here

Examples of org.apache.stratos.tenant.mgt.ui.clients.TenantServiceClient

    public static void deactivateTenant(HttpServletRequest request, ServletConfig config,
                                        HttpSession session) throws Exception {
        String tenantDomain = "";
        try {
            tenantDomain = request.getParameter("activate.domain");
            TenantServiceClient serviceClient = new TenantServiceClient(config, session);
            serviceClient.deactivateTenant(tenantDomain);
        } catch (Exception e) {
            String msg = "Failed to deactivate the tenant:" + tenantDomain;
            log.error(msg, e);
            throw new Exception(msg, e);
        }
View Full Code Here

Examples of org.wso2.carbon.tenant.mgt.ui.clients.TenantServiceClient

            tenantInfoBean.setAdminPassword(request.getParameter("admin-password"));
            tenantInfoBean.setTenantDomain(request.getParameter("domain"));
            tenantInfoBean.setEmail(request.getParameter("admin-email"));
            tenantInfoBean.setUsagePlan(request.getParameter("usage-plan-name"));
            tenantInfoBean.setCreatedDate(Calendar.getInstance());
            TenantServiceClient serviceClient = new TenantServiceClient(config, session);
            serviceClient.addTenant(tenantInfoBean);
           
        } catch (Exception e) {
            String msg = "Failed to add tenant config. tenant-domain: "
                    + tenantInfoBean.getTenantDomain() + ", " + "tenant-admin: "
                    + tenantInfoBean.getAdmin() + ".";
View Full Code Here

Examples of org.wso2.carbon.tenant.mgt.ui.clients.TenantServiceClient

            tenantInfoBean.setLastname(request.getParameter("admin-lastname"));
            tenantInfoBean.setAdminPassword(request.getParameter("admin-password"));
            tenantInfoBean.setTenantDomain(request.getParameter("domain"));
            tenantInfoBean.setEmail(request.getParameter("admin-email"));
            tenantInfoBean.setUsagePlan(request.getParameter("usage-plan-name"));
            TenantServiceClient serviceClient = new TenantServiceClient(config, session);
            serviceClient.updateTenant(tenantInfoBean);
            //UsagePlanClient usagePlanClient = new UsagePlanClient(config, session);
            //update usage plan(subscription) per tenant
            //usagePlanClient.updateUsagePlan(tenantInfoBean);
        } catch (Exception e) {
            String msg = "Failed to update the tenant config. tenant-domain: "
View Full Code Here

Examples of org.wso2.carbon.tenant.mgt.ui.clients.TenantServiceClient

    public static TenantInfoBean[] getTenants(HttpServletRequest request, ServletConfig config,
                                              HttpSession session) throws Exception {

        try {

            TenantServiceClient serviceClient = new TenantServiceClient(config, session);
            return serviceClient.retrieveTenants();
        } catch (Exception e) {
            String msg = "Failed to get the minimum information bean of tenants. ";
            log.error(msg, e);
            throw new Exception(msg, e);
        }
View Full Code Here

Examples of org.wso2.carbon.tenant.mgt.ui.clients.TenantServiceClient

    public static TenantInfoBean getTenant(HttpServletRequest request, ServletConfig config,
                                           HttpSession session) throws Exception {
        String tenantDomain = "";
        try {
            tenantDomain = request.getParameter("domain");
            TenantServiceClient serviceClient = new TenantServiceClient(config, session);
            TenantInfoBean tenantBean=serviceClient.getTenant(tenantDomain);
            return tenantBean;
        } catch (Exception e) {
            String msg = "Failed to get existing details of the tenant:" + tenantDomain;
            log.error(msg, e);
            throw new Exception(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.