You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/01/07 08:08:30 UTC
[39/42] creating Stratos Manager product
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/dbscripts/wso2_rss.sql
----------------------------------------------------------------------
diff --git a/products/stratos-controller/dbscripts/wso2_rss.sql b/products/stratos-controller/dbscripts/wso2_rss.sql
deleted file mode 100755
index 4a2348f..0000000
--- a/products/stratos-controller/dbscripts/wso2_rss.sql
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-CREATE TABLE RSS_INSTANCE (
- rss_instance_id INTEGER AUTO_INCREMENT,
- name VARCHAR(128) NOT NULL,
- server_url VARCHAR(1024) NOT NULL,
- dbms_type VARCHAR(128) NOT NULL,
- instance_type VARCHAR(128) NOT NULL,
- server_category VARCHAR(128) NOT NULL,
- admin_username VARCHAR(128),
- admin_password VARCHAR(128),
- tenant_id INTEGER NOT NULL,
- UNIQUE (name, tenant_id),
- PRIMARY KEY (rss_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE DATABASE_INSTANCE (
- database_instance_id INTEGER AUTO_INCREMENT,
- name VARCHAR(128) NOT NULL,
- rss_instance_id INTEGER,
- tenant_id INTEGER,
- UNIQUE (name, rss_instance_id),
- PRIMARY KEY (database_instance_id),
- FOREIGN KEY (rss_instance_id) REFERENCES RSS_INSTANCE (rss_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE DATABASE_USER (
- user_id INTEGER AUTO_INCREMENT,
- db_username VARCHAR(128) NOT NULL,
- rss_instance_id INTEGER,
- user_tenant_id INTEGER,
- UNIQUE (db_username, rss_instance_id, user_tenant_id),
- PRIMARY KEY (user_id),
- FOREIGN KEY (rss_instance_id) REFERENCES RSS_INSTANCE (rss_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE DATABASE_INSTANCE_PROPERTY (
- db_property_id INTEGER AUTO_INCREMENT,
- prop_name VARCHAR(128) NOT NULL,
- prop_value TEXT,
- database_instance_id INTEGER,
- UNIQUE (prop_name, database_instance_id),
- PRIMARY KEY (db_property_id),
- FOREIGN KEY (database_instance_id) REFERENCES DATABASE_INSTANCE (database_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE USER_DATABASE_ENTRY (
- user_id INTEGER,
- database_instance_id INTEGER,
- PRIMARY KEY (user_id, database_instance_id),
- FOREIGN KEY (user_id) REFERENCES DATABASE_USER (user_id),
- FOREIGN KEY (database_instance_id) REFERENCES DATABASE_INSTANCE (database_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE USER_DATABASE_PERMISSION (
- user_id INTEGER,
- database_instance_id INTEGER,
- perm_name VARCHAR(128) NOT NULL,
- perm_value VARCHAR(128),
- PRIMARY KEY (user_id, database_instance_id, perm_name),
- FOREIGN KEY (user_id) REFERENCES DATABASE_USER (user_id),
- FOREIGN KEY (database_instance_id) REFERENCES DATABASE_INSTANCE (database_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE WSO2_RSS_DATABASE_INSTANCE_COUNT (
- instance_count INTEGER NOT NULL DEFAULT 0
-) ENGINE="InnoDB";
-
-CREATE TABLE USER_PRIVILEGE_GROUP (
- priv_group_id INTEGER AUTO_INCREMENT,
- priv_group_name VARCHAR(128),
- tenant_id INTEGER,
- PRIMARY KEY (priv_group_id, priv_group_name, tenant_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE USER_PRIVILEGE_GROUP_ENTRY (
- priv_group_id INTEGER,
- perm_name VARCHAR(128),
- perm_value CHAR(1),
- PRIMARY KEY (priv_group_id, perm_name),
- FOREIGN KEY (priv_group_id) REFERENCES USER_PRIVILEGE_GROUP (priv_group_id)
-) ENGINE="InnoDB";
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/cloud-service-mgt/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/cloud-service-mgt/pom.xml b/products/stratos-controller/modules/cloud-service-mgt/pom.xml
deleted file mode 100644
index 1d5c32c..0000000
--- a/products/stratos-controller/modules/cloud-service-mgt/pom.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.apache.stratos</groupId>
- <artifactId>stratos-controller-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.apache.stratos.manager.services.mgt</artifactId>
- <packaging>bundle</packaging>
- <name>Apache Stratos - Cloud Manager Cloud Services Management</name>
-
- <build>
-
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-scr-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-Name>${project.artifactId}</Bundle-Name>
- <Private-Package>
- org.apache.stratos.manager.services.mgt.*,
- </Private-Package>
- <Import-Package>
- org.wso2.carbon.registry.core.*;version=1.0.1,
- !javax.xml.namespace,
- javax.xml.namespace; version=0.0.0,
- javax.servlet; version=2.4.0,
- javax.servlet.http; version=2.4.0,
- org.apache.axiom.*; version="${axiom.osgi.version.range}",
- *;resolution:=optional
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
-
- </build>
- <dependencies>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.registry.core</artifactId>
- <version>${wso2carbon.version}</version>
- </dependency>
- <!--<dependency>-->
- <!--<groupId>org.wso2.carbon</groupId>-->
- <!--<artifactId>org.wso2.carbon.registry.extensions</artifactId>-->
- <!--<version>${registry-component.version}</version>-->
- <!--</dependency>-->
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.registry.resource</artifactId>
- <version>${wso2carbon.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.stratos</groupId>
- <artifactId>org.apache.stratos.common</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.stratos</groupId>
- <artifactId>org.apache.stratos.tenant.mgt</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/beans/CloudService.java
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/beans/CloudService.java b/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/beans/CloudService.java
deleted file mode 100644
index 7648280..0000000
--- a/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/beans/CloudService.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.services.mgt.beans;
-
-public class CloudService {
- private String name;
- private String label;
- private String link;
- private String icon;
- private String description;
- private boolean active;
- private String productPageURL;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getLabel() {
- return label;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public String getLink() {
- return link;
- }
-
- public void setLink(String link) {
- this.link = link;
- }
-
- public String getIcon() {
- return icon;
- }
-
- public void setIcon(String icon) {
- this.icon = icon;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public boolean isActive() {
- return active;
- }
-
- public void setActive(boolean active) {
- this.active = active;
- }
-
- public String getProductPageURL() {
- return productPageURL;
- }
-
- public void setProductPageURL(String productPageURL) {
- this.productPageURL = productPageURL;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/internal/CloudServiceMgtServiceComponent.java
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/internal/CloudServiceMgtServiceComponent.java b/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/internal/CloudServiceMgtServiceComponent.java
deleted file mode 100644
index 770a47d..0000000
--- a/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/internal/CloudServiceMgtServiceComponent.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.services.mgt.internal;
-
-import org.apache.stratos.manager.services.mgt.util.Util;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.wso2.carbon.user.core.service.RealmService;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.osgi.service.component.ComponentContext;
-
-/**
- * @scr.component name="org.apache.stratos.manager.services.mgt"
- * immediate="true"
- * @scr.reference name="registry.service"
- * interface="org.wso2.carbon.registry.core.service.RegistryService" cardinality="1..1"
- * policy="dynamic" bind="setRegistryService" unbind="unsetRegistryService"
- * @scr.reference name="user.realmservice.default"
- * interface="org.wso2.carbon.user.core.service.RealmService"
- * cardinality="1..1" policy="dynamic" bind="setRealmService"
- * unbind="unsetRealmService"
- */
-public class CloudServiceMgtServiceComponent {
- private static Log log = LogFactory.getLog(CloudServiceMgtServiceComponent.class);
-
- protected void activate(ComponentContext context) {
- try {
- Util.loadCloudServicesConfiguration();
- Util.loadServiceIcons();
- log.debug("******* Cloud Manager Service Manager bundle is activated ******* ");
- } catch (Throwable e) {
- String msg = "******* Cloud Manager Service Manager bundle activation failed. ******* ";
- log.error(msg, e);
- }
- }
-
- protected void deactivate(ComponentContext context) {
- log.debug("******* Cloud Manager Service Manager bundle is deactivated ******* ");
- }
- protected void setRegistryService(RegistryService registryService) {
- Util.setRegistryService(registryService);
- }
-
- protected void unsetRegistryService(RegistryService registryService) {
- Util.setRegistryService(null);
- }
-
- protected void setRealmService(RealmService realmService) {
- Util.setRealmService(realmService);
- }
-
- protected void unsetRealmService(RealmService realmService) {
- Util.setRealmService(null);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/services/CloudManagerService.java
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/services/CloudManagerService.java b/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/services/CloudManagerService.java
deleted file mode 100644
index f12a4bb..0000000
--- a/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/services/CloudManagerService.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.services.mgt.services;
-
-import org.wso2.carbon.core.AbstractAdmin;
-import org.wso2.carbon.registry.core.session.UserRegistry;
-import org.apache.stratos.common.config.CloudServiceConfig;
-import org.apache.stratos.common.config.CloudServicesDescConfig;
-import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.manager.services.mgt.beans.CloudService;
-import org.apache.stratos.manager.services.mgt.util.Util;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-public class CloudManagerService extends AbstractAdmin {
-
- 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);
- String label = cloudServiceConfig.getLabel();
- if (label == null) {
- // we are only returning display-able services
- continue;
- }
- CloudService cloudService = new CloudService();
- String name = cloudServiceConfig.getName();
- cloudService.setName(name);
- cloudService.setLabel(label);
- cloudService.setLink(cloudServiceConfig.getLink());
- cloudService.setIcon(cloudServiceConfig.getIcon());
- cloudService.setDescription(cloudServiceConfig.getDescription());
- cloudService.setProductPageURL(cloudServiceConfig.getProductPageURL());
- boolean active = Util.isCloudServiceActive(name, tenantId);
- cloudService.setActive(tenantId == 0 || active);
-
- cloudServices.add(cloudService);
- }
- }
- return cloudServices.toArray(new CloudService[cloudServices.size()]);
- }
-
- 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)) {
- // this should be made active
- if (!Util.isCloudServiceActive(cloudServiceName, tenantId)) {
- Util.setCloudServiceActive(true, cloudServiceName, tenantId);
- }
- } else {
- // this should be made inactive
- if (Util.isCloudServiceActive(cloudServiceName, tenantId)) {
- Util.setCloudServiceActive(false, cloudServiceName, tenantId);
- }
-
- }
- }
- }
- Util.setCloudServiceActive(true, StratosConstants.CLOUD_IDENTITY_SERVICE, tenantId);
- Util.setCloudServiceActive(true, StratosConstants.CLOUD_GOVERNANCE_SERVICE, tenantId);
- }
-
- public void activate(String cloudServiceName) throws Exception {
- UserRegistry registry = (UserRegistry) getConfigUserRegistry();
- int tenantId = registry.getTenantId();
- if (!Util.isCloudServiceActive(cloudServiceName, tenantId)) {
- Util.setCloudServiceActive(true, cloudServiceName, tenantId);
- }
- }
-
- public void deactivate(String cloudServiceName) throws Exception {
- if (StratosConstants.CLOUD_IDENTITY_SERVICE.equals(cloudServiceName) ||
- StratosConstants.CLOUD_GOVERNANCE_SERVICE.equals(cloudServiceName)) {
- // cloud identity and governance services cannot be deactivated..
- return;
- }
- UserRegistry registry = (UserRegistry) getConfigUserRegistry();
- int tenantId = registry.getTenantId();
- if (Util.isCloudServiceActive(cloudServiceName, tenantId)) {
- Util.setCloudServiceActive(false, cloudServiceName, tenantId);
- }
- }
-}
-
-
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/util/Constants.java
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/util/Constants.java b/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/util/Constants.java
deleted file mode 100644
index 0f91d7e..0000000
--- a/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/util/Constants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.services.mgt.util;
-
-public class Constants {
- public static final String CLOUD_SERVICE_INFO_STORE_PATH =
- "/repository/components/org.apache.stratos/cloud-manager/cloud-services";
- public static final String CLOUD_SERVICE_ICONS_STORE_PATH =
- "/repository/components/org.apache.stratos/cloud-manager/" +
- "cloud-services-icons";
-
- public static final String CLOUD_SERVICE_IS_ACTIVE_PROP_KEY = "active";
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/util/Util.java
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/util/Util.java b/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/util/Util.java
deleted file mode 100644
index 904537f..0000000
--- a/products/stratos-controller/modules/cloud-service-mgt/src/main/java/org/apache/stratos/manager/services/mgt/util/Util.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.services.mgt.util;
-
-import org.wso2.carbon.registry.core.Collection;
-import org.wso2.carbon.registry.core.RegistryConstants;
-import org.wso2.carbon.registry.core.Resource;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.wso2.carbon.registry.core.session.UserRegistry;
-import org.apache.stratos.common.config.CloudServiceConfig;
-import org.apache.stratos.common.config.CloudServicesDescConfig;
-import org.apache.stratos.common.config.PermissionConfig;
-import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.common.util.CommonUtil;
-import org.wso2.carbon.user.api.RealmConfiguration;
-import org.wso2.carbon.user.core.service.RealmService;
-import org.wso2.carbon.user.core.tenant.TenantManager;
-import org.wso2.carbon.user.mgt.UserMgtConstants;
-import org.wso2.carbon.utils.CarbonUtils;
-
-import org.apache.axiom.om.OMElement;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.activation.MimetypesFileTypeMap;
-
-public class Util {
-
- private static final Log log = LogFactory.getLog(Util.class);
-
- private static final String CONFIG_FILENAME = "cloud-services-desc.xml";
-
- private static RegistryService registryService;
- private static RealmService realmService;
- private static CloudServicesDescConfig cloudServicesDescConfig = null;
-
- public static synchronized void setRegistryService(RegistryService service) {
- if ((registryService == null) || (service == null)) {
- registryService = service;
- }
- }
-
- public static RegistryService getRegistryService() {
- return registryService;
- }
-
- public static synchronized void setRealmService(RealmService service) {
- if ((realmService == null) || (service == null)) {
- realmService = service;
- }
- }
-
- public static RealmService getRealmService() {
- return realmService;
- }
-
- public static TenantManager getTenantManager() {
- return realmService.getTenantManager();
- }
-
- public static RealmConfiguration getBootstrapRealmConfiguration() {
- return realmService.getBootstrapRealmConfiguration();
- }
-
- public static UserRegistry getTenantZeroSystemGovernanceRegistry() throws RegistryException {
- return registryService.getGovernanceSystemRegistry();
- }
-
- public static UserRegistry getSystemGovernanceRegistry(int tenantId) throws RegistryException {
- return registryService.getGovernanceSystemRegistry(tenantId);
- }
-
- public static UserRegistry getSystemConfigRegistry(int tenantId) throws RegistryException {
- return registryService.getConfigSystemRegistry(tenantId);
- }
-
- public static void loadCloudServicesConfiguration() throws Exception {
- // now load the cloud services configuration
- String configFileName =
- CarbonUtils.getCarbonConfigDirPath() + File.separator + StratosConstants.MULTITENANCY_CONFIG_FOLDER +
- File.separator+ CONFIG_FILENAME;
- OMElement configElement;
- try {
- configElement = CommonUtil.buildOMElement(new FileInputStream(configFileName));
- } catch (Exception e) {
- 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);
- }
-
- public static CloudServicesDescConfig getCloudServicesDescConfig() {
- return cloudServicesDescConfig;
- }
-
- public static CloudServiceConfig getCloudServiceConfig(String cloudServiceName) {
- Map<String, CloudServiceConfig> cloudServiceConfigs =
- cloudServicesDescConfig.getCloudServiceConfigs();
- return cloudServiceConfigs.get(cloudServiceName);
- }
-
- public static void setCloudServiceActive(boolean active, String cloudServiceName,
- int tenantId)throws Exception {
- CloudServiceConfig cloudServiceConfig = getCloudServiceConfig(cloudServiceName);
- if (cloudServiceConfig.getLabel() == null) {
- // for the non-labeled services, we are not setting/unsetting the service active
- return;
- }
-
- UserRegistry tenantZeroSystemGovernanceRegistry;
- UserRegistry systemConfigRegistry;
- try {
- tenantZeroSystemGovernanceRegistry = Util.getTenantZeroSystemGovernanceRegistry();
- systemConfigRegistry = Util.getSystemConfigRegistry(tenantId);
- } catch (RegistryException e) {
- String msg = "Error in getting the tenant 0 system config registry";
- log.error(msg, e);
- throw new Exception(msg, e);
- }
-
- String cloudServiceInfoPath =
- Constants.CLOUD_SERVICE_INFO_STORE_PATH + RegistryConstants.PATH_SEPARATOR +
- tenantId + RegistryConstants.PATH_SEPARATOR + cloudServiceName;
- Resource cloudServiceInfoResource;
- if (tenantZeroSystemGovernanceRegistry.resourceExists(cloudServiceInfoPath)) {
- cloudServiceInfoResource = tenantZeroSystemGovernanceRegistry.get(cloudServiceInfoPath);
- } else {
- cloudServiceInfoResource = tenantZeroSystemGovernanceRegistry.newCollection();
- }
- cloudServiceInfoResource.setProperty(Constants.CLOUD_SERVICE_IS_ACTIVE_PROP_KEY,
- active ? "true" : "false");
- tenantZeroSystemGovernanceRegistry.put(cloudServiceInfoPath, cloudServiceInfoResource);
-
- // then we will copy the permissions
- List<PermissionConfig> permissionConfigs = cloudServiceConfig.getPermissionConfigs();
- for (PermissionConfig permissionConfig : permissionConfigs) {
- String path = permissionConfig.getPath();
- String name = permissionConfig.getName();
- if (active) {
- if (!systemConfigRegistry.resourceExists(path)) {
- Collection collection = systemConfigRegistry.newCollection();
- collection.setProperty(UserMgtConstants.DISPLAY_NAME, name);
- systemConfigRegistry.put(path, collection);
- }
- } else {
- if (systemConfigRegistry.resourceExists(path)) {
- systemConfigRegistry.delete(path);
- }
- }
- }
- }
-
- public static boolean isCloudServiceActive(String cloudServiceName,
- int tenantId)throws Exception {
- UserRegistry systemGovernanceRegistry;
- try {
- systemGovernanceRegistry = Util.getTenantZeroSystemGovernanceRegistry();
- } catch (RegistryException e) {
- String msg = "Error in getting the tenant 0 system config registry";
- log.error(msg, e);
- throw new Exception(msg, e);
- }
-
- String cloudServiceInfoPath =
- Constants.CLOUD_SERVICE_INFO_STORE_PATH + RegistryConstants.PATH_SEPARATOR +
- tenantId + RegistryConstants.PATH_SEPARATOR + cloudServiceName;
-
- if (systemGovernanceRegistry.resourceExists(cloudServiceInfoPath)) {
- Resource cloudServiceInfoResource = systemGovernanceRegistry.get(cloudServiceInfoPath);
- String isActiveStr = cloudServiceInfoResource.getProperty(
- Constants.CLOUD_SERVICE_IS_ACTIVE_PROP_KEY);
- return "true".equals(isActiveStr);
- }
-
- return false;
- }
-
- /**
- * Currently this is not used, as the icons are loaded from the webapps
- *
- * @throws Exception
- */
- public static void loadServiceIcons() throws Exception {
- String serviceIconDirLocation =
- CarbonUtils.getCarbonHome() + "/resources/cloud-service-icons";
- File serviceIconDirDir = new File(serviceIconDirLocation);
- UserRegistry registry = getTenantZeroSystemGovernanceRegistry();
- try {
- // adding the common media types
- Map<String, String> extensionToMediaTypeMap = new HashMap<String, String>();
- extensionToMediaTypeMap.put("gif", "img/gif");
- extensionToMediaTypeMap.put("jpg", "img/gif");
- extensionToMediaTypeMap.put("png", "img/png");
-
- File[] filesAndDirs = serviceIconDirDir.listFiles();
- if (filesAndDirs == null) {
- return;
- }
- List<File> filesDirs = Arrays.asList(filesAndDirs);
-
- for (File file : filesDirs) {
- String filename = file.getName();
- String fileRegistryPath = Constants.CLOUD_SERVICE_ICONS_STORE_PATH +
- RegistryConstants.PATH_SEPARATOR + filename;
-
- // Add the file to registry
- Resource newResource = registry.newResource();
- String mediaType = null;
- if (filename.contains(".")) {
- String fileExt = filename.substring(filename.lastIndexOf(".") + 1);
- mediaType = extensionToMediaTypeMap.get(fileExt.toLowerCase());
- }
- if (mediaType == null) {
- mediaType = new MimetypesFileTypeMap().getContentType(file);
- }
- newResource.setMediaType(mediaType);
- newResource.setContentStream(new FileInputStream(file));
- registry.put(fileRegistryPath, newResource);
- }
- } catch (Exception e) {
- String msg = "Error loading icons to the system registry for registry path: " +
- Constants.CLOUD_SERVICE_ICONS_STORE_PATH;
- log.error(msg, e);
- throw new Exception(msg, e);
- }
-
- try {
- CommonUtil.setAnonAuthorization(RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH +
- Constants.CLOUD_SERVICE_ICONS_STORE_PATH, registry.getUserRealm());
- } catch (RegistryException e) {
- String msg = "Setting the annon access enabled for the services icons paths.";
- log.error(msg, e);
- throw new Exception(msg, e);
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/cloud-service-mgt/src/main/resources/META-INF/component.xml
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/cloud-service-mgt/src/main/resources/META-INF/component.xml b/products/stratos-controller/modules/cloud-service-mgt/src/main/resources/META-INF/component.xml
deleted file mode 100644
index 29bdc6b..0000000
--- a/products/stratos-controller/modules/cloud-service-mgt/src/main/resources/META-INF/component.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- # Licensed to the Apache Software Foundation (ASF) under one
- # or more contributor license agreements. See the NOTICE file
- # distributed with this work for additional information
- # regarding copyright ownership. The ASF licenses this file
- # to you under the Apache License, Version 2.0 (the
- # "License"); you may not use this file except in compliance
- # with the License. You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing,
- # software distributed under the License is distributed on an
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- # KIND, either express or implied. See the License for the
- # specific language governing permissions and limitations
- # under the License.
- -->
-
-<component xmlns="http://products.wso2.org/carbon">
- <ManagementPermissions>
- <ManagementPermission>
- <DisplayName>Configure</DisplayName>
- <ResourceId>/permission/admin/configure</ResourceId>
- </ManagementPermission>
- <ManagementPermission>
- <DisplayName>Cloud-Services</DisplayName>
- <ResourceId>/permission/admin/configure/cloud-services</ResourceId>
- </ManagementPermission>
- </ManagementPermissions>
-</component>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/cloud-service-mgt/src/main/resources/META-INF/services.xml
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/cloud-service-mgt/src/main/resources/META-INF/services.xml b/products/stratos-controller/modules/cloud-service-mgt/src/main/resources/META-INF/services.xml
deleted file mode 100644
index efc772e..0000000
--- a/products/stratos-controller/modules/cloud-service-mgt/src/main/resources/META-INF/services.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- # Licensed to the Apache Software Foundation (ASF) under one
- # or more contributor license agreements. See the NOTICE file
- # distributed with this work for additional information
- # regarding copyright ownership. The ASF licenses this file
- # to you under the Apache License, Version 2.0 (the
- # "License"); you may not use this file except in compliance
- # with the License. You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing,
- # software distributed under the License is distributed on an
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- # KIND, either express or implied. See the License for the
- # specific language governing permissions and limitations
- # under the License.
- -->
-<serviceGroup>
- <service name="CloudManagerService" scope="transportsession">
- <transports>
- <transport>https</transport>
- </transports>
- <parameter name="ServiceClass" locked="false">
- org.apache.stratos.manager.services.mgt.services.CloudManagerService
- </parameter>
- <operation name="retrieveCloudServiceInfo">
- <parameter name="AuthorizationAction" locked="true">/permission/admin/login</parameter>
- </operation>
- <operation name="saveCloudServicesActivity">
- <parameter name="AuthorizationAction" locked="true">/permission/admin/configure/cloud-services</parameter>
- </operation>
- <operation name="activate">
- <parameter name="AuthorizationAction" locked="true">/permission/admin/configure/cloud-services</parameter>
- </operation>
- <operation name="deactivate">
- <parameter name="AuthorizationAction" locked="true">/permission/admin/configure/cloud-services</parameter>
- </operation>
- </service>
- <parameter name="adminService" locked="true">true</parameter>
- <parameter name="hiddenService" locked="true">true</parameter>
-</serviceGroup>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/dashboard/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/dashboard/pom.xml b/products/stratos-controller/modules/dashboard/pom.xml
deleted file mode 100644
index 53f286f..0000000
--- a/products/stratos-controller/modules/dashboard/pom.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.apache.stratos</groupId>
- <artifactId>stratos-controller-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.apache.stratos.manager.dashboard.ui</artifactId>
- <packaging>bundle</packaging>
- <name>Apache Stratos - Cloud Manager Dashboard User Interface</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
-
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-Name>${project.artifactId}</Bundle-Name>
- <Export-Package>
- org.apache.stratos.manager.dashboard.ui.*,
- </Export-Package>
- <Import-Package>
- org.wso2.carbon.ui.servlets.*,
- javax.servlet; version=2.4.0,
- javax.servlet.http; version=2.4.0,
- org.apache.lucene.*,
- *;resolution:=optional
- </Import-Package>
- <Carbon-Component>UIBundle</Carbon-Component>
- </instructions>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
-
- <dependencies>
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.registry.common.ui</artifactId>
- <version>${wso2carbon.version}</version>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.registry.core</artifactId>
- <version>${wso2carbon.version}</version>
- </dependency>
-
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.axis2.wso2</groupId>
- <artifactId>axis2</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ws.commons.axiom.wso2</groupId>
- <artifactId>axiom</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.ui</artifactId>
- <version>${wso2carbon.version}</version>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.core</artifactId>
- <version>${wso2carbon.version}</version>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.registry.profiles.ui</artifactId>
- <version>${registry-component.version}</version>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.registry.resource.ui</artifactId>
- <version>${governance-component.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.stratos</groupId>
- <artifactId>org.apache.stratos.account.mgt.ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.stratos</groupId>
- <artifactId>org.apache.stratos.common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.stratos</groupId>
- <artifactId>org.apache.stratos.manager.dashboard.stub</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <properties>
- <eclipse.version>3.2.0</eclipse.version>
- <!-- Component versions == Carbon version, if not, please change the properties below. -->
- <registry-component.version>4.2.0</registry-component.version>
- <governance-component.version>4.2.0</governance-component.version>
- </properties>
-
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/dashboard/src/main/java/org/apache/stratos/manager/dashboard/ui/clients/CloudManagerServiceClient.java
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/dashboard/src/main/java/org/apache/stratos/manager/dashboard/ui/clients/CloudManagerServiceClient.java b/products/stratos-controller/modules/dashboard/src/main/java/org/apache/stratos/manager/dashboard/ui/clients/CloudManagerServiceClient.java
deleted file mode 100644
index cdd9b16..0000000
--- a/products/stratos-controller/modules/dashboard/src/main/java/org/apache/stratos/manager/dashboard/ui/clients/CloudManagerServiceClient.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.dashboard.ui.clients;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.CarbonConstants;
-import org.wso2.carbon.context.CarbonContext;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.ui.CarbonUIUtil;
-import org.wso2.carbon.utils.ServerConstants;
-import org.apache.stratos.manager.dashboard.stub.CloudManagerServiceStub;
-import org.apache.stratos.manager.dashboard.stub.xsd.CloudService;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpSession;
-
-public class CloudManagerServiceClient {
- private static final Log log = LogFactory.getLog(CloudManagerServiceClient.class);
-
- private CloudManagerServiceStub stub;
- private String epr;
- public static final String CLOUD_SERVICE = "cloudService";
-
- public CloudManagerServiceClient(
- String cookie, String backendServerURL, ConfigurationContext configContext)
- throws RegistryException {
-
- epr = backendServerURL + "CloudManagerService";
-
- try {
- stub = new CloudManagerServiceStub(configContext, epr);
-
- ServiceClient client = stub._getServiceClient();
- Options option = client.getOptions();
- option.setManageSession(true);
- option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
-
- } catch (AxisFault axisFault) {
- String msg = "Failed to initiate AddServices service client. " + axisFault.getMessage();
- log.error(msg, axisFault);
- throw new RegistryException(msg, axisFault);
- }
- }
-
- public CloudManagerServiceClient(ServletRequest request, ServletConfig config, HttpSession session)
- throws RegistryException {
-
- String cookie = (String)session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext = (ConfigurationContext) config.
- getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
- epr = backendServerURL + "CloudManagerService";
-
- try {
- stub = new CloudManagerServiceStub(configContext, epr);
-
- ServiceClient client = stub._getServiceClient();
- Options option = client.getOptions();
- option.setManageSession(true);
- option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
-
- } catch (AxisFault axisFault) {
- String msg = "Failed to initiate Add Services service client. " + axisFault.getMessage();
- log.error(msg, axisFault);
- throw new RegistryException(msg, axisFault);
- }
- }
-
- public CloudService[] retrieveCloudServiceInfo() throws Exception {
- /*try {
- if (CarbonContext.getCurrentContext().getCache(null).containsKey(CLOUD_SERVICE)) {
- return (CloudService[]) CarbonContext.getCurrentContext()
- .getCache(null).get(CLOUD_SERVICE);
- }
- } catch (Exception ignored) {
- // TODO: this exception needs not be handled, but the situation which leads to this
- // exception needs to be.
- }
- CloudService[] cloudServices = stub.retrieveCloudServiceInfo();
- CarbonContext.getCurrentContext().getCache(null).put(CLOUD_SERVICE, cloudServices);
- return cloudServices;*/
- return null;
- }
-
-
- public void saveCloudServicesActivity(String[] activeServiceNames) throws Exception {
- /* CloudService[] cloudServices =
- (CloudService[]) CarbonContext.getCurrentContext().getCache(null).get(CLOUD_SERVICE);
-
- for (CloudService cloudService : cloudServices) {
- for (String activeService : activeServiceNames) {
- if (cloudService.getName().equals(activeService)) {
- cloudService.setActive(true);
- break;
- } else {
- cloudService.setActive(false);
- }
- }
- }
-
- stub.saveCloudServicesActivity(activeServiceNames);*/
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/dashboard/src/main/java/org/apache/stratos/manager/dashboard/ui/utils/Util.java
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/dashboard/src/main/java/org/apache/stratos/manager/dashboard/ui/utils/Util.java b/products/stratos-controller/modules/dashboard/src/main/java/org/apache/stratos/manager/dashboard/ui/utils/Util.java
deleted file mode 100644
index 9d3e1a1..0000000
--- a/products/stratos-controller/modules/dashboard/src/main/java/org/apache/stratos/manager/dashboard/ui/utils/Util.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.dashboard.ui.utils;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Util {
- public static List<String> getNewlyActivatedServices(List<String> oldActivateServices,
- List<String> newActivateServices) {
- List<String> newlyActivatedServices = new ArrayList<String>();
- for (String service: newActivateServices) {
- if (!oldActivateServices.contains(service)) {
- newlyActivatedServices.add(service);
- }
- }
- return newlyActivatedServices;
- }
- public static List<String> getNewlyDeactivatedServices(List<String> oldActivateServices,
- List<String> newActivateServices) {
- List<String> newlyDeactivatedServices = new ArrayList<String>();
- for (String service: oldActivateServices) {
- if (!newActivateServices.contains(service)) {
- newlyDeactivatedServices.add(service);
- }
- }
- return newlyDeactivatedServices;
- }
-
-
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/dashboard/src/main/resources/CloudManagerService.wsdl
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/dashboard/src/main/resources/CloudManagerService.wsdl b/products/stratos-controller/modules/dashboard/src/main/resources/CloudManagerService.wsdl
deleted file mode 100644
index ff3fc7b..0000000
--- a/products/stratos-controller/modules/dashboard/src/main/resources/CloudManagerService.wsdl
+++ /dev/null
@@ -1,331 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- -->
-
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd"
- xmlns:ns="http://services.mgt.services.manager.stratos.apache.org"
- xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
- xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
- xmlns:ax2298="http://beans.mgt.services.manager.stratos.apache.org/xsd"
- xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
- xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
- targetNamespace="http://services.mgt.services.manager.stratos.apache.org">
- <wsdl:documentation>CloudManagerService</wsdl:documentation>
- <wsdl:types>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified"
- targetNamespace="http://beans.mgt.services.manager.stratos.apache.org/xsd">
- <xs:complexType name="CloudService">
- <xs:sequence>
- <xs:element minOccurs="0" name="active" type="xs:boolean"/>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="icon" nillable="true" type="xs:string"/>
-
- <xs:element minOccurs="0" name="label" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="link" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="productPageURL" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- <xs:schema xmlns:ax2299="http://beans.mgt.services.manager.stratos.apache.org/xsd"
- attributeFormDefault="qualified" elementFormDefault="qualified"
- targetNamespace="http://services.mgt.services.manager.stratos.apache.org">
- <xs:import namespace="http://beans.mgt.services.manager.stratos.apache.org/xsd"/>
-
- <xs:element name="CloudManagerServiceException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="CloudManagerServiceException" nillable="true"
- type="ns:Exception"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:complexType name="Exception">
- <xs:sequence>
-
- <xs:element minOccurs="0" name="Message" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- <xs:element name="saveCloudServicesActivity">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="activeServiceNames" nillable="true"
- type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
-
- </xs:element>
- <xs:element name="retrieveCloudServiceInfo">
- <xs:complexType>
- <xs:sequence/>
- </xs:complexType>
- </xs:element>
- <xs:element name="retrieveCloudServiceInfoResponse">
- <xs:complexType>
- <xs:sequence>
-
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true"
- type="ax2299:CloudService"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="deactivate">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="cloudServiceName" nillable="true" type="xs:string"/>
- </xs:sequence>
-
- </xs:complexType>
- </xs:element>
- <xs:element name="activate">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="cloudServiceName" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- </xs:schema>
- </wsdl:types>
- <wsdl:message name="saveCloudServicesActivityRequest">
- <wsdl:part name="parameters" element="ns:saveCloudServicesActivity"/>
- </wsdl:message>
- <wsdl:message name="saveCloudServicesActivityResponse"/>
- <wsdl:message name="CloudManagerServiceException">
- <wsdl:part name="parameters" element="ns:CloudManagerServiceException"/>
- </wsdl:message>
-
- <wsdl:message name="activateRequest">
- <wsdl:part name="parameters" element="ns:activate"/>
- </wsdl:message>
- <wsdl:message name="activateResponse"/>
- <wsdl:message name="retrieveCloudServiceInfoRequest">
- <wsdl:part name="parameters" element="ns:retrieveCloudServiceInfo"/>
- </wsdl:message>
- <wsdl:message name="retrieveCloudServiceInfoResponse">
- <wsdl:part name="parameters" element="ns:retrieveCloudServiceInfoResponse"/>
-
- </wsdl:message>
- <wsdl:message name="deactivateRequest">
- <wsdl:part name="parameters" element="ns:deactivate"/>
- </wsdl:message>
- <wsdl:message name="deactivateResponse"/>
- <wsdl:portType name="CloudManagerServicePortType">
- <wsdl:operation name="saveCloudServicesActivity">
- <wsdl:input message="ns:saveCloudServicesActivityRequest" wsaw:Action="urn:saveCloudServicesActivity"/>
- <wsdl:output message="ns:saveCloudServicesActivityResponse"
- wsaw:Action="urn:saveCloudServicesActivityResponse"/>
-
- <wsdl:fault message="ns:CloudManagerServiceException" name="CloudManagerServiceException"
- wsaw:Action="urn:saveCloudServicesActivityCloudManagerServiceException"/>
- </wsdl:operation>
- <wsdl:operation name="activate">
- <wsdl:input message="ns:activateRequest" wsaw:Action="urn:activate"/>
- <wsdl:output message="ns:activateResponse" wsaw:Action="urn:activateResponse"/>
- <wsdl:fault message="ns:CloudManagerServiceException" name="CloudManagerServiceException"
- wsaw:Action="urn:activateCloudManagerServiceException"/>
- </wsdl:operation>
- <wsdl:operation name="retrieveCloudServiceInfo">
- <wsdl:input message="ns:retrieveCloudServiceInfoRequest" wsaw:Action="urn:retrieveCloudServiceInfo"/>
-
- <wsdl:output message="ns:retrieveCloudServiceInfoResponse"
- wsaw:Action="urn:retrieveCloudServiceInfoResponse"/>
- <wsdl:fault message="ns:CloudManagerServiceException" name="CloudManagerServiceException"
- wsaw:Action="urn:retrieveCloudServiceInfoCloudManagerServiceException"/>
- </wsdl:operation>
- <wsdl:operation name="deactivate">
- <wsdl:input message="ns:deactivateRequest" wsaw:Action="urn:deactivate"/>
- <wsdl:output message="ns:deactivateResponse" wsaw:Action="urn:deactivateResponse"/>
- <wsdl:fault message="ns:CloudManagerServiceException" name="CloudManagerServiceException"
- wsaw:Action="urn:deactivateCloudManagerServiceException"/>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="CloudManagerServiceSoap11Binding" type="ns:CloudManagerServicePortType">
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
- <wsdl:operation name="saveCloudServicesActivity">
- <soap:operation soapAction="urn:saveCloudServicesActivity" style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
-
- </wsdl:output>
- <wsdl:fault name="CloudManagerServiceException">
- <soap:fault use="literal" name="CloudManagerServiceException"/>
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="activate">
- <soap:operation soapAction="urn:activate" style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
-
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- <wsdl:fault name="CloudManagerServiceException">
- <soap:fault use="literal" name="CloudManagerServiceException"/>
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="retrieveCloudServiceInfo">
-
- <soap:operation soapAction="urn:retrieveCloudServiceInfo" style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- <wsdl:fault name="CloudManagerServiceException">
- <soap:fault use="literal" name="CloudManagerServiceException"/>
-
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="deactivate">
- <soap:operation soapAction="urn:deactivate" style="document"/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
-
- </wsdl:output>
- <wsdl:fault name="CloudManagerServiceException">
- <soap:fault use="literal" name="CloudManagerServiceException"/>
- </wsdl:fault>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:binding name="CloudManagerServiceSoap12Binding" type="ns:CloudManagerServicePortType">
- <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
- <wsdl:operation name="saveCloudServicesActivity">
-
- <soap12:operation soapAction="urn:saveCloudServicesActivity" style="document"/>
- <wsdl:input>
- <soap12:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal"/>
- </wsdl:output>
- <wsdl:fault name="CloudManagerServiceException">
- <soap12:fault use="literal" name="CloudManagerServiceException"/>
-
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="activate">
- <soap12:operation soapAction="urn:activate" style="document"/>
- <wsdl:input>
- <soap12:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal"/>
-
- </wsdl:output>
- <wsdl:fault name="CloudManagerServiceException">
- <soap12:fault use="literal" name="CloudManagerServiceException"/>
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="retrieveCloudServiceInfo">
- <soap12:operation soapAction="urn:retrieveCloudServiceInfo" style="document"/>
- <wsdl:input>
- <soap12:body use="literal"/>
-
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal"/>
- </wsdl:output>
- <wsdl:fault name="CloudManagerServiceException">
- <soap12:fault use="literal" name="CloudManagerServiceException"/>
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="deactivate">
-
- <soap12:operation soapAction="urn:deactivate" style="document"/>
- <wsdl:input>
- <soap12:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal"/>
- </wsdl:output>
- <wsdl:fault name="CloudManagerServiceException">
- <soap12:fault use="literal" name="CloudManagerServiceException"/>
-
- </wsdl:fault>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:binding name="CloudManagerServiceHttpBinding" type="ns:CloudManagerServicePortType">
- <http:binding verb="POST"/>
- <wsdl:operation name="saveCloudServicesActivity">
- <http:operation location="saveCloudServicesActivity"/>
- <wsdl:input>
- <mime:content type="text/xml" part="parameters"/>
-
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters"/>
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="activate">
- <http:operation location="activate"/>
- <wsdl:input>
- <mime:content type="text/xml" part="parameters"/>
-
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters"/>
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="retrieveCloudServiceInfo">
- <http:operation location="retrieveCloudServiceInfo"/>
- <wsdl:input>
- <mime:content type="text/xml" part="parameters"/>
-
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters"/>
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="deactivate">
- <http:operation location="deactivate"/>
- <wsdl:input>
- <mime:content type="text/xml" part="parameters"/>
-
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="CloudManagerService">
- <wsdl:port name="CloudManagerServiceHttpsSoap11Endpoint" binding="ns:CloudManagerServiceSoap11Binding">
- <soap:address
- location="https://10.100.0.26:9443/services/CloudManagerService.CloudManagerServiceHttpsSoap11Endpoint/"/>
-
- </wsdl:port>
- <wsdl:port name="CloudManagerServiceHttpsSoap12Endpoint" binding="ns:CloudManagerServiceSoap12Binding">
- <soap12:address
- location="https://10.100.0.26:9443/services/CloudManagerService.CloudManagerServiceHttpsSoap12Endpoint/"/>
- </wsdl:port>
- <wsdl:port name="CloudManagerServiceHttpsEndpoint" binding="ns:CloudManagerServiceHttpBinding">
- <http:address
- location="https://10.100.0.26:9443/services/CloudManagerService.CloudManagerServiceHttpsEndpoint/"/>
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/dashboard/src/main/resources/META-INF/component.xml
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/dashboard/src/main/resources/META-INF/component.xml b/products/stratos-controller/modules/dashboard/src/main/resources/META-INF/component.xml
deleted file mode 100644
index e127fda..0000000
--- a/products/stratos-controller/modules/dashboard/src/main/resources/META-INF/component.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
- # Licensed to the Apache Software Foundation (ASF) under one
- # or more contributor license agreements. See the NOTICE file
- # distributed with this work for additional information
- # regarding copyright ownership. The ASF licenses this file
- # to you under the Apache License, Version 2.0 (the
- # "License"); you may not use this file except in compliance
- # with the License. You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing,
- # software distributed under the License is distributed on an
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- # KIND, either express or implied. See the License for the
- # specific language governing permissions and limitations
- # under the License.
- -->
-<component xmlns="http://products.wso2.org/carbon">
- <!-- sample menu configuration -->
- <menus>
- <menu>
- <id>mt_cloud_services_configurations</id>
- <i18n-key>cloud.services.configurations</i18n-key>
- <i18n-bundle>org.apache.stratos.manager.dashboard.ui.i18n.Resources</i18n-bundle>
- <parent-menu>configure_menu</parent-menu>
- <link>../tenant-dashboard/cloud_services_configuration.jsp</link>
- <region>region1</region>
- <icon>../tenant-dashboard/images/service-configuration.gif</icon>
- <order>40</order>
- <style-class>home</style-class>
- <require-permission>/permission/admin/configure/cloud-services</require-permission>
- <require-not-super-tenant>true</require-not-super-tenant>
- </menu>
- </menus>
-</component>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/dashboard/src/main/resources/org/apache/stratos/manager/dashboard/ui/i18n/JSResources.properties
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/dashboard/src/main/resources/org/apache/stratos/manager/dashboard/ui/i18n/JSResources.properties b/products/stratos-controller/modules/dashboard/src/main/resources/org/apache/stratos/manager/dashboard/ui/i18n/JSResources.properties
deleted file mode 100644
index a86aac2..0000000
--- a/products/stratos-controller/modules/dashboard/src/main/resources/org/apache/stratos/manager/dashboard/ui/i18n/JSResources.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-password.mismatched=Passwords do not match.
-current.password.should.provided=You should provide the current password inorder to change the password.
-session.timed.out=Session timed out.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/dashboard/src/main/resources/org/apache/stratos/manager/dashboard/ui/i18n/Resources.properties
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/dashboard/src/main/resources/org/apache/stratos/manager/dashboard/ui/i18n/Resources.properties b/products/stratos-controller/modules/dashboard/src/main/resources/org/apache/stratos/manager/dashboard/ui/i18n/Resources.properties
deleted file mode 100644
index 7747ca8..0000000
--- a/products/stratos-controller/modules/dashboard/src/main/resources/org/apache/stratos/manager/dashboard/ui/i18n/Resources.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-cloud.services.configurations=Services
-activate.your.cloud.services=Activate your Cloud Services
-cloud.services=Cloud Services
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/249e1290/products/stratos-controller/modules/dashboard/src/main/resources/web/tenant-dashboard/cloud_services_configuration.jsp
----------------------------------------------------------------------
diff --git a/products/stratos-controller/modules/dashboard/src/main/resources/web/tenant-dashboard/cloud_services_configuration.jsp b/products/stratos-controller/modules/dashboard/src/main/resources/web/tenant-dashboard/cloud_services_configuration.jsp
deleted file mode 100644
index 180fc20..0000000
--- a/products/stratos-controller/modules/dashboard/src/main/resources/web/tenant-dashboard/cloud_services_configuration.jsp
+++ /dev/null
@@ -1,204 +0,0 @@
-<%--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied. See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
---%>
-<%@ page import="org.apache.stratos.manager.dashboard.ui.clients.CloudManagerServiceClient" %>
-<%@ page import="org.apache.stratos.manager.dashboard.stub.xsd.CloudService" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ page import="org.apache.stratos.account.mgt.ui.clients.AccountMgtClient" %>
-<%@ page import="org.apache.stratos.common.constants.StratosConstants" %>
-<%@ page import="java.util.List" %>
-<%@ page import="java.util.ArrayList" %>
-<%@ page import="org.apache.stratos.manager.dashboard.ui.utils.Util" %>
-<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantConstants" %>
-
-
-<jsp:include page="../registry_common/registry_common-i18n-ajaxprocessor.jsp"/>
-<script type="text/javascript" src="../registry_common/js/registry_validation.js"></script>
-<script type="text/javascript" src="../registry_common/js/registry_common.js"></script>
-<script type="text/javascript" src="../ajax/js/prototype.js"></script>
-<script type="text/javascript" src="../tenant-dashboard/js/dashboard.js"></script>
-<link href="../tenant-dashboard/css/dashboard.css" rel="stylesheet" type="text/css" media="all"/>
-
-
-<%
-
- CloudManagerServiceClient cloudManagerClient;
- CloudService[] cloudServices = null;
- String error = "Error in getting the available and active service details.";
- try {
- cloudManagerClient = new CloudManagerServiceClient(request, config, session);
- cloudServices = cloudManagerClient.retrieveCloudServiceInfo();
- } catch (Exception e) {
- request.setAttribute(CarbonUIMessage.ID, new CarbonUIMessage(error,error,null));
-%>
- <jsp:include page="../admin/error.jsp?<%=error%>"/>
-<%
- return;
- }
-%>
-<fmt:bundle basename="org.apache.stratos.manager.dashboard.ui.i18n.Resources">
-<carbon:jsi18n
- resourceBundle="org.apache.stratos.manager.dashboard.ui.i18n.JSResources"
- request="<%=request%>" namespace="org.apache.stratos.manager.dashboard.ui"/>
-
-<div id="middle">
-<h2><fmt:message key="activate.your.cloud.services"/></h2>
-<div id="workArea">
-<%
-// if the account management permission there, we are showing the message to validate email address
-if (CarbonUIUtil.isUserAuthorized(request, "/permission/admin/configure/account")) {
-
- AccountMgtClient client = new AccountMgtClient(config, session);
- boolean isEmailValidated = client.isEmailValidated();
-
- if (!isEmailValidated) {
-%>
-
-<div class="green-note">Your organization has not validated the contact email address yet. Please validate it following
-the instructions in the <a href="../account-mgt/account_mgt.jsp">Account Management</a> page (Accessible from Configure->Account menu). </div>
-<%
- }
-}
-String tenantDomain = null;
-if (session.getAttribute(MultitenantConstants.TENANT_DOMAIN) != null) {
- tenantDomain = (String)session.getAttribute(MultitenantConstants.TENANT_DOMAIN);
-} else {
- // user is not logged in or just logged out, but still they are inside url own to the domain
- tenantDomain = (String)request.getAttribute(MultitenantConstants.TENANT_DOMAIN);
-}
-String linkSuffix = "";
- if (tenantDomain != null) {
- linkSuffix = "/" + MultitenantConstants.TENANT_AWARE_URL_PREFIX + "/" + tenantDomain;
- }
-
-boolean isUserAuthorized = CarbonUIUtil.isUserAuthorized(request, "/permission/admin/configure/cloud-services");
-%>
-<form id="cloudService" action="cloud_services_save_ajaxprocessor.jsp" method="post">
-<div>
- <table cellspacing="0" class="tips">
-<%
- List<String> activeServices = new ArrayList<String>();
- int index = 1;
-
- for (CloudService cloudService: cloudServices) {
- index++;
- String name = cloudService.getName();
- String imagePath = "images/" + name.replace(" ", "-") + "-logo.gif";
- String projectPageUrl = cloudService.getProductPageURL();
- String link = cloudService.getLink() + linkSuffix;
- String icon = cloudService.getIcon();
- String iconPath = icon.substring(0, icon.lastIndexOf('/'));
- String iconName = icon.substring(icon.lastIndexOf('/') + 1);
- String inactiveIcon = iconPath + "/" + "inactive-" + iconName;
- String description = cloudService.getDescription();
- String label = cloudService.getLabel();
- boolean active = name.equals(StratosConstants.CLOUD_IDENTITY_SERVICE) ||
- name.equals(StratosConstants.CLOUD_GOVERNANCE_SERVICE) ||
- cloudService.getActive();
- String disabledStr = (name.equals(StratosConstants.CLOUD_IDENTITY_SERVICE) ||
- name.equals(StratosConstants.CLOUD_GOVERNANCE_SERVICE))?" disabled ": "";
- boolean disabledBtn = (name.equals(StratosConstants.CLOUD_IDENTITY_SERVICE) ||
- name.equals(StratosConstants.CLOUD_GOVERNANCE_SERVICE));
- if (!isUserAuthorized) {
- disabledStr = " disabled ";
- }
- /*if (name.equals(StratosConstants.CLOUD_ESB_SERVICE)) {
- active = false;
- disabledStr = " disabled "; // we show an inactive and disabled link
- }*/
- if (active) {
- activeServices.add(label);
- }
-%>
- <tr class="tips-row">
-
- <td class="tip-checkbox">
- <input type="checkbox" <%=disabledStr%> <%=active ? " checked=\"true\"" : ""%>
- name="cloudServices" id="cloudServices<%=index%>" value="<%=name%>" style="display:none;"/>
- </td>
-
- <td>
- <img src="<%=icon%>" class="iconImage">
- <% if (active) { %>
- <a target="_blank" href="<%=link%>" class="linkToService"><%=label%></a>
- <% } else { %>
- <a class="linkToService"><%=label%></a>
- <% } %>
-
- </td>
- <td class="access">
- <% if (!disabledBtn) { %>
- <% if (active) { %>
- <a target="_blank" input type="button" onclick="document.getElementById('cloudServices<%=index%>').checked=false;onChangeServiceSubscription()" class="deactivate-button"> Deactivate
- </a>
- <% } else { %>
- <a target="_blank" input type="button" onclick="document.getElementById('cloudServices<%=index%>').checked=true;onChangeServiceSubscription()" class="activate-button"> Activate
- <% } %>
- <% } %>
- </td>
-
- <td class="powered">Powered by<br/><a href="<%=projectPageUrl%>" target="_blank"><img src="<%=imagePath%>"/></a></td>
- </tr>
- <% index++;
- } %>
-
- <td> </td>
- </tr>
- </table>
- </div>
-</form>
-<%
- List<String> oldActiveServices = (List<String>)session.getAttribute("active-statos-services");
- if (oldActiveServices != null) {
- List<String> newlyActivatedServices = Util.getNewlyActivatedServices(oldActiveServices, activeServices);
- List<String> newlyDeactivatedServices = Util.getNewlyDeactivatedServices(oldActiveServices, activeServices);
- String msg = null;
- if (newlyActivatedServices.size() > 0) {
- msg = "<li>";
- for (String service: newlyActivatedServices) {
- msg += "<ul>" + service + " <strong>activated</strong></ul>";
- }
- msg += "</li>";
- }
- if (newlyDeactivatedServices.size() > 0) {
- if (msg == null) {
- msg = "<li>";
- }
- for (String service: newlyDeactivatedServices) {
- msg += "<ul>" + service + " <strong>deactivated</strong></ul>";
- }
- msg += "</li>";
- }
- if (msg != null) {
-%>
- <script type="text/javascript">
- jQuery(document).ready(function() {
- CARBON.showInfoDialog('<%=msg%>');
- });
- </script>
-<%
- }
- }
- session.setAttribute("active-statos-services", activeServices);
-%>
-</div>
-</div>
-</fmt:bundle>