Examples of CloudServicesDescConfig


Examples of org.apache.stratos.common.config.CloudServicesDescConfig

            String msg = "Error in building the cloud service configuration. config filename: " +
                            configFileName + ".";
            log.error(msg, e);
            throw new Exception(msg, e);
        }
        cloudServicesDescConfig = new CloudServicesDescConfig(configElement);
    }
View Full Code Here

Examples of org.apache.stratos.common.config.CloudServicesDescConfig

   
    public CloudService[] retrieveCloudServiceInfo() throws Exception {
        UserRegistry registry = (UserRegistry)getConfigUserRegistry();
        int tenantId = registry.getTenantId();

        CloudServicesDescConfig cloudServicesDesc = Util.getCloudServicesDescConfig();
        Map<String, CloudServiceConfig> cloudServiceConfigs =
                cloudServicesDesc.getCloudServiceConfigs();
        List<CloudService> cloudServices = new ArrayList<CloudService>();
        if (cloudServiceConfigs != null) {
            Set<String> configKeys = cloudServiceConfigs.keySet();
            for (String configKey : configKeys) {
                CloudServiceConfig cloudServiceConfig = cloudServiceConfigs.get(configKey);
View Full Code Here

Examples of org.apache.stratos.common.config.CloudServicesDescConfig

    public void saveCloudServicesActivity(String[] activeServiceNames) throws Exception {
        UserRegistry registry = (UserRegistry)getConfigUserRegistry();
        int tenantId = registry.getTenantId();

        CloudServicesDescConfig cloudServicesDesc = Util.getCloudServicesDescConfig();
        Map<String, CloudServiceConfig> cloudServiceConfigMap =
                cloudServicesDesc.getCloudServiceConfigs();

        List<String> activeServiceNamesList = Arrays.asList(activeServiceNames);
        if (cloudServiceConfigMap != null) {
            for (String cloudServiceName : cloudServiceConfigMap.keySet()) {
                if (activeServiceNamesList.contains(cloudServiceName)) {
View Full Code Here

Examples of org.apache.stratos.common.config.CloudServicesDescConfig

     */
    public static void updateActivation(int tenantId) throws Exception {
        if (tenantId != 0) {
            String serviceName = Util.getServiceName();
            boolean isActive = CloudServicesUtil.isCloudServiceActive(serviceName, tenantId);
            CloudServicesDescConfig cloudServicesDesc =
                                                        CloudServiceConfigParser.loadCloudServicesConfiguration();
            CloudServicesUtil.setCloudServiceActive(!isActive,
                                                    serviceName,
                                                    tenantId,
                                                    cloudServicesDesc.getCloudServiceConfigs()
                                                                     .get(serviceName));
            ActivationManager.setActivation(tenantId, !isActive);
        }
    }
View Full Code Here

Examples of org.apache.stratos.common.config.CloudServicesDescConfig

        return map;
    }*/

    public static Map<String, CloudServiceConfig> getCloudServiceConfigMap() {
        try {
            CloudServicesDescConfig cloudServicesDescConfig = CloudServiceConfigParser.loadCloudServicesConfiguration();
            return cloudServicesDescConfig.getCloudServiceConfigs();
        } catch (Exception e) {
            log.error("Error while getting service names " + e.toString());
        }
        return null;
    }
View Full Code Here

Examples of org.wso2.carbon.common.config.CloudServicesDescConfig

     */
    public static void updateActivation(int tenantId) throws Exception {
        if (tenantId != 0) {
            String serviceName = Util.getServiceName();
            boolean isActive = CloudServicesUtil.isCloudServiceActive(serviceName, tenantId);
            CloudServicesDescConfig cloudServicesDesc =
                                                        CloudServiceConfigParser.loadCloudServicesConfiguration();
            CloudServicesUtil.setCloudServiceActive(!isActive,
                                                    serviceName,
                                                    tenantId,
                                                    cloudServicesDesc.getCloudServiceConfigs()
                                                                     .get(serviceName));
            ActivationManager.setActivation(tenantId, !isActive);
        }
    }
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.