You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/01/04 09:06:09 UTC

[1/6] stratos git commit: Moving registry manager in cloud controller to stratos common module

Repository: stratos
Updated Branches:
  refs/heads/master 79c69e775 -> e6a03d1bd


Moving registry manager in cloud controller to stratos common module


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/e52deaae
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/e52deaae
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/e52deaae

Branch: refs/heads/master
Commit: e52deaae27097920d5e67e84f188bbf7ef1f313a
Parents: 79c69e7
Author: Imesh Gunaratne <im...@apache.org>
Authored: Sun Jan 4 10:56:58 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Sun Jan 4 10:56:58 2015 +0530

----------------------------------------------------------------------
 .../context/CloudControllerContext.java         |   2 +-
 .../iaases/mock/service/MockIPAddressPool.java  |  34 +++--
 .../iaases/mock/service/MockIaasService.java    |  14 +-
 .../cloud/controller/registry/Deserializer.java |  96 -------------
 .../controller/registry/RegistryManager.java    | 134 -------------------
 .../cloud/controller/registry/Serializer.java   | 115 ----------------
 .../util/CloudControllerConstants.java          |   5 +-
 .../controller/util/CloudControllerUtil.java    |  28 ++--
 .../common/internal/ServiceReferenceHolder.java |   2 +-
 .../stratos/common/registry/Deserializer.java   |  96 +++++++++++++
 .../common/registry/RegistryManager.java        | 122 +++++++++++++++++
 .../stratos/common/registry/Serializer.java     |  85 ++++++++++++
 12 files changed, 349 insertions(+), 384 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
index 1fc3d85..a4a384c 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
@@ -30,7 +30,7 @@ import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesMaster;
 import org.apache.stratos.cloud.controller.domain.*;
 import org.apache.stratos.cloud.controller.exception.*;
 import org.apache.stratos.cloud.controller.internal.ServiceReferenceHolder;
-import org.apache.stratos.cloud.controller.registry.RegistryManager;
+import org.apache.stratos.common.registry.RegistryManager;
 import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
 import org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher;
 import org.wso2.carbon.registry.core.exceptions.RegistryException;

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/service/MockIPAddressPool.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/service/MockIPAddressPool.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/service/MockIPAddressPool.java
index 936a701..fb49147 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/service/MockIPAddressPool.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/service/MockIPAddressPool.java
@@ -21,7 +21,7 @@ package org.apache.stratos.cloud.controller.iaases.mock.service;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.registry.RegistryManager;
+import org.apache.stratos.common.registry.RegistryManager;
 import org.wso2.carbon.registry.core.exceptions.RegistryException;
 
 import java.io.Serializable;
@@ -33,8 +33,8 @@ import java.util.concurrent.atomic.AtomicInteger;
 public class MockIPAddressPool {
     private static final Log log = LogFactory.getLog(MockIPAddressPool.class);
 
-    private static final String MOCK_IAAS_PRIVATE_IP_SEQUENCE = "/mock/iaas/private-ip-sequence";
-    private static final String MOCK_IAAS_PUBLIC_IP_SEQUENCE = "/mock/iaas/public-ip-sequence";
+    private static final String MOCK_IAAS_PRIVATE_IP_SEQUENCE = "/cloud.controller/mock/iaas/private-ip-sequence";
+    private static final String MOCK_IAAS_PUBLIC_IP_SEQUENCE = "/cloud.controller/mock/iaas/public-ip-sequence";
     private static final String PRIVATE_IP_PREFIX = "10.0.0.";
     private static final String PUBLIC_IP_PREFIX = "20.0.0.";
 
@@ -44,14 +44,26 @@ public class MockIPAddressPool {
     private AtomicInteger publicIpSequence;
 
     private MockIPAddressPool() {
-        privateIpSequence = readFromRegistry(MOCK_IAAS_PRIVATE_IP_SEQUENCE);
-        if (privateIpSequence == null) {
-            privateIpSequence = new AtomicInteger();
+        try {
+            privateIpSequence = (AtomicInteger) RegistryManager.getInstance().read(MOCK_IAAS_PRIVATE_IP_SEQUENCE);
+            if (privateIpSequence == null) {
+                privateIpSequence = new AtomicInteger();
+            }
+        } catch (RegistryException e) {
+            String message = "Could not read private ip sequence from registry";
+            log.error(message, e);
+            throw new RuntimeException(e);
         }
 
-        publicIpSequence = readFromRegistry(MOCK_IAAS_PUBLIC_IP_SEQUENCE);
-        if (publicIpSequence == null) {
-            publicIpSequence = new AtomicInteger();
+        try {
+            publicIpSequence = (AtomicInteger) RegistryManager.getInstance().read(MOCK_IAAS_PUBLIC_IP_SEQUENCE);
+            if (publicIpSequence == null) {
+                publicIpSequence = new AtomicInteger();
+            }
+        } catch (RegistryException e) {
+            String message = "Could not read public ip sequence from registry";
+            log.error(message, e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -93,8 +105,4 @@ public class MockIPAddressPool {
             log.error(String.format("Could not persist mock iaas ip sequence [%s] in registry", resourcePath), e);
         }
     }
-
-    private AtomicInteger readFromRegistry(String resourcePath) {
-        return (AtomicInteger) RegistryManager.getInstance().read(resourcePath);
-    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/service/MockIaasService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/service/MockIaasService.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/service/MockIaasService.java
index e5b6e13..b2d0ee2 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/service/MockIaasService.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/service/MockIaasService.java
@@ -27,7 +27,7 @@ import org.apache.stratos.cloud.controller.iaases.mock.MockPartitionValidator;
 import org.apache.stratos.cloud.controller.iaases.mock.service.config.MockIaasConfig;
 import org.apache.stratos.cloud.controller.iaases.mock.service.statistics.generator.MockHealthStatisticsGenerator;
 import org.apache.stratos.cloud.controller.iaases.PartitionValidator;
-import org.apache.stratos.cloud.controller.registry.RegistryManager;
+import org.apache.stratos.common.registry.RegistryManager;
 import org.apache.stratos.common.threading.StratosThreadPool;
 import org.wso2.carbon.registry.core.exceptions.RegistryException;
 
@@ -53,7 +53,7 @@ public class MockIaasService {
 
     private static final ExecutorService mockMemberExecutorService =
             StratosThreadPool.getExecutorService("MOCK_MEMBER_EXECUTOR_SERVICE", MockConstants.MAX_MOCK_MEMBER_COUNT);
-    private static final String MOCK_IAAS_MEMBERS = "/mock/iaas/members";
+    private static final String MOCK_IAAS_MEMBERS = "/cloud.controller/mock/iaas/members";
     private static volatile MockIaasService instance;
 
     private MockPartitionValidator partitionValidator;
@@ -63,7 +63,13 @@ public class MockIaasService {
     private MockIaasService() {
         super();
         partitionValidator = new MockPartitionValidator();
-        serviceNameToMockMemberMap = readFromRegistry();
+        try {
+            serviceNameToMockMemberMap = readFromRegistry();
+        } catch (RegistryException e) {
+            String message = "Could not read service name -> mock member map from registry";
+            log.error(message, e);
+            throw new RuntimeException(message, e);
+        }
         if(serviceNameToMockMemberMap == null) {
             // No members found in registry, create a new map
             serviceNameToMockMemberMap = new ConcurrentHashMap<String, Map<String, MockMember>>();
@@ -148,7 +154,7 @@ public class MockIaasService {
         }
     }
 
-    private ConcurrentHashMap<String, Map<String, MockMember>> readFromRegistry() {
+    private ConcurrentHashMap<String, Map<String, MockMember>> readFromRegistry() throws RegistryException {
         return (ConcurrentHashMap<String, Map<String, MockMember>>)
                 RegistryManager.getInstance().read(MOCK_IAAS_MEMBERS);
     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/Deserializer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/Deserializer.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/Deserializer.java
deleted file mode 100644
index bd386e9..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/Deserializer.java
+++ /dev/null
@@ -1,96 +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.cloud.controller.registry;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectInputStream;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class Deserializer {
-    
-    private static final Log log = LogFactory.getLog(Deserializer.class);
-
-    /**
-     * We deserialize only if the path to the serialized object file is exists.
-     * @param filePath path to the serialized object file
-     * @return the object obtained after deserialization or null if file isn't valid.
-     * @throws Exception
-     */
-    public static Object deserialize(String filePath) throws Exception {
-
-        ObjectInputStream objIn = null; 
-        Object obj = null;
-        
-        if(!new File(filePath).isFile()){
-            return obj;
-        }
-        
-        try {
-
-            objIn = new ObjectInputStream(new FileInputStream(filePath));
-            obj = objIn.readObject();
-
-        } catch (IOException e) {
-            log.error("Failed to deserialize the file at "+filePath , e);
-            throw e;
-            
-        } catch (ClassNotFoundException e) {
-            log.error("Failed to deserialize the file at "+filePath , e);
-            throw e;
-            
-        } finally {
-            if (objIn != null) {
-                objIn.close();
-            }
-        }
-        
-        return obj;
-
-    }
-    
-    /**
-     * Deserialize a byte array and retrieve the object.
-     * @param bytes bytes to be deserialized
-     * @return the deserialized {@link Object}
-     * @throws Exception if the deserialization is failed.
-     */
-    public static Object deserializeFromByteArray(byte[] bytes) throws Exception {
-
-        ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
-        ObjectInput in = null;
-        try {
-            in = new ObjectInputStream(bis);
-            Object o = in.readObject();
-
-            return o;
-
-        } finally {
-            bis.close();
-            if (in != null) {
-                in.close();
-            }
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/RegistryManager.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/RegistryManager.java
deleted file mode 100644
index 20921e8..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/RegistryManager.java
+++ /dev/null
@@ -1,134 +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.cloud.controller.registry;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.exception.CloudControllerException;
-import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
-import org.apache.stratos.cloud.controller.internal.ServiceReferenceHolder;
-import org.wso2.carbon.context.PrivilegedCarbonContext;
-import org.wso2.carbon.registry.core.Registry;
-import org.wso2.carbon.registry.core.Resource;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException;
-import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
-
-import java.io.Serializable;
-
-/**
- * Registry manager provides functionality for persisting resources in the registry and reading them back.
- */
-public class RegistryManager {
-    private final static Log log = LogFactory.getLog(RegistryManager.class);
-
-    private static class Holder {
-        static final RegistryManager instance = new RegistryManager();
-    }
-
-    public static RegistryManager getInstance() {
-        return Holder.instance;
-    }
-    
-    private RegistryManager() {
-        try {
-            Registry registry = ServiceReferenceHolder.getInstance().getRegistry();
-            if ((registry != null) && (!registry.resourceExists(CloudControllerConstants.CLOUD_CONTROLLER_RESOURCE))) {
-                registry.put(CloudControllerConstants.CLOUD_CONTROLLER_RESOURCE, registry.newCollection());
-            }
-        } catch (RegistryException e) {
-            String msg = "Failed to create the registry resource " +
-                            CloudControllerConstants.CLOUD_CONTROLLER_RESOURCE;
-            log.error(msg, e);
-            throw new CloudControllerException(msg, e);
-        }
-    }
-
-    /**
-     * Persist an object in the registry.
-     *
-     * @param serializableObject object to be persisted.
-     */
-    public synchronized void persist(String resourcePath, Serializable serializableObject) throws RegistryException {
-        String absoluteResourcePath = CloudControllerConstants.CLOUD_CONTROLLER_RESOURCE + resourcePath;
-        if(log.isDebugEnabled()) {
-            log.debug(String.format("Persisting resource in registry: [resource-path] %s", absoluteResourcePath));
-        }
-        Registry registry = ServiceReferenceHolder.getInstance().getRegistry();
-
-        try {
-        	PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
-        	ctx.setTenantId(MultitenantConstants.SUPER_TENANT_ID);
-        	ctx.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
-
-            registry.beginTransaction();
-
-            Resource nodeResource = registry.newResource();
-            nodeResource.setContent(Serializer.serializeToByteArray(serializableObject));
-            registry.put(absoluteResourcePath, nodeResource);
-
-            registry.commitTransaction();
-
-            if(log.isDebugEnabled()) {
-                log.debug(String.format("Resource persisted successfully in registry: [resource-path] %s",
-                        absoluteResourcePath));
-            }
-        } catch (Exception e) {
-            String msg = "Failed to persist resource in registry: " + absoluteResourcePath;
-            registry.rollbackTransaction();
-            log.error(msg, e);
-            throw new CloudControllerException(msg, e);
-        }
-    }
-
-    public synchronized Object read(String resourcePath) {
-        try {
-            Registry registry = ServiceReferenceHolder.getInstance().getRegistry();
-            if(registry == null) {
-                return null;
-            }
-
-            PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
-        	ctx.setTenantId(MultitenantConstants.SUPER_TENANT_ID);
-        	ctx.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
-            Resource resource = registry.get(CloudControllerConstants.CLOUD_CONTROLLER_RESOURCE + resourcePath);
-            Object content = resource.getContent();
-            if (content != null) {
-                try {
-                    return Deserializer.deserializeFromByteArray((byte[])content);
-                } catch (Exception e) {
-                    log.error("Could not de-serialize object stored in registry", e);
-                    throw new RuntimeException(e);
-                }
-            }
-            return null;
-        } catch (ResourceNotFoundException ignore) {
-            // this means, we've never persisted CC info in registry
-            return null;
-        } catch (RegistryException e) {
-            String msg = "Failed to read resource from registry: " +
-                    CloudControllerConstants.CLOUD_CONTROLLER_RESOURCE + resourcePath;
-            log.error(msg, e);
-            throw new CloudControllerException(msg, e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/Serializer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/Serializer.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/Serializer.java
deleted file mode 100644
index 1759902..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/registry/Serializer.java
+++ /dev/null
@@ -1,115 +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.cloud.controller.registry;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.context.CloudControllerContext;
-import org.apache.stratos.messaging.domain.topology.Topology;
-
-import java.io.*;
-
-public class Serializer {
-    
-    private static final Log log = LogFactory.getLog(Serializer.class);
-
-    public static void serializeToFile(Object serializableObj, String filePath) throws IOException {
-
-        File outFile = new File(filePath);
-        ObjectOutput objOut = null;
-        FileOutputStream fileOutputStream = null;
-        
-        try {
-
-            if(outFile.createNewFile()){
-                log.debug("Serialization file is created at "+filePath);
-            } else{
-                log.debug("Serialization file is already existing at "+filePath);
-            }
-            fileOutputStream = new FileOutputStream(outFile);
-            objOut = new ObjectOutputStream(fileOutputStream);
-            objOut.writeObject(serializableObj);
-
-        } catch (IOException e) {
-            log.error("Failed to serialize the object "+serializableObj.toString()
-                      + " to file "+filePath , e);
-            throw e;
-            
-        } finally{
-            if(objOut != null) {
-                objOut.close();
-            }
-            if(fileOutputStream != null) {
-                fileOutputStream.close();
-            }
-        }
-
-    }
-    
-    /**
-     * Serialize a {@link org.apache.stratos.cloud.controller.context.CloudControllerContext} to a byte array.
-     * @param serializableObject
-     * @return byte[] 
-     * @throws IOException
-     */
-    public static byte[]  serializeToByteArray(Serializable serializableObject) throws IOException {
-
-    	ByteArrayOutputStream bos = new ByteArrayOutputStream();
-    	ObjectOutput out = null;
-    	try {
-    	  out = new ObjectOutputStream(bos);   
-    	  out.writeObject(serializableObject);
-    	  
-    	  return bos.toByteArray();
-    	  
-        } finally {
-            if (out != null) {
-                out.close();
-            }
-            bos.close();
-        }
-
-    }
-
-     /**
-     * Serialize a {@link org.apache.stratos.cloud.controller.context.CloudControllerContext} to a byte array.
-     * @param topology
-     * @return byte[]
-     * @throws IOException
-     */
-    public static byte[] serializeToByteArray(Topology topology) throws IOException {
-
-    	ByteArrayOutputStream bos = new ByteArrayOutputStream();
-    	ObjectOutput out = null;
-    	try {
-    	  out = new ObjectOutputStream(bos);
-    	  out.writeObject(topology);
-
-    	  return bos.toByteArray();
-
-        } finally {
-            if (out != null) {
-                out.close();
-            }
-            bos.close();
-        }
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java
index 43e9b30..d72d9c8 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerConstants.java
@@ -260,9 +260,8 @@ public final class CloudControllerConstants {
 	/**
 	 * Persistence
 	 */
-	public static final String CLOUD_CONTROLLER_RESOURCE = "/cloud.controller";
-	public static final String DATA_RESOURCE = "/data";
-	public static final String TOPOLOGY_RESOURCE = "/topology";
+	public static final String DATA_RESOURCE = "/cloud.controller/data";
+	public static final String TOPOLOGY_RESOURCE = "/cloud.controller/topology";
 	public static final String AVAILABILITY_ZONE = "availabilityZone";
 	public static final String KEY_PAIR = "keyPair";
 	public static final String HOST = "host";

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
index fd1397d..334e144 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
@@ -31,7 +31,7 @@ import org.apache.stratos.cloud.controller.exception.InvalidKubernetesClusterExc
 import org.apache.stratos.cloud.controller.exception.InvalidKubernetesHostException;
 import org.apache.stratos.cloud.controller.exception.InvalidKubernetesMasterException;
 import org.apache.stratos.cloud.controller.iaases.Iaas;
-import org.apache.stratos.cloud.controller.registry.RegistryManager;
+import org.apache.stratos.common.registry.RegistryManager;
 import org.apache.stratos.common.Property;
 import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesCluster;
 import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesHost;
@@ -318,22 +318,16 @@ public class CloudControllerUtil {
           log.fatal(msg, e);
       }
     }
-    
-    public static Topology retrieveTopology() {    	
-          Object dataObj = RegistryManager.getInstance().read(CloudControllerConstants.TOPOLOGY_RESOURCE);
-          if (dataObj != null) {
-              try {
-                  if(dataObj instanceof Topology) {
-                      return (Topology) dataObj;
-                  } else {
-                      return null;
-                  }
-              } catch (Exception e) {
-                String msg = "Unable to retrieve data from Registry. Hence, any historical data will not get reflected.";
-                log.warn(msg, e);
-            }
-          }
-          return null;
+
+    public static Topology retrieveTopology() {
+        try {
+            Object dataObj = RegistryManager.getInstance().read(CloudControllerConstants.TOPOLOGY_RESOURCE);
+            return (Topology) dataObj;
+        } catch (Exception e) {
+            String msg = "Unable to retrieve data from registry";
+            log.error(msg, e);
+            throw new RuntimeException(msg, e);
+        }
     }
 
 	

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/internal/ServiceReferenceHolder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/internal/ServiceReferenceHolder.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/internal/ServiceReferenceHolder.java
index 7308f82..ed51902 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/internal/ServiceReferenceHolder.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/internal/ServiceReferenceHolder.java
@@ -9,7 +9,7 @@ import org.wso2.carbon.registry.core.service.RegistryService;
 import org.wso2.carbon.user.core.service.RealmService;
 
 /**
- * Created by imesh on 12/1/14.
+ * Stratos common service reference holder.
  */
 public class ServiceReferenceHolder {
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/Deserializer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/Deserializer.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/Deserializer.java
new file mode 100644
index 0000000..9f05142
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/Deserializer.java
@@ -0,0 +1,96 @@
+/*
+ * 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.common.registry;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectInputStream;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class Deserializer {
+    
+    private static final Log log = LogFactory.getLog(Deserializer.class);
+
+    /**
+     * We deserialize only if the path to the serialized object file is exists.
+     * @param filePath path to the serialized object file
+     * @return the object obtained after deserialization or null if file isn't valid.
+     * @throws Exception
+     */
+    public static Object deserialize(String filePath) throws Exception {
+
+        ObjectInputStream objIn = null; 
+        Object obj = null;
+        
+        if(!new File(filePath).isFile()){
+            return obj;
+        }
+        
+        try {
+
+            objIn = new ObjectInputStream(new FileInputStream(filePath));
+            obj = objIn.readObject();
+
+        } catch (IOException e) {
+            log.error("Failed to deserialize the file at "+filePath , e);
+            throw e;
+            
+        } catch (ClassNotFoundException e) {
+            log.error("Failed to deserialize the file at "+filePath , e);
+            throw e;
+            
+        } finally {
+            if (objIn != null) {
+                objIn.close();
+            }
+        }
+        
+        return obj;
+
+    }
+    
+    /**
+     * Deserialize a byte array and retrieve the object.
+     * @param bytes bytes to be deserialized
+     * @return the deserialized {@link Object}
+     * @throws Exception if the deserialization is failed.
+     */
+    public static Object deserializeFromByteArray(byte[] bytes) throws Exception {
+
+        ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
+        ObjectInput in = null;
+        try {
+            in = new ObjectInputStream(bis);
+            Object o = in.readObject();
+
+            return o;
+
+        } finally {
+            bis.close();
+            if (in != null) {
+                in.close();
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/RegistryManager.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/RegistryManager.java
new file mode 100644
index 0000000..b58fc2a
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/RegistryManager.java
@@ -0,0 +1,122 @@
+/*
+ *
+ * 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.common.registry;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.internal.ServiceReferenceHolder;
+import org.wso2.carbon.context.PrivilegedCarbonContext;
+import org.wso2.carbon.registry.core.Registry;
+import org.wso2.carbon.registry.core.Resource;
+import org.wso2.carbon.registry.core.exceptions.RegistryException;
+import org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException;
+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+
+import java.io.Serializable;
+
+/**
+ * Registry manager provides functionality for persisting resources in the registry and reading them back.
+ */
+public class RegistryManager {
+    private final static Log log = LogFactory.getLog(RegistryManager.class);
+
+    private static final RegistryManager instance = new RegistryManager();
+
+    public static RegistryManager getInstance() {
+        return instance;
+    }
+    
+    private RegistryManager() {
+    }
+
+    /**
+     * Persist a serializable object in the registry with the given resource path.
+     *
+     * @param serializableObject object to be persisted.
+     */
+    public synchronized void persist(String resourcePath, Serializable serializableObject) throws RegistryException {
+        if(log.isDebugEnabled()) {
+            log.debug(String.format("Persisting resource in registry: [resource-path] %s", resourcePath));
+        }
+        Registry registry = ServiceReferenceHolder.getInstance().getRegistryService().getRegistry();
+
+        try {
+        	PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+        	ctx.setTenantId(MultitenantConstants.SUPER_TENANT_ID);
+        	ctx.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
+
+            registry.beginTransaction();
+
+            Resource nodeResource = registry.newResource();
+            nodeResource.setContent(Serializer.serializeToByteArray(serializableObject));
+            registry.put(resourcePath, nodeResource);
+
+            registry.commitTransaction();
+
+            if(log.isDebugEnabled()) {
+                log.debug(String.format("Resource persisted successfully in registry: [resource-path] %s",
+                        resourcePath));
+            }
+        } catch (Exception e) {
+            String msg = "Failed to persist resource in registry: " + resourcePath;
+            registry.rollbackTransaction();
+            log.error(msg, e);
+            throw new RegistryException(msg, e);
+        }
+    }
+
+    /**
+     * Returns an object stored in the given resource path.
+     * @param resourcePath
+     * @return
+     * @throws RegistryException
+     */
+    public synchronized Object read(String resourcePath) throws RegistryException {
+        try {
+            Registry registry = ServiceReferenceHolder.getInstance().getRegistryService().getRegistry();
+            if(registry == null) {
+                return null;
+            }
+
+            PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+        	ctx.setTenantId(MultitenantConstants.SUPER_TENANT_ID);
+        	ctx.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
+            Resource resource = registry.get(resourcePath);
+            Object content = resource.getContent();
+            if (content != null) {
+                try {
+                    return Deserializer.deserializeFromByteArray((byte[])content);
+                } catch (Exception e) {
+                    log.error("Could not de-serialize object stored in registry", e);
+                    throw new RuntimeException(e);
+                }
+            }
+            return null;
+        } catch (ResourceNotFoundException ignore) {
+            return null;
+        } catch (RegistryException e) {
+            String msg = "Failed to read resource from registry: " + resourcePath;
+            log.error(msg, e);
+            throw new RegistryException(msg, e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e52deaae/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/Serializer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/Serializer.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/Serializer.java
new file mode 100644
index 0000000..4cd4a37
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/Serializer.java
@@ -0,0 +1,85 @@
+/*
+ * 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.common.registry;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.*;
+
+public class Serializer {
+    
+    private static final Log log = LogFactory.getLog(Serializer.class);
+
+    public static void serializeToFile(Object serializableObj, String filePath) throws IOException {
+
+        File outFile = new File(filePath);
+        ObjectOutput objOut = null;
+        FileOutputStream fileOutputStream = null;
+        
+        try {
+
+            if(outFile.createNewFile()){
+                log.debug("Serialization file is created at "+filePath);
+            } else{
+                log.debug("Serialization file is already existing at "+filePath);
+            }
+            fileOutputStream = new FileOutputStream(outFile);
+            objOut = new ObjectOutputStream(fileOutputStream);
+            objOut.writeObject(serializableObj);
+
+        } catch (IOException e) {
+            log.error("Failed to serialize the object "+serializableObj.toString()
+                      + " to file "+filePath , e);
+            throw e;
+            
+        } finally{
+            if(objOut != null) {
+                objOut.close();
+            }
+            if(fileOutputStream != null) {
+                fileOutputStream.close();
+            }
+        }
+    }
+
+    /**
+     * Serialize an object to a byte array.
+     * @param serializableObject
+     * @return
+     * @throws IOException
+     */
+    public static byte[]  serializeToByteArray(Serializable serializableObject) throws IOException {
+
+    	ByteArrayOutputStream bos = new ByteArrayOutputStream();
+    	ObjectOutput out = null;
+    	try {
+    	  out = new ObjectOutputStream(bos);   
+    	  out.writeObject(serializableObject);
+    	  
+    	  return bos.toByteArray();
+    	  
+        } finally {
+            if (out != null) {
+                out.close();
+            }
+            bos.close();
+        }
+    }
+}


[3/6] stratos git commit: Moving domain classes in stratos manager used by rest api to stratos common

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/ApplicationManagementUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/ApplicationManagementUtil.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/ApplicationManagementUtil.java
index 74134dd..996f788 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/ApplicationManagementUtil.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/utils/ApplicationManagementUtil.java
@@ -21,30 +21,10 @@
 
 package org.apache.stratos.manager.utils;
 
-import java.io.File;
-import java.rmi.RemoteException;
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
-import org.apache.stratos.cloud.controller.stub.domain.Persistence;
-import org.apache.stratos.cloud.controller.stub.CloudControllerServiceCartridgeNotFoundExceptionException;
-import org.apache.stratos.common.Properties;
 import org.apache.stratos.common.Property;
-import org.apache.stratos.manager.client.CloudControllerServiceClient;
-import org.apache.stratos.manager.domain.CartridgeSubscriptionInfo;
-import org.apache.stratos.manager.domain.DataCartridge;
-import org.apache.stratos.manager.domain.PortMapping;
-import org.apache.stratos.manager.domain.Policy;
-import org.apache.stratos.manager.domain.SubscriptionInfo;
-import org.apache.stratos.manager.exception.ADCException;
-import org.apache.stratos.manager.exception.UnregisteredCartridgeException;
-import org.apache.stratos.manager.domain.repository.Repository;
 import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
 
 /**
@@ -53,66 +33,6 @@ import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
 public class ApplicationManagementUtil {
 
     private static Log log = LogFactory.getLog(ApplicationManagementUtil.class);
-    //private static volatile CloudControllerServiceClient serviceClient;
-
-    protected static String getAppDeploymentDirPath(String cartridge, AxisConfiguration axisConfig) {
-        return axisConfig.getRepository().getPath() + File.separator + cartridge;
-    }
-
-    public static CartridgeSubscriptionInfo createCartridgeSubscription(CartridgeInfo cartridgeInfo,
-                                                                    String policyName,
-                                                                    String cartridgeType,
-                                                                    String cartridgeName,
-                                                                    int tenantId,
-                                                                    String tenantDomain,
-                                                                    Repository repository,
-                                                                    String hostName,
-                                                                    String clusterDomain,
-                                                                    String clusterSubDomain,
-                                                                    String mgtClusterDomain,
-                                                                    String mgtClusterSubDomain,
-                                                                    DataCartridge dataCartridge,
-                                                                    String state,
-                                                                    String subscribeKey) {
-
-        CartridgeSubscriptionInfo cartridgeSubscriptionInfo = new CartridgeSubscriptionInfo();
-        cartridgeSubscriptionInfo.setCartridge(cartridgeType);
-        cartridgeSubscriptionInfo.setAlias(cartridgeName);
-        cartridgeSubscriptionInfo.setClusterDomain(clusterDomain);
-        cartridgeSubscriptionInfo.setClusterSubdomain(clusterSubDomain);
-        cartridgeSubscriptionInfo.setMgtClusterDomain(mgtClusterDomain);
-        cartridgeSubscriptionInfo.setMgtClusterSubDomain(mgtClusterSubDomain);
-        cartridgeSubscriptionInfo.setHostName(hostName);
-        cartridgeSubscriptionInfo.setPolicy(policyName);
-        cartridgeSubscriptionInfo.setRepository(repository);
-        cartridgeSubscriptionInfo.setPortMappings(createPortMappings(cartridgeInfo));
-        cartridgeSubscriptionInfo.setProvider(cartridgeInfo.getProvider());
-        cartridgeSubscriptionInfo.setDataCartridge(dataCartridge);
-        cartridgeSubscriptionInfo.setTenantId(tenantId);
-        cartridgeSubscriptionInfo.setTenantDomain(tenantDomain);
-        cartridgeSubscriptionInfo.setBaseDirectory(cartridgeInfo.getBaseDir());
-        //cartridgeSubscriptionInfo.setState("PENDING");
-        cartridgeSubscriptionInfo.setState(state);
-        cartridgeSubscriptionInfo.setSubscriptionKey(subscribeKey);
-        return cartridgeSubscriptionInfo;
-    }
-
-
-
-	private static List<PortMapping> createPortMappings(CartridgeInfo cartridgeInfo) {
-        List<PortMapping> portMappings = new ArrayList<PortMapping>();
-
-        if (cartridgeInfo.getPortMappings() != null) {
-            for (org.apache.stratos.cloud.controller.stub.domain.PortMapping portMapping : cartridgeInfo.getPortMappings()) {
-                PortMapping portMap = new PortMapping();
-                portMap.setPrimaryPort(portMapping.getPort());
-                portMap.setProxyPort(portMapping.getProxyPort());
-                portMap.setType(portMapping.getProtocol());
-                portMappings.add(portMap);
-            }
-        }
-        return portMappings;
-    }
 
     public static int getTenantId(ConfigurationContext configurationContext) {
         int tenantId = MultitenantUtils.getTenantId(configurationContext);
@@ -121,93 +41,6 @@ public class ApplicationManagementUtil {
         }
         return tenantId;
     }
-
-		
-	
-    public static String generatePassword() {
-
-        final int PASSWORD_LENGTH = 8;
-        StringBuffer sb = new StringBuffer();
-        for (int x = 0; x < PASSWORD_LENGTH; x++) {
-            sb.append((char) ((int) (Math.random() * 26) + 97));
-        }
-        return sb.toString();
-
-    }
-
-   
-    public static java.util.Properties setRegisterServiceProperties(Policy policy, int tenantId, String alias) {
-    	
-    	DecimalFormat df = new DecimalFormat("##.##");
-        df.setParseBigDecimal(true);
-
-        java.util.Properties properties = new java.util.Properties();
-        List<Property> allProperties = new ArrayList<Property>();
-        // min_app_instances
-        Property property = new Property();
-        property.setName("min_app_instances");
-        property.setValue(df.format(policy.getMinAppInstances()));
-        allProperties.add(property);
-        
-        
-     // max_app_instances
-        property = new Property();
-        property.setName("max_app_instances");
-        property.setValue(df.format(policy.getMaxAppInstances()));
-        allProperties.add(property);
-        
-        // max_requests_per_second
-        property = new Property();
-        property.setName("max_requests_per_second");
-        property.setValue(df.format(policy.getMaxRequestsPerSecond()));
-        allProperties.add(property);
-        
-        // alarming_upper_rate
-        property = new Property();
-        property.setName("alarming_upper_rate");
-        property.setValue(df.format(policy.getAlarmingUpperRate()));
-        allProperties.add(property);
-        
-     // alarming_lower_rate
-        property = new Property();
-        property.setName("alarming_lower_rate");
-        property.setValue(df.format(policy.getAlarmingLowerRate()));
-        allProperties.add(property);
-        
-        // scale_down_factor
-        property = new Property();
-        property.setName("scale_down_factor");
-        property.setValue(df.format(policy.getScaleDownFactor()));
-        allProperties.add(property);
-        
-     // rounds_to_average
-        property = new Property();
-        property.setName("rounds_to_average");
-        property.setValue(df.format(policy.getRoundsToAverage()));
-        allProperties.add(property);
-        
-       // tenant id
-        property = new Property();
-        property.setName("tenant_id");
-        property.setValue(String.valueOf(tenantId));
-        allProperties.add(property);
-        
-        // alias
-        property = new Property();
-        property.setName("alias");
-        property.setValue(String.valueOf(alias));
-        allProperties.add(property);
-        
-        return addToJavaUtilProperties(allProperties);
-    }
-
-    private static java.util.Properties addToJavaUtilProperties(List<Property> allProperties) {
-        java.util.Properties properties = new java.util.Properties();
-        for (Property property : allProperties) {
-            properties.put(property.getName(), property.getValue());
-        }
-        return properties;
-    }
     
     public static org.apache.stratos.cloud.controller.stub.Properties toCCStubProperties(
             org.apache.stratos.common.Properties properties) {
@@ -225,7 +58,6 @@ public class ApplicationManagementUtil {
             }
 
         }
-
         return stubProps;
     }
     
@@ -265,18 +97,9 @@ public class ApplicationManagementUtil {
             }
 
         }
-
         return commonProps;
     }
 
-    public static org.apache.stratos.common.Properties toCommonProperties(
-            org.apache.stratos.cloud.controller.stub.Property[] propertyArray) {
-
-        org.apache.stratos.cloud.controller.stub.Properties properties = new org.apache.stratos.cloud.controller.stub.Properties();
-        properties.setProperties(propertyArray);
-        return toCommonProperties(properties);
-    }
-
     private static String convertRepoURL(String gitURL) {
         String convertedHttpURL = null;
         if (gitURL != null && gitURL.startsWith("git@")) {
@@ -292,39 +115,4 @@ public class ApplicationManagementUtil {
         }
         return convertedHttpURL;
     }
-
-    public static void addDNSEntry(String alias, String cartridgeType) {
-        //new DNSManager().addNewSubDomain(alias + "." + cartridgeType, System.getProperty(CartridgeConstants.ELB_IP));
-    }
-
-    public static SubscriptionInfo createSubscriptionResponse(CartridgeSubscriptionInfo cartridgeSubscriptionInfo, Repository repository) {
-    	SubscriptionInfo subscriptionInfo = new SubscriptionInfo();
-    	
-        if (repository != null && repository.getUrl() != null) {
-        	subscriptionInfo.setRepositoryURL(convertRepoURL(repository.getUrl()));
-        }
-        
-        subscriptionInfo.setHostname(cartridgeSubscriptionInfo.getHostName());
-        
-        return subscriptionInfo;
-    }
-
-    public static void registerService(String cartridgeType, String domain, String subDomain,
-                                       StringBuilder payload, String tenantRange, String hostName,
-                                       String autoscalingPoliyName, String deploymentPolicyName,
-                                       Properties properties, Persistence persistence)
-            throws ADCException, UnregisteredCartridgeException {
-        log.info("Register service..");
-        try {
-            CloudControllerServiceClient.getServiceClient().register(domain, cartridgeType, payload.toString(), tenantRange,
-                    hostName, properties, autoscalingPoliyName, deploymentPolicyName, persistence );
-        } catch (CloudControllerServiceCartridgeNotFoundExceptionException e) {
-            String msg = "Exception is occurred in register service operation. Reason :" + e.getMessage();
-            log.error(msg, e);
-            throw new UnregisteredCartridgeException("Not a registered cartridge " + cartridgeType, cartridgeType, e);
-        } catch (RemoteException e) {
-        	log.error("Remote Error", e);
-        	throw new ADCException("An error occurred in subscribing process", e);
-        }
-    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40.java
index 3bdc928..258e886 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40.java
@@ -18,13 +18,12 @@
  */
 package org.apache.stratos.rest.endpoint.api;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.wso2.carbon.stratos.common.beans.TenantInfoBean;
 import org.apache.stratos.common.util.ClaimsMgtUtil;
 import org.apache.stratos.common.util.CommonUtil;
-import org.apache.stratos.manager.domain.Cartridge;
+import org.apache.stratos.common.beans.Cartridge;
 import org.apache.stratos.rest.endpoint.ServiceHolder;
 import org.apache.stratos.rest.endpoint.Utils;
 import org.apache.stratos.rest.endpoint.annotation.AuthorizationAction;
@@ -39,8 +38,6 @@ import org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPo
 import org.apache.stratos.common.beans.cartridge.definition.CartridgeDefinitionBean;
 import org.apache.stratos.common.beans.cartridge.definition.ServiceDefinitionBean;
 import org.apache.stratos.common.beans.repositoryNotificationInfoBean.Payload;
-import org.apache.stratos.common.beans.subscription.domain.SubscriptionDomainBean;
-import org.apache.stratos.common.beans.topology.Cluster;
 import org.apache.stratos.rest.endpoint.exception.RestAPIException;
 import org.wso2.carbon.tenant.mgt.core.TenantPersistor;
 import org.wso2.carbon.tenant.mgt.util.TenantMgtUtil;
@@ -64,7 +61,6 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.UUID;
 
 /**
  * Stratos API v4.0 for Stratos 4.0.0 release.

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
index ed8b166..c48121f 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
@@ -31,7 +31,7 @@ import org.apache.stratos.cloud.controller.stub.CloudControllerServiceInvalidCar
 import org.apache.stratos.cloud.controller.stub.CloudControllerServiceInvalidIaasProviderExceptionException;
 import org.apache.stratos.manager.client.AutoscalerServiceClient;
 import org.apache.stratos.manager.client.CloudControllerServiceClient;
-import org.apache.stratos.manager.domain.Cartridge;
+import org.apache.stratos.common.beans.Cartridge;
 import org.apache.stratos.manager.artifact.distribution.coordinator.RepositoryNotifier;
 import org.apache.stratos.manager.utils.ApplicationManagementUtil;
 import org.apache.stratos.manager.utils.CartridgeConstants;
@@ -481,7 +481,7 @@ public class StratosApiV40Utils {
                     cartridge.setDefaultDeploymentPolicy(cartridgeInfo.getDefaultDeploymentPolicy());
                     //cartridge.setStatus(CartridgeConstants.NOT_SUBSCRIBED);
                     cartridge.setCartridgeAlias("-");
-                    cartridge.setPersistence(cartridgeInfo.getPersistence());
+                    cartridge.setPersistence(ObjectConverter.convertStubPersistenceToPersistence(cartridgeInfo.getPersistence()));
                     cartridge.setServiceGroup(cartridgeInfo.getServiceGroup());
 
                     if(cartridgeInfo.getLbConfig() != null && cartridgeInfo.getProperties() != null) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index 0bcc9ea..01b19b5 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -30,12 +30,11 @@ import org.apache.stratos.common.beans.kubernetes.KubernetesHost;
 import org.apache.stratos.common.beans.kubernetes.KubernetesMaster;
 import org.apache.stratos.common.beans.repositoryNotificationInfoBean.Payload;
 import org.apache.stratos.common.beans.topology.ApplicationInfoBean;
-import org.apache.stratos.common.beans.topology.Cluster;
 import org.apache.stratos.common.util.ClaimsMgtUtil;
 import org.apache.stratos.common.util.CommonUtil;
-import org.apache.stratos.manager.domain.ApplicationDefinition;
-import org.apache.stratos.manager.domain.ApplicationSubscription;
-import org.apache.stratos.manager.domain.ServiceGroupDefinition;
+import org.apache.stratos.common.beans.ApplicationDefinition;
+import org.apache.stratos.common.beans.ApplicationSubscription;
+import org.apache.stratos.common.beans.ServiceGroupDefinition;
 import org.apache.stratos.manager.user.management.StratosUserManager;
 import org.apache.stratos.manager.user.management.exception.UserManagerException;
 import org.apache.stratos.rest.endpoint.ServiceHolder;
@@ -71,8 +70,6 @@ import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
 
-import static javax.ws.rs.core.Response.ResponseBuilder;
-
 /**
  * Stratos API v4.1 for Stratos 4.1.0 release.
  */

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index fd904a8..2d559e7 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -35,6 +35,7 @@ import org.apache.stratos.cloud.controller.stub.domain.Persistence;
 import org.apache.stratos.cloud.controller.stub.domain.Volume;
 import org.apache.stratos.common.beans.ApplicationBean;
 import org.apache.stratos.common.beans.GroupBean;
+import org.apache.stratos.common.beans.PropertyBean;
 import org.apache.stratos.common.beans.autoscaler.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.common.beans.autoscaler.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.common.beans.cartridge.definition.CartridgeDefinitionBean;
@@ -50,9 +51,9 @@ import org.apache.stratos.common.beans.topology.GroupInstanceBean;
 import org.apache.stratos.manager.artifact.distribution.coordinator.RepositoryNotifier;
 import org.apache.stratos.manager.client.AutoscalerServiceClient;
 import org.apache.stratos.manager.client.CloudControllerServiceClient;
-import org.apache.stratos.manager.domain.ApplicationDefinition;
-import org.apache.stratos.manager.domain.ApplicationSubscription;
-import org.apache.stratos.manager.domain.ServiceGroupDefinition;
+import org.apache.stratos.common.beans.ApplicationDefinition;
+import org.apache.stratos.common.beans.ApplicationSubscription;
+import org.apache.stratos.common.beans.ServiceGroupDefinition;
 import org.apache.stratos.manager.utils.ApplicationManagementUtil;
 import org.apache.stratos.manager.utils.CartridgeConstants;
 import org.apache.stratos.messaging.domain.applications.Application;
@@ -831,7 +832,7 @@ public class StratosApiV41Utils {
 
         if (appDefinition.getProperty() != null) {
             org.apache.stratos.autoscaler.stub.Properties properties = new org.apache.stratos.autoscaler.stub.Properties();
-            for (org.apache.stratos.manager.domain.PropertyBean propertyBean : appDefinition.getProperty()) {
+            for (PropertyBean propertyBean : appDefinition.getProperty()) {
                 org.apache.stratos.autoscaler.stub.Property property = new org.apache.stratos.autoscaler.stub.Property();
                 property.setName(propertyBean.getName());
                 property.setValue(propertyBean.getValue());

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/ServiceGroupDefinitionException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/ServiceGroupDefinitionException.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/ServiceGroupDefinitionException.java
new file mode 100644
index 0000000..97d5b2b
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/ServiceGroupDefinitionException.java
@@ -0,0 +1,37 @@
+/*
+ * 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.rest.endpoint.exception;
+
+public class ServiceGroupDefinitionException extends Exception {
+
+    private static final long serialVersionUID = 2469193418622416944L;
+
+    public ServiceGroupDefinitionException() {
+        super();
+    }
+
+    public ServiceGroupDefinitionException(String message) {
+        super(message);
+    }
+
+    public ServiceGroupDefinitionException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
index 2931eb3..5ff962f 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
@@ -19,10 +19,8 @@
 package org.apache.stratos.rest.endpoint.mock;
 
 import org.apache.stratos.common.beans.TenantInfoBean;
-import org.apache.stratos.manager.domain.Cartridge;
-import org.apache.stratos.manager.domain.SubscriptionInfo;
+import org.apache.stratos.common.beans.Cartridge;
 import org.apache.stratos.common.beans.UserInfoBean;
-import org.apache.stratos.common.beans.CartridgeInfoBean;
 import org.apache.stratos.common.beans.StratosApiResponse;
 import org.apache.stratos.common.beans.SubscriptionDomainRequest;
 import org.apache.stratos.common.beans.autoscaler.partition.ApplicationLevelNetworkPartition;
@@ -257,64 +255,6 @@ public class MockContext {
     	return p.toArray(new Cartridge[0]);
     }
 
-    public SubscriptionInfo subscribeToCartridge(CartridgeInfoBean cartridgeInfoBean) throws RestAPIException{
-        int tenantId = this.getTenantId();
-        String cartridgeType = cartridgeInfoBean.getCartridgeType();
-        String alias = cartridgeInfoBean.getAlias();
-        Cartridge subscribedCartridge=null;
-        
-        // retrieve the cartridge from single tenant cartridges
-        try{
-        	subscribedCartridge=getAvailableSingleTenantCartridgeInfo(cartridgeType);
-        }
-        catch(RestAPIException e){
-        	//ignore once
-        }
-        
-        // retrieve the cartridge from multitenant cartridges if not found
-        if(subscribedCartridge==null){
-        	try{
-            	subscribedCartridge=getAvailableMultiTenantCartridgeInfo(cartridgeType);
-            }
-            catch(RestAPIException e){
-            	throw new RestAPIException(Status.NO_CONTENT,"Cartridge not defined");
-            }
-        }
-               
-        if(subscribedCartridge!=null){
-            //Proper way is copy constructor
-            Cartridge copy = new Cartridge();
-            copy.setCartridgeType(subscribedCartridge.getCartridgeType());
-            copy.setDescription(subscribedCartridge.getDescription());
-            copy.setDisplayName(subscribedCartridge.getDisplayName());
-            copy.setMultiTenant(subscribedCartridge.isMultiTenant());
-            copy.setProvider(subscribedCartridge.getProvider());
-            copy.setVersion(subscribedCartridge.getVersion());
-            copy.setCartridgeAlias(alias);
-            copy.setHostName("dummy.stratos.com");
-            copy.setRepoURL("http://dummy.stratos.com/myrepo.git");
-
-            Map<String,Cartridge> subscriptions;
-            if(subscribedCartridges.containsKey(tenantId)){
-            	(subscribedCartridges.get(tenantId)).put(alias,copy);
-            }
-            else{
-            	subscriptions = new HashMap<String,Cartridge>();
-            	subscriptions.put(alias, copy);
-            	subscribedCartridges.put(tenantId, subscriptions);
-            }
-            
-            SubscriptionInfo subscriptionInfo = new SubscriptionInfo();
-            subscriptionInfo.setHostname(copy.getHostName());
-            subscriptionInfo.setRepositoryURL(copy.getRepoURL());
-
-            return subscriptionInfo;
-        }
-        
-        return new SubscriptionInfo();
-
-    }
-
     public StratosApiResponse unsubscribe(String alias) throws RestAPIException{
     	int tenantId = getTenantId();
     	if(subscribedCartridges.containsKey(tenantId)){

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosApiV40Mock.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosApiV40Mock.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosApiV40Mock.java
index 5250b7b..9997469 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosApiV40Mock.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosApiV40Mock.java
@@ -24,8 +24,7 @@ import java.net.URI;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.common.beans.TenantInfoBean;
-import org.apache.stratos.manager.domain.Cartridge;
-import org.apache.stratos.manager.domain.SubscriptionInfo;
+import org.apache.stratos.common.beans.Cartridge;
 import org.apache.stratos.manager.exception.ADCException;
 import org.apache.stratos.common.beans.UserInfoBean;
 import org.apache.stratos.rest.endpoint.Utils;
@@ -127,8 +126,8 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public SubscriptionInfo subscribe(CartridgeInfoBean cartridgeInfoBean) throws RestAPIException{
-          return MockContext.getInstance().subscribeToCartridge(cartridgeInfoBean);
+    public Response subscribe(CartridgeInfoBean cartridgeInfoBean) throws RestAPIException{
+          throw new RuntimeException("Not implemented");
     }
 
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
index 44b18eb..f538197 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
@@ -27,10 +27,12 @@ import org.apache.stratos.autoscaler.stub.pojo.*;
 import org.apache.stratos.autoscaler.stub.pojo.Dependencies;
 import org.apache.stratos.autoscaler.stub.pojo.ServiceGroup;
 import org.apache.stratos.cloud.controller.stub.domain.*;
+import org.apache.stratos.cloud.controller.stub.domain.Persistence;
 import org.apache.stratos.cloud.controller.stub.domain.PortMapping;
+import org.apache.stratos.cloud.controller.stub.domain.Volume;
 import org.apache.stratos.common.Properties;
 import org.apache.stratos.common.Property;
-import org.apache.stratos.common.beans.GroupBean;
+import org.apache.stratos.common.beans.*;
 import org.apache.stratos.common.beans.autoscaler.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.common.beans.autoscaler.partition.Partition;
 import org.apache.stratos.common.beans.autoscaler.policy.autoscale.*;
@@ -45,9 +47,7 @@ import org.apache.stratos.common.beans.kubernetes.PortRange;
 import org.apache.stratos.common.beans.subscription.domain.SubscriptionDomainBean;
 import org.apache.stratos.common.beans.topology.*;
 import org.apache.stratos.common.util.CommonUtil;
-import org.apache.stratos.manager.domain.*;
-import org.apache.stratos.manager.domain.DependencyDefinitions;
-import org.apache.stratos.manager.exception.ServiceGroupDefinitioException;
+import org.apache.stratos.common.beans.DependencyDefinitions;
 import org.apache.stratos.messaging.domain.applications.Application;
 import org.apache.stratos.messaging.domain.applications.Group;
 import org.apache.stratos.messaging.domain.instance.ApplicationInstance;
@@ -55,6 +55,7 @@ import org.apache.stratos.messaging.domain.instance.ClusterInstance;
 import org.apache.stratos.messaging.domain.instance.GroupInstance;
 import org.apache.stratos.messaging.domain.tenant.SubscriptionDomain;
 import org.apache.stratos.messaging.domain.topology.Cluster;
+import org.apache.stratos.rest.endpoint.exception.ServiceGroupDefinitionException;
 import org.wso2.carbon.stratos.common.beans.TenantInfoBean;
 
 import java.util.*;
@@ -1259,16 +1260,16 @@ public class ObjectConverter {
         return subscribableInfo;
     }
 
-    private static List<org.apache.stratos.manager.domain.PropertyBean>
+    private static List<org.apache.stratos.common.beans.PropertyBean>
         convertStubPropertiesToPropertyBeanList(org.apache.stratos.autoscaler.stub.Properties properties) {
 
-        List<org.apache.stratos.manager.domain.PropertyBean> propertyBeanList =
-                new ArrayList<org.apache.stratos.manager.domain.PropertyBean>();
+        List<org.apache.stratos.common.beans.PropertyBean> propertyBeanList =
+                new ArrayList<org.apache.stratos.common.beans.PropertyBean>();
         if((properties != null) && (properties.getProperties() != null)) {
             for (org.apache.stratos.autoscaler.stub.Property property : properties.getProperties()) {
                 if((property != null) && (property.getValue() instanceof String)) {
-                    org.apache.stratos.manager.domain.PropertyBean propertyBean =
-                            new org.apache.stratos.manager.domain.PropertyBean();
+                    org.apache.stratos.common.beans.PropertyBean propertyBean =
+                            new org.apache.stratos.common.beans.PropertyBean();
                     propertyBean.setName(property.getName());
                     propertyBean.setValue(String.valueOf(property.getValue()));
                     propertyBeanList.add(propertyBean);
@@ -1313,10 +1314,10 @@ public class ObjectConverter {
     }
 
 	private static org.apache.stratos.autoscaler.stub.Properties convertPropertyBeansToStubProperties(
-            List<org.apache.stratos.manager.domain.PropertyBean> property) {
+            List<org.apache.stratos.common.beans.PropertyBean> property) {
 		org.apache.stratos.autoscaler.stub.Properties prop = new org.apache.stratos.autoscaler.stub.Properties();
 		if (property != null) {
-			for (org.apache.stratos.manager.domain.PropertyBean propertyBean : property) {
+			for (org.apache.stratos.common.beans.PropertyBean propertyBean : property) {
 				org.apache.stratos.autoscaler.stub.Property p = new org.apache.stratos.autoscaler.stub.Property();
 				p.setName(propertyBean.getName());
 				p.setValue(propertyBean.getValue());
@@ -1532,11 +1533,11 @@ public class ObjectConverter {
         return carbonTenantInfoBean;
     }
 
-    public static ServiceGroup convertServiceGroupDefinitionToASStubServiceGroup(ServiceGroupDefinition serviceGroupDefinition) throws ServiceGroupDefinitioException {
+    public static ServiceGroup convertServiceGroupDefinitionToASStubServiceGroup(ServiceGroupDefinition serviceGroupDefinition) throws ServiceGroupDefinitionException {
         ServiceGroup servicegroup = new ServiceGroup();
 
         // implement conversion (mostly List -> Array)
-        servicegroup.setGroupscalingEnabled(serviceGroupDefinition.isGroupScalingEnabled);
+        servicegroup.setGroupscalingEnabled(serviceGroupDefinition.isGroupScalingEnabled());
         List<ServiceGroupDefinition> groupsDef = serviceGroupDefinition.getGroups();
         List<String> cartridgesDef = serviceGroupDefinition.getCartridges();
 
@@ -1640,16 +1641,44 @@ public class ObjectConverter {
      * 2. terminate-dependents
      * 3. terminate-all
      *
-     * @throws ServiceGroupDefinitioException if terminationBehavior is different to what is
+     * @throws ServiceGroupDefinitionException if terminationBehavior is different to what is
      *                                        listed above
      */
-    private static void validateTerminationBehavior(String terminationBehavior) throws ServiceGroupDefinitioException {
+    private static void validateTerminationBehavior(String terminationBehavior) throws ServiceGroupDefinitionException {
 
         if (!(terminationBehavior == null || "terminate-none".equals(terminationBehavior) ||
                 "terminate-dependents".equals(terminationBehavior) || "terminate-all".equals(terminationBehavior))) {
-            throw new ServiceGroupDefinitioException("Invalid Termination Behaviour specified: [ " +
+            throw new ServiceGroupDefinitionException("Invalid Termination Behaviour specified: [ " +
                     terminationBehavior + " ], should be one of 'terminate-none', 'terminate-dependents', " +
                     " 'terminate-all' ");
         }
     }
+
+    public static org.apache.stratos.common.beans.Persistence convertStubPersistenceToPersistence(Persistence stubPersistence) {
+        org.apache.stratos.common.beans.Persistence persistence = new org.apache.stratos.common.beans.Persistence();
+        persistence.setPersistanceRequired(stubPersistence.getPersistanceRequired());
+        List<org.apache.stratos.common.beans.Volume> volumes = new ArrayList<org.apache.stratos.common.beans.Volume>();
+        for(org.apache.stratos.cloud.controller.stub.domain.Volume stubVolume : stubPersistence.getVolumes()) {
+            org.apache.stratos.common.beans.Volume volume = convertStubVolumeToVolume(stubVolume);
+            if(volume != null) {
+                volumes.add(volume);
+            }
+        }
+        org.apache.stratos.common.beans.Volume[] volumesArray = volumes.toArray(new org.apache.stratos.common.beans.Volume[volumes.size()]);
+        persistence.setVolumes(volumesArray);
+        return persistence;
+    }
+
+    private static org.apache.stratos.common.beans.Volume convertStubVolumeToVolume(Volume stubVolume) {
+        org.apache.stratos.common.beans.Volume volume = new org.apache.stratos.common.beans.Volume();
+        volume.setId(stubVolume.getId());
+        volume.setDevice(stubVolume.getDevice());
+        volume.setIaasType(stubVolume.getIaasType());
+        volume.setMappingPath(stubVolume.getMappingPath());
+        volume.setRemoveOntermination(stubVolume.getRemoveOntermination());
+        volume.setSnapshotId(stubVolume.getSnapshotId());
+        volume.setVolumeId(stubVolume.getVolumeId());
+        volume.setSize(stubVolume.getSize());
+        return volume;
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
index 773c0c5..6cee5ef 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax27="http://common.stratos.apache.org/xsd" xmlns:ax25="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax214="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax220="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/a
 ddressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax27="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax25="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax216="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax222="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax210="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.
 org/wsdl/http/" xmlns:ax211="http://common.stratos.apache.org/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
     <wsdl:types>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="AutoscalePolicy">
@@ -8,7 +8,7 @@
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"/>
                     <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax23:LoadThresholds"/>
+                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax27:LoadThresholds"/>
                     <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
                 </xs:sequence>
             </xs:complexType>
@@ -20,16 +20,16 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax215="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax219="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://common.stratos.apache.org/xsd"/>
             <xs:complexType name="ApplicationContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="components" nillable="true" type="ax214:ComponentContext"/>
+                    <xs:element minOccurs="0" name="components" nillable="true" type="ax218:ComponentContext"/>
                     <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax211:Properties"/>
                     <xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="teantAdminUsername" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
@@ -38,16 +38,16 @@
             </xs:complexType>
             <xs:complexType name="ComponentContext">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax214:CartridgeContext"/>
-                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax214:DependencyContext"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax214:GroupContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax218:CartridgeContext"/>
+                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax218:DependencyContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax218:GroupContext"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="CartridgeContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="cartridgeMax" type="xs:int"/>
                     <xs:element minOccurs="0" name="cartridgeMin" type="xs:int"/>
-                    <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax214:SubscribableInfoContext"/>
+                    <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax218:SubscribableInfoContext"/>
                     <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
@@ -60,7 +60,7 @@
                     <xs:element minOccurs="0" name="maxMembers" type="xs:int"/>
                     <xs:element minOccurs="0" name="minMembers" type="xs:int"/>
                     <xs:element minOccurs="0" name="privateRepo" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax211:Properties"/>
                     <xs:element minOccurs="0" name="repoPassword" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="repoUrl" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="repoUsername" nillable="true" type="xs:string"/>
@@ -76,8 +76,8 @@
             <xs:complexType name="GroupContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax214:CartridgeContext"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax214:GroupContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax218:CartridgeContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax218:GroupContext"/>
                     <xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"/>
                     <xs:element minOccurs="0" name="groupMinInstances" type="xs:int"/>
                     <xs:element minOccurs="0" name="groupScalingEnabled" type="xs:boolean"/>
@@ -89,8 +89,8 @@
             <xs:complexType name="ServiceGroup">
                 <xs:sequence>
                     <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax222:Dependencies"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax222:ServiceGroup"/>
+                    <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax21:Dependencies"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax21:ServiceGroup"/>
                     <xs:element minOccurs="0" name="groupscalingEnabled" type="xs:boolean"/>
                     <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                 </xs:sequence>
@@ -103,15 +103,15 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax29="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax213="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
             <xs:complexType name="DeploymentPolicy">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax29:Partition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax213:Partition"/>
                     <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax29:ApplicationLevelNetworkPartition"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax29:ChildLevelNetworkPartition"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax25:ChildPolicy"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax213:ApplicationLevelNetworkPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax213:ChildLevelNetworkPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax29:ChildPolicy"/>
                     <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
                     <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
@@ -120,7 +120,7 @@
             <xs:complexType name="ChildPolicy">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax29:ChildLevelNetworkPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax213:ChildLevelNetworkPartition"/>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
@@ -131,7 +131,7 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax28="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax212="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://common.stratos.apache.org/xsd"/>
             <xs:complexType name="Partition">
                 <xs:sequence>
@@ -139,7 +139,7 @@
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
                     <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax212:Properties"/>
                     <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
@@ -148,12 +148,12 @@
                     <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax26:Partition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax210:Partition"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="ChildLevelNetworkPartition">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax26:ChildLevelPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax210:ChildLevelPartition"/>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="min" type="xs:int"/>
                     <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
@@ -177,7 +177,7 @@
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
             <xs:complexType name="Properties">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax27:Property"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax211:Property"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="Property">
@@ -187,250 +187,250 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax24="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://common.stratos.apache.org/xsd" xmlns:ax218="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
+        <xs:schema xmlns:ax28="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax215="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax220="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://common.stratos.apache.org/xsd" xmlns:ax223="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
+            <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
+            <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://common.stratos.apache.org/xsd"/>
             <xs:import namespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
-            <xs:element name="AutoScalerServiceInvalidPolicyException">
+            <xs:element name="removeServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax21:InvalidPolicyException"/>
+                        <xs:element minOccurs="0" name="groupName" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addAutoScalingPolicy">
+            <xs:element name="getServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax23:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addAutoScalingPolicyResponse">
+            <xs:element name="getServiceGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateAutoScalingPolicy">
+            <xs:element name="AutoScalerServiceAutoScalerException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax23:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax23:AutoScalerException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateAutoScalingPolicyResponse">
+            <xs:element name="getServiceGroups">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
-                    </xs:sequence>
+                    <xs:sequence/>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getDeploymentPolicy">
+            <xs:element name="getServiceGroupsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getDeploymentPolicyResponse">
+            <xs:element name="serviceGroupExist">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAutoscalingPolicy">
+            <xs:element name="serviceGroupExistResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAutoscalingPolicyResponse">
+            <xs:element name="undeployServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax23:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getNetworkPartitions">
+            <xs:element name="AutoScalerServiceInvalidPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax25:InvalidPolicyException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getNetworkPartitionsResponse">
+            <xs:element name="addAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:ApplicationLevelNetworkPartition"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax27:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceApplicationDefinitionException">
+            <xs:element name="addAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax212:ApplicationDefinitionException"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addApplication">
+            <xs:element name="updateAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax216:ApplicationContext"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax27:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getApplication">
+            <xs:element name="updateAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getApplicationResponse">
+            <xs:element name="getDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax216:ApplicationContext"/>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getApplications">
+            <xs:element name="getDeploymentPolicyResponse">
                 <xs:complexType>
-                    <xs:sequence/>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"/>
+                    </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getApplicationsResponse">
+            <xs:element name="getAutoscalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax216:ApplicationContext"/>
+                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployApplication">
+            <xs:element name="getAutoscalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax25:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax27:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployApplicationResponse">
+            <xs:element name="getNetworkPartitions">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="undeployApplication">
+            <xs:element name="getNetworkPartitionsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax215:ApplicationLevelNetworkPartition"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deleteApplication">
+            <xs:element name="AutoScalerServiceApplicationDefinitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax217:ApplicationDefinitionException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidArgumentException">
+            <xs:element name="addApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax217:InvalidArgumentException"/>
+                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax218:ApplicationContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateClusterMonitor">
+            <xs:element name="getApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidServiceGroupException">
+            <xs:element name="getApplicationResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax220:InvalidServiceGroupException"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax218:ApplicationContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addServiceGroup">
+            <xs:element name="getApplications">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax222:ServiceGroup"/>
-                    </xs:sequence>
+                    <xs:sequence/>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeServiceGroup">
+            <xs:element name="getApplicationsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="groupName" nillable="true" type="xs:string"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax218:ApplicationContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroup">
+            <xs:element name="deployApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax29:DeploymentPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupResponse">
+            <xs:element name="deployApplicationResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax222:ServiceGroup"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceAutoScalerException">
+            <xs:element name="undeployApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax217:AutoScalerException"/>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroups">
+            <xs:element name="deleteApplication">
                 <xs:complexType>
-                    <xs:sequence/>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                    </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupsResponse">
+            <xs:element name="AutoScalerServiceInvalidArgumentException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax222:ServiceGroup"/>
+                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax23:InvalidArgumentException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="serviceGroupExist">
+            <xs:element name="updateClusterMonitor">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax221:Properties"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="serviceGroupExistResponse">
+            <xs:element name="AutoScalerServiceInvalidServiceGroupException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax222:InvalidServiceGroupException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="undeployServiceGroup">
+            <xs:element name="addServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax21:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -442,7 +442,7 @@
             <xs:element name="getAutoScalingPoliciesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax23:AutoscalePolicy"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -455,11 +455,6 @@
             </xs:complexType>
         </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.autoscaler.stratos.apache.org/xsd">
-            <xs:complexType name="InvalidArgumentException">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
             <xs:complexType name="AutoScalerException">
                 <xs:complexContent>
                     <xs:extension base="xs:RuntimeException">
@@ -467,6 +462,11 @@
                     </xs:extension>
                 </xs:complexContent>
             </xs:complexType>
+            <xs:complexType name="InvalidArgumentException">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
         </xs:schema>
     </wsdl:types>
     <wsdl:message name="getAutoScalingPoliciesRequest">
@@ -526,15 +526,15 @@
     <wsdl:message name="AutoScalerServiceInvalidServiceGroupException">
         <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidServiceGroupException"/>
     </wsdl:message>
+    <wsdl:message name="deleteApplicationRequest">
+        <wsdl:part name="parameters" element="ns:deleteApplication"/>
+    </wsdl:message>
     <wsdl:message name="getServiceGroupRequest">
         <wsdl:part name="parameters" element="ns:getServiceGroup"/>
     </wsdl:message>
     <wsdl:message name="getServiceGroupResponse">
         <wsdl:part name="parameters" element="ns:getServiceGroupResponse"/>
     </wsdl:message>
-    <wsdl:message name="deleteApplicationRequest">
-        <wsdl:part name="parameters" element="ns:deleteApplication"/>
-    </wsdl:message>
     <wsdl:message name="undeployServiceGroupRequest">
         <wsdl:part name="parameters" element="ns:undeployServiceGroup"/>
     </wsdl:message>
@@ -613,13 +613,13 @@
             <wsdl:input message="ns:addServiceGroupRequest" wsaw:Action="urn:addServiceGroup"/>
             <wsdl:fault message="ns:AutoScalerServiceInvalidServiceGroupException" name="AutoScalerServiceInvalidServiceGroupException" wsaw:Action="urn:addServiceGroupAutoScalerServiceInvalidServiceGroupException"/>
         </wsdl:operation>
+        <wsdl:operation name="deleteApplication">
+            <wsdl:input message="ns:deleteApplicationRequest" wsaw:Action="urn:deleteApplication"/>
+        </wsdl:operation>
         <wsdl:operation name="getServiceGroup">
             <wsdl:input message="ns:getServiceGroupRequest" wsaw:Action="urn:getServiceGroup"/>
             <wsdl:output message="ns:getServiceGroupResponse" wsaw:Action="urn:getServiceGroupResponse"/>
         </wsdl:operation>
-        <wsdl:operation name="deleteApplication">
-            <wsdl:input message="ns:deleteApplicationRequest" wsaw:Action="urn:deleteApplication"/>
-        </wsdl:operation>
         <wsdl:operation name="undeployServiceGroup">
             <wsdl:input message="ns:undeployServiceGroupRequest" wsaw:Action="urn:undeployServiceGroup"/>
             <wsdl:fault message="ns:AutoScalerServiceAutoScalerException" name="AutoScalerServiceAutoScalerException" wsaw:Action="urn:undeployServiceGroupAutoScalerServiceAutoScalerException"/>
@@ -739,12 +739,6 @@
                 <soap:fault use="literal" name="AutoScalerServiceInvalidServiceGroupException"/>
             </wsdl:fault>
         </wsdl:operation>
-        <wsdl:operation name="deleteApplication">
-            <soap:operation soapAction="urn:deleteApplication" style="document"/>
-            <wsdl:input>
-                <soap:body use="literal"/>
-            </wsdl:input>
-        </wsdl:operation>
         <wsdl:operation name="getServiceGroup">
             <soap:operation soapAction="urn:getServiceGroup" style="document"/>
             <wsdl:input>
@@ -754,6 +748,12 @@
                 <soap:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
+        <wsdl:operation name="deleteApplication">
+            <soap:operation soapAction="urn:deleteApplication" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
         <wsdl:operation name="undeployServiceGroup">
             <soap:operation soapAction="urn:undeployServiceGroup" style="document"/>
             <wsdl:input>
@@ -916,12 +916,6 @@
                 <soap12:fault use="literal" name="AutoScalerServiceInvalidServiceGroupException"/>
             </wsdl:fault>
         </wsdl:operation>
-        <wsdl:operation name="deleteApplication">
-            <soap12:operation soapAction="urn:deleteApplication" style="document"/>
-            <wsdl:input>
-                <soap12:body use="literal"/>
-            </wsdl:input>
-        </wsdl:operation>
         <wsdl:operation name="getServiceGroup">
             <soap12:operation soapAction="urn:getServiceGroup" style="document"/>
             <wsdl:input>
@@ -931,6 +925,12 @@
                 <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
+        <wsdl:operation name="deleteApplication">
+            <soap12:operation soapAction="urn:deleteApplication" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
         <wsdl:operation name="undeployServiceGroup">
             <soap12:operation soapAction="urn:undeployServiceGroup" style="document"/>
             <wsdl:input>
@@ -1081,12 +1081,6 @@
                 <mime:content type="text/xml" part="parameters"/>
             </wsdl:input>
         </wsdl:operation>
-        <wsdl:operation name="deleteApplication">
-            <http:operation location="deleteApplication"/>
-            <wsdl:input>
-                <mime:content type="text/xml" part="parameters"/>
-            </wsdl:input>
-        </wsdl:operation>
         <wsdl:operation name="getServiceGroup">
             <http:operation location="getServiceGroup"/>
             <wsdl:input>
@@ -1096,6 +1090,12 @@
                 <mime:content type="text/xml" part="parameters"/>
             </wsdl:output>
         </wsdl:operation>
+        <wsdl:operation name="deleteApplication">
+            <http:operation location="deleteApplication"/>
+            <wsdl:input>
+                <mime:content type="text/xml" part="parameters"/>
+            </wsdl:input>
+        </wsdl:operation>
         <wsdl:operation name="undeployServiceGroup">
             <http:operation location="undeployServiceGroup"/>
             <wsdl:input>


[6/6] stratos git commit: Fixing subscribable info context search logic in instance status event receiver

Posted by im...@apache.org.
Fixing subscribable info context search logic in instance status event receiver


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/e6a03d1b
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/e6a03d1b
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/e6a03d1b

Branch: refs/heads/master
Commit: e6a03d1bde248f9d5cf018591968e50c9ba2d7b2
Parents: 2032c1b
Author: Imesh Gunaratne <im...@apache.org>
Authored: Sun Jan 4 13:04:22 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Sun Jan 4 13:04:22 2015 +0530

----------------------------------------------------------------------
 ...ratosManagerInstanceStatusEventReceiver.java | 26 +++++++++++++++++---
 1 file changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/e6a03d1b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/messaging/receiver/StratosManagerInstanceStatusEventReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/messaging/receiver/StratosManagerInstanceStatusEventReceiver.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/messaging/receiver/StratosManagerInstanceStatusEventReceiver.java
index 3bc325c..b874934 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/messaging/receiver/StratosManagerInstanceStatusEventReceiver.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/messaging/receiver/StratosManagerInstanceStatusEventReceiver.java
@@ -22,9 +22,7 @@ package org.apache.stratos.manager.messaging.receiver;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.stub.pojo.ApplicationContext;
-import org.apache.stratos.autoscaler.stub.pojo.CartridgeContext;
-import org.apache.stratos.autoscaler.stub.pojo.SubscribableInfoContext;
+import org.apache.stratos.autoscaler.stub.pojo.*;
 import org.apache.stratos.manager.client.AutoscalerServiceClient;
 import org.apache.stratos.manager.messaging.publisher.InstanceNotificationPublisher;
 import org.apache.stratos.messaging.event.Event;
@@ -117,7 +115,27 @@ public class StratosManagerInstanceStatusEventReceiver extends InstanceStatusEve
      */
     private List<SubscribableInfoContext> findCartridgeContext(ApplicationContext applicationContext, String serviceName) {
         List<SubscribableInfoContext> subscribableInfoContexts = new ArrayList<SubscribableInfoContext>();
-        CartridgeContext[] cartridgeContexts = applicationContext.getComponents().getCartridgeContexts();
+
+        ComponentContext componentContext = applicationContext.getComponents();
+        List<SubscribableInfoContext> contexts = findSubscribableInfoContexts(serviceName,
+                componentContext.getCartridgeContexts());
+        subscribableInfoContexts.addAll(contexts);
+
+        GroupContext[] groupContexts = componentContext.getGroupContexts();
+        if(groupContexts != null) {
+            for(GroupContext groupContext : groupContexts) {
+                if(groupContext != null) {
+                    contexts = findSubscribableInfoContexts(serviceName, groupContext.getCartridgeContexts());
+                    subscribableInfoContexts.addAll(contexts);
+                }
+            }
+        }
+
+        return subscribableInfoContexts;
+    }
+
+    private List<SubscribableInfoContext> findSubscribableInfoContexts(String serviceName, CartridgeContext[] cartridgeContexts) {
+        List<SubscribableInfoContext> subscribableInfoContexts = new ArrayList<SubscribableInfoContext>();
         if (cartridgeContexts != null) {
             for (CartridgeContext cartridgeContext : cartridgeContexts) {
                 if (cartridgeContext != null) {


[2/6] stratos git commit: Moving domain classes in stratos manager used by rest api to stratos common

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl b/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
index 05ea315..7139af4 100644
--- a/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
+++ b/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
@@ -1,515 +1,515 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://impl.services.controller.cloud.stratos.apache.org" xmlns:ax27="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax23="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax24="http://common.stratos.apache.org/xsd" xmlns:ax21="http://exception.controller.cloud.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax210="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ns="http://impl.services.controller.cloud.stratos.apache.org" xmlns:ax27="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax25="http://common.stratos.apache.org/xsd" xmlns:ax23="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax21="http://exception.controller.cloud.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
     <wsdl:types>
-        <xs:schema xmlns:ax29="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax26="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax211="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax22="http://exception.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
+        <xs:schema xmlns:ax28="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax211="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax24="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax22="http://exception.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
             <xs:import namespace="http://exception.controller.cloud.stratos.apache.org/xsd"/>
             <xs:import namespace="http://domain.controller.cloud.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd"/>
             <xs:import namespace="http://topology.domain.messaging.stratos.apache.org/xsd"/>
-            <xs:element name="getCartridges">
+            <xs:import namespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd"/>
+            <xs:element name="CloudControllerServiceInvalidServiceGroupException">
                 <xs:complexType>
-                    <xs:sequence/>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
+                    </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getCartridgesResponse">
+            <xs:element name="getServiceGroupSubGroups">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
+            <xs:element name="getServiceGroupSubGroupsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidIaasProviderException">
+            <xs:element name="getServiceGroupCartridges">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addCartridge">
+            <xs:element name="getServiceGroupCartridgesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax26:CartridgeConfig"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
+            <xs:element name="getServiceGroupDependencies">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeCartridge">
+            <xs:element name="getServiceGroupDependenciesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax23:Dependencies"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidServiceGroupException">
+            <xs:element name="CloudControllerServiceInvalidPartitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
+                        <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroup">
+            <xs:element name="validatePartition">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="partition" nillable="true" type="ax23:Partition"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupResponse">
+            <xs:element name="validatePartitionResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ServiceGroup"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addServiceGroup">
+            <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax26:ServiceGroup"/>
+                        <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeServiceGroup">
+            <xs:element name="validateDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax23:Partition"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getClusterContext">
+            <xs:element name="validateDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getClusterContextResponse">
+            <xs:element name="CloudControllerServiceCartridgeNotFoundException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ClusterContext"/>
+                        <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax21:CartridgeNotFoundException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceNonExistingKubernetesClusterException">
+            <xs:element name="CloudControllerServiceInvalidIaasProviderException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesClusterException" nillable="true" type="ax21:NonExistingKubernetesClusterException"/>
+                        <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesCluster">
+            <xs:element name="CloudControllerServiceCloudControllerException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="CloudControllerException" nillable="true" type="ax21:CloudControllerException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesClusterResponse">
+            <xs:element name="startInstances">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceContexts" nillable="true" type="ax23:InstanceContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceNonExistingKubernetesHostException">
+            <xs:element name="startInstancesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax23:MemberContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesHost">
+            <xs:element name="CloudControllerServiceInvalidClusterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesHostId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="InvalidClusterException" nillable="true" type="ax21:InvalidClusterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesHostResponse">
+            <xs:element name="terminateInstances">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidKubernetesClusterException">
+            <xs:element name="updateClusterStatus">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesClusterException" nillable="true" type="ax21:InvalidKubernetesClusterException"/>
+                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="status" nillable="true" type="ax27:ClusterStatus"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesCluster">
+            <xs:element name="CloudControllerServiceUnregisteredClusterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax29:KubernetesCluster"/>
+                        <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesClusterResponse">
+            <xs:element name="unregisterService">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getKubernetesCluster">
+            <xs:element name="getCartridgeInfo">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getKubernetesClusterResponse">
+            <xs:element name="getCartridgeInfoResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax23:CartridgeInfo"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getKubernetesClusters">
+            <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
                 <xs:complexType>
-                    <xs:sequence/>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
+                    </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getKubernetesClustersResponse">
+            <xs:element name="createApplicationClusters">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
+                        <xs:element minOccurs="0" name="appId" nillable="true" type="xs:string"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax23:ApplicationClusterContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceCartridgeNotFoundException">
+            <xs:element name="CloudControllerServiceClusterInstanceCreationException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax21:CartridgeNotFoundException"/>
+                        <xs:element minOccurs="0" name="ClusterInstanceCreationException" nillable="true" type="ax21:ClusterInstanceCreationException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceCloudControllerException">
+            <xs:element name="createClusterInstance">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="CloudControllerException" nillable="true" type="ax21:CloudControllerException"/>
+                        <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="startInstance">
+            <xs:element name="CloudControllerServiceNonExistingKubernetesClusterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesClusterException" nillable="true" type="ax21:NonExistingKubernetesClusterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="startInstanceResponse">
+            <xs:element name="getMasterForKubernetesCluster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
+                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidMemberException">
+            <xs:element name="getMasterForKubernetesClusterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesMaster"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="terminateInstance">
+            <xs:element name="getHostsForKubernetesCluster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="registerService">
+            <xs:element name="getHostsForKubernetesClusterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="registrant" nillable="true" type="ax26:Registrant"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesHost"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="registerServiceResponse">
+            <xs:element name="CloudControllerServiceInvalidKubernetesHostException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax21:InvalidKubernetesHostException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupSubGroups">
+            <xs:element name="addKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupSubGroupsResponse">
+            <xs:element name="addKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupCartridges">
+            <xs:element name="CloudControllerServiceNonExistingKubernetesHostException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupCartridgesResponse">
+            <xs:element name="updateKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupDependencies">
+            <xs:element name="updateKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupDependenciesResponse">
+            <xs:element name="CloudControllerServiceInvalidKubernetesMasterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Dependencies"/>
+                        <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax21:InvalidKubernetesMasterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidPartitionException">
+            <xs:element name="CloudControllerServiceNonExistingKubernetesMasterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax21:NonExistingKubernetesMasterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="validatePartition">
+            <xs:element name="updateKubernetesMaster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/>
+                        <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax29:KubernetesMaster"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="validatePartitionResponse">
+            <xs:element name="updateKubernetesMasterResponse">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="validateDeploymentPolicy">
+            <xs:element name="startInstance">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax26:Partition"/>
+                        <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax23:InstanceContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="validateDeploymentPolicyResponse">
+            <xs:element name="startInstanceResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax23:MemberContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="startInstances">
+            <xs:element name="CloudControllerServiceInvalidMemberException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceContexts" nillable="true" type="ax26:InstanceContext"/>
+                        <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="startInstancesResponse">
+            <xs:element name="terminateInstance">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
+                        <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidClusterException">
+            <xs:element name="getCartridges">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidClusterException" nillable="true" type="ax21:InvalidClusterException"/>
-                    </xs:sequence>
+                    <xs:sequence/>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="terminateInstances">
+            <xs:element name="getCartridgesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateClusterStatus">
+            <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="status" nillable="true" type="ax210:ClusterStatus"/>
+                        <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceUnregisteredClusterException">
+            <xs:element name="addCartridge">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
+                        <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax23:CartridgeConfig"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="unregisterService">
+            <xs:element name="removeCartridge">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getCartridgeInfo">
+            <xs:element name="getServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getCartridgeInfoResponse">
+            <xs:element name="getServiceGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:CartridgeInfo"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax23:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
+            <xs:element name="addServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
+                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax23:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="createApplicationClusters">
+            <xs:element name="removeServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="appId" nillable="true" type="xs:string"/>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax26:ApplicationClusterContext"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceClusterInstanceCreationException">
+            <xs:element name="getClusterContext">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ClusterInstanceCreationException" nillable="true" type="ax21:ClusterInstanceCreationException"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="createClusterInstance">
+            <xs:element name="getClusterContextResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax23:ClusterContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getMasterForKubernetesCluster">
+            <xs:element name="removeKubernetesCluster">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getMasterForKubernetesClusterResponse">
+            <xs:element name="removeKubernetesClusterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesMaster"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getHostsForKubernetesCluster">
+            <xs:element name="removeKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesHostId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getHostsForKubernetesClusterResponse">
+            <xs:element name="removeKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesHost"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidKubernetesHostException">
+            <xs:element name="CloudControllerServiceInvalidKubernetesClusterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax21:InvalidKubernetesHostException"/>
+                        <xs:element minOccurs="0" name="InvalidKubernetesClusterException" nillable="true" type="ax21:InvalidKubernetesClusterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesHost">
+            <xs:element name="addKubernetesCluster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
+                        <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax29:KubernetesCluster"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesHostResponse">
+            <xs:element name="addKubernetesClusterResponse">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesHost">
+            <xs:element name="getKubernetesCluster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
+                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesHostResponse">
+            <xs:element name="getKubernetesClusterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidKubernetesMasterException">
+            <xs:element name="getKubernetesClusters">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax21:InvalidKubernetesMasterException"/>
-                    </xs:sequence>
+                    <xs:sequence/>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceNonExistingKubernetesMasterException">
+            <xs:element name="getKubernetesClustersResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax21:NonExistingKubernetesMasterException"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesMaster">
+            <xs:element name="registerService">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax29:KubernetesMaster"/>
+                        <xs:element minOccurs="0" name="registrant" nillable="true" type="ax23:Registrant"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesMasterResponse">
+            <xs:element name="registerServiceResponse">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="return" type="xs:boolean"/>
@@ -531,7 +531,7 @@
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
             <xs:complexType name="Properties">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax24:Property"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="Property">
@@ -542,12 +542,12 @@
             </xs:complexType>
         </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.controller.cloud.stratos.apache.org/xsd">
-            <xs:complexType name="InvalidCartridgeDefinitionException">
+            <xs:complexType name="InvalidServiceGroupException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidIaasProviderException">
+            <xs:complexType name="InvalidPartitionException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
@@ -557,122 +557,262 @@
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidServiceGroupException">
+            <xs:complexType name="CartridgeNotFoundException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="NonExistingKubernetesClusterException">
+            <xs:complexType name="InvalidIaasProviderException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="NonExistingKubernetesHostException">
+            <xs:complexType name="CloudControllerException">
+                <xs:complexContent>
+                    <xs:extension base="xs:RuntimeException">
+                        <xs:sequence/>
+                    </xs:extension>
+                </xs:complexContent>
+            </xs:complexType>
+            <xs:complexType name="InvalidClusterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidKubernetesClusterException">
+            <xs:complexType name="UnregisteredClusterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="CartridgeNotFoundException">
+            <xs:complexType name="ApplicationClusterRegistrationException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="CloudControllerException">
-                <xs:complexContent>
-                    <xs:extension base="xs:RuntimeException">
-                        <xs:sequence/>
-                    </xs:extension>
-                </xs:complexContent>
-            </xs:complexType>
-            <xs:complexType name="InvalidMemberException">
+            <xs:complexType name="ClusterInstanceCreationException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidPartitionException">
+            <xs:complexType name="NonExistingKubernetesClusterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidClusterException">
+            <xs:complexType name="InvalidKubernetesHostException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="UnregisteredClusterException">
+            <xs:complexType name="NonExistingKubernetesHostException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="ApplicationClusterRegistrationException">
+            <xs:complexType name="InvalidKubernetesMasterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="ClusterInstanceCreationException">
+            <xs:complexType name="NonExistingKubernetesMasterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidKubernetesHostException">
+            <xs:complexType name="InvalidMemberException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidKubernetesMasterException">
+            <xs:complexType name="InvalidCartridgeDefinitionException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="NonExistingKubernetesMasterException">
+            <xs:complexType name="InvalidKubernetesClusterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax28="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax210="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd">
             <xs:import namespace="http://common.stratos.apache.org/xsd"/>
-            <xs:complexType name="KubernetesCluster">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax27:KubernetesHost"/>
-                    <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax27:KubernetesMaster"/>
-                    <xs:element minOccurs="0" name="portRange" nillable="true" type="ax27:PortRange"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
-                </xs:sequence>
-            </xs:complexType>
             <xs:complexType name="KubernetesHost">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="hostIpAddress" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax210:Properties"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="KubernetesMaster">
                 <xs:complexContent>
-                    <xs:extension base="ax27:KubernetesHost">
+                    <xs:extension base="ax29:KubernetesHost">
                         <xs:sequence>
                             <xs:element minOccurs="0" name="endpoint" nillable="true" type="xs:string"/>
                         </xs:sequence>
                     </xs:extension>
                 </xs:complexContent>
             </xs:complexType>
-            <xs:complexType name="PortRange">
+            <xs:complexType name="KubernetesCluster">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax29:KubernetesHost"/>
+                    <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax29:KubernetesMaster"/>
+                    <xs:element minOccurs="0" name="portRange" nillable="true" type="ax29:PortRange"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax210:Properties"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="PortRange">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="lower" type="xs:int"/>
+                    <xs:element minOccurs="0" name="upper" type="xs:int"/>
+                </xs:sequence>
+            </xs:complexType>
+        </xs:schema>
+        <xs:schema xmlns:ax26="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.controller.cloud.stratos.apache.org/xsd">
+            <xs:import namespace="http://common.stratos.apache.org/xsd"/>
+            <xs:complexType name="Dependencies">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="killBehaviour" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="Partition">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="partitionMax" type="xs:int"/>
+                    <xs:element minOccurs="0" name="partitionMin" type="xs:int"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="InstanceContext">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="clusterInstanceId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="initTime" type="xs:long"/>
+                    <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="obsoleteExpiryTime" type="xs:long"/>
+                    <xs:element minOccurs="0" name="partition" nillable="true" type="ax23:Partition"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="MemberContext">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allocatedIPs" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="clusterInstanceId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="defaultPrivateIP" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="defaultPublicIP" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="dynamicPayload" nillable="true" type="xs:anyType"/>
+                    <xs:element minOccurs="0" name="initTime" type="xs:long"/>
+                    <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="instanceMetadata" nillable="true" type="ax23:InstanceMetadata"/>
+                    <xs:element minOccurs="0" name="lbClusterId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="obsoleteExpiryTime" type="xs:long"/>
+                    <xs:element minOccurs="0" name="obsoleteInitTime" type="xs:long"/>
+                    <xs:element minOccurs="0" name="partition" nillable="true" type="ax23:Partition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="privateIPs" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="publicIPs" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="InstanceMetadata">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="hypervisor" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="imageId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="loginPort" type="xs:int"/>
+                    <xs:element minOccurs="0" name="operatingSystem64bit" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="operatingSystemArchitecture" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="operatingSystemName" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="operatingSystemVersion" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="ram" type="xs:int"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="CartridgeInfo">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="appTypes" nillable="true" type="ax23:AppType"/>
+                    <xs:element minOccurs="0" name="baseDir" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="category" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="defaultAutoscalingPolicy" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="defaultDeploymentPolicy" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="deploymentDirs" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="lbConfig" nillable="true" type="ax23:LoadbalancerConfig"/>
+                    <xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="persistence" nillable="true" type="ax23:Persistence"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="portMappings" nillable="true" type="ax23:PortMapping"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"/>
+                    <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="serviceGroup" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="version" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="AppType">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="appSpecificMapping" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="LoadbalancerConfig">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="Persistence">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="persistanceRequired" type="xs:boolean"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="Volume">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="device" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="iaasType" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="mappingPath" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="removeOntermination" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="size" type="xs:int"/>
+                    <xs:element minOccurs="0" name="snapshotId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="volumeId" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="PortMapping">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="lower" type="xs:int"/>
-                    <xs:element minOccurs="0" name="upper" type="xs:int"/>
+                    <xs:element minOccurs="0" name="port" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="protocol" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="proxyPort" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="ApplicationClusterContext">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="autoscalePolicyName" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-        </xs:schema>
-        <xs:schema xmlns:ax25="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.controller.cloud.stratos.apache.org/xsd">
-            <xs:import namespace="http://common.stratos.apache.org/xsd"/>
             <xs:complexType name="CartridgeConfig">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="baseDir" nillable="true" type="xs:string"/>
@@ -737,37 +877,6 @@
                     <xs:element minOccurs="0" name="networkUuid" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="LoadbalancerConfig">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
-                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="Persistence">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="persistanceRequired" type="xs:boolean"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="Volume">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="device" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="iaasType" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="mappingPath" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="removeOntermination" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="size" type="xs:int"/>
-                    <xs:element minOccurs="0" name="snapshotId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="volumeId" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="PortMapping">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="port" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="protocol" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="proxyPort" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
             <xs:complexType name="ServiceGroup">
                 <xs:sequence>
                     <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
@@ -776,12 +885,6 @@
                     <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="Dependencies">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="killBehaviour" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
             <xs:complexType name="ClusterContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
@@ -798,67 +901,6 @@
                     <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InstanceContext">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="clusterInstanceId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="initTime" type="xs:long"/>
-                    <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="obsoleteExpiryTime" type="xs:long"/>
-                    <xs:element minOccurs="0" name="partition" nillable="true" type="ax23:Partition"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="Partition">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="partitionMax" type="xs:int"/>
-                    <xs:element minOccurs="0" name="partitionMin" type="xs:int"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
-                    <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="MemberContext">
-                <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allocatedIPs" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="clusterInstanceId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="defaultPrivateIP" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="defaultPublicIP" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="dynamicPayload" nillable="true" type="xs:anyType"/>
-                    <xs:element minOccurs="0" name="initTime" type="xs:long"/>
-                    <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="instanceMetadata" nillable="true" type="ax23:InstanceMetadata"/>
-                    <xs:element minOccurs="0" name="lbClusterId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="obsoleteExpiryTime" type="xs:long"/>
-                    <xs:element minOccurs="0" name="obsoleteInitTime" type="xs:long"/>
-                    <xs:element minOccurs="0" name="partition" nillable="true" type="ax23:Partition"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="privateIPs" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="publicIPs" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="InstanceMetadata">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="hypervisor" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="imageId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="loginPort" type="xs:int"/>
-                    <xs:element minOccurs="0" name="operatingSystem64bit" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="operatingSystemArchitecture" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="operatingSystemName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="operatingSystemVersion" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="ram" type="xs:int"/>
-                </xs:sequence>
-            </xs:complexType>
             <xs:complexType name="Registrant">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="autoScalerPolicyName" nillable="true" type="xs:string"/>
@@ -872,48 +914,6 @@
                     <xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="CartridgeInfo">
-                <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="appTypes" nillable="true" type="ax23:AppType"/>
-                    <xs:element minOccurs="0" name="baseDir" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="category" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="defaultAutoscalingPolicy" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="defaultDeploymentPolicy" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="deploymentDirs" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="lbConfig" nillable="true" type="ax23:LoadbalancerConfig"/>
-                    <xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="persistence" nillable="true" type="ax23:Persistence"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="portMappings" nillable="true" type="ax23:PortMapping"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"/>
-                    <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="serviceGroup" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="version" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="AppType">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="appSpecificMapping" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="ApplicationClusterContext">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="autoscalePolicyName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
-                    <xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
         </xs:schema>
     </wsdl:types>
     <wsdl:message name="getCartridgesRequest">
@@ -1006,18 +1006,18 @@
     <wsdl:message name="CloudControllerServiceCloudControllerException">
         <wsdl:part name="parameters" element="ns:CloudControllerServiceCloudControllerException"/>
     </wsdl:message>
-    <wsdl:message name="getServiceGroupDependenciesRequest">
-        <wsdl:part name="parameters" element="ns:getServiceGroupDependencies"/>
-    </wsdl:message>
-    <wsdl:message name="getServiceGroupDependenciesResponse">
-        <wsdl:part name="parameters" element="ns:getServiceGroupDependenciesResponse"/>
-    </wsdl:message>
     <wsdl:message name="getServiceGroupRequest">
         <wsdl:part name="parameters" element="ns:getServiceGroup"/>
     </wsdl:message>
     <wsdl:message name="getServiceGroupResponse">
         <wsdl:part name="parameters" element="ns:getServiceGroupResponse"/>
     </wsdl:message>
+    <wsdl:message name="getServiceGroupDependenciesRequest">
+        <wsdl:part name="parameters" element="ns:getServiceGroupDependencies"/>
+    </wsdl:message>
+    <wsdl:message name="getServiceGroupDependenciesResponse">
+        <wsdl:part name="parameters" element="ns:getServiceGroupDependenciesResponse"/>
+    </wsdl:message>
     <wsdl:message name="getServiceGroupSubGroupsRequest">
         <wsdl:part name="parameters" element="ns:getServiceGroupSubGroups"/>
     </wsdl:message>
@@ -1099,15 +1099,15 @@
     <wsdl:message name="CloudControllerServiceInvalidClusterException">
         <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidClusterException"/>
     </wsdl:message>
-    <wsdl:message name="updateClusterStatusRequest">
-        <wsdl:part name="parameters" element="ns:updateClusterStatus"/>
-    </wsdl:message>
     <wsdl:message name="getClusterContextRequest">
         <wsdl:part name="parameters" element="ns:getClusterContext"/>
     </wsdl:message>
     <wsdl:message name="getClusterContextResponse">
         <wsdl:part name="parameters" element="ns:getClusterContextResponse"/>
     </wsdl:message>
+    <wsdl:message name="updateClusterStatusRequest">
+        <wsdl:part name="parameters" element="ns:updateClusterStatus"/>
+    </wsdl:message>
     <wsdl:message name="updateKubernetesHostRequest">
         <wsdl:part name="parameters" element="ns:updateKubernetesHost"/>
     </wsdl:message>
@@ -1188,16 +1188,16 @@
             <wsdl:fault message="ns:CloudControllerServiceInvalidCartridgeTypeException" name="CloudControllerServiceInvalidCartridgeTypeException" wsaw:Action="urn:terminateInstanceCloudControllerServiceInvalidCartridgeTypeException"/>
             <wsdl:fault message="ns:CloudControllerServiceCloudControllerException" name="CloudControllerServiceCloudControllerException" wsaw:Action="urn:terminateInstanceCloudControllerServiceCloudControllerException"/>
         </wsdl:operation>
-        <wsdl:operation name="getServiceGroupDependencies">
-            <wsdl:input message="ns:getServiceGroupDependenciesRequest" wsaw:Action="urn:getServiceGroupDependencies"/>
-            <wsdl:output message="ns:getServiceGroupDependenciesResponse" wsaw:Action="urn:getServiceGroupDependenciesResponse"/>
-            <wsdl:fault message="ns:CloudControllerServiceInvalidServiceGroupException" name="CloudControllerServiceInvalidServiceGroupException" wsaw:Action="urn:getServiceGroupDependenciesCloudControllerServiceInvalidServiceGroupException"/>
-        </wsdl:operation>
         <wsdl:operation name="getServiceGroup">
             <wsdl:input message="ns:getServiceGroupRequest" wsaw:Action="urn:getServiceGroup"/>
             <wsdl:output message="ns:getServiceGroupResponse" wsaw:Action="urn:getServiceGroupResponse"/>
             <wsdl:fault message="ns:CloudControllerServiceInvalidServiceGroupException" name="CloudControllerServiceInvalidServiceGroupException" wsaw:Action="urn:getServiceGroupCloudControllerServiceInvalidServiceGroupException"/>
         </wsdl:operation>
+        <wsdl:operation name="getServiceGroupDependencies">
+            <wsdl:input message="ns:getServiceGroupDependenciesRequest" wsaw:Action="urn:getServiceGroupDependencies"/>
+            <wsdl:output message="ns:getServiceGroupDependenciesResponse" wsaw:Action="urn:getServiceGroupDependenciesResponse"/>
+            <wsdl:fault message="ns:CloudControllerServiceInvalidServiceGroupException" name="CloudControllerServiceInvalidServiceGroupException" wsaw:Action="urn:getServiceGroupDependenciesCloudControllerServiceInvalidServiceGroupException"/>
+        </wsdl:operation>
         <wsdl:operation name="getServiceGroupSubGroups">
             <wsdl:input message="ns:getServiceGroupSubGroupsRequest" wsaw:Action="urn:getServiceGroupSubGroups"/>
             <wsdl:output message="ns:getServiceGroupSubGroupsResponse" wsaw:Action="urn:getServiceGroupSubGroupsResponse"/>
@@ -1259,13 +1259,13 @@
             <wsdl:input message="ns:terminateInstancesRequest" wsaw:Action="urn:terminateInstances"/>
             <wsdl:fault message="ns:CloudControllerServiceInvalidClusterException" name="CloudControllerServiceInvalidClusterException" wsaw:Action="urn:terminateInstancesCloudControllerServiceInvalidClusterException"/>
         </wsdl:operation>
-        <wsdl:operation name="updateClusterStatus">
-            <wsdl:input message="ns:updateClusterStatusRequest" wsaw:Action="urn:updateClusterStatus"/>
-        </wsdl:operation>
         <wsdl:operation name="getClusterContext">
             <wsdl:input message="ns:getClusterContextRequest" wsaw:Action="urn:getClusterContext"/>
             <wsdl:output message="ns:getClusterContextResponse" wsaw:Action="urn:getClusterContextResponse"/>
         </wsdl:operation>
+        <wsdl:operation name="updateClusterStatus">
+            <wsdl:input message="ns:updateClusterStatusRequest" wsaw:Action="urn:updateClusterStatus"/>
+        </wsdl:operation>
         <wsdl:operation name="updateKubernetesHost">
             <wsdl:input message="ns:updateKubernetesHostRequest" wsaw:Action="urn:updateKubernetesHost"/>
             <wsdl:output message="ns:updateKubernetesHostResponse" wsaw:Action="urn:updateKubernetesHostResponse"/>
@@ -1425,8 +1425,8 @@
                 <soap:fault use="literal" name="CloudControllerServiceInvalidCartridgeTypeException"/>
             </wsdl:fault>
         </wsdl:operation>
-        <wsdl:operation name="getServiceGroup">
-            <soap:operation soapAction="urn:getServiceGroup" style="document"/>
+        <wsdl:operation name="getServiceGroupDependencies">
+            <soap:operation soapAction="urn:getServiceGroupDependencies" style="document"/>
             <wsdl:input>
                 <soap:body use="literal"/>
             </wsdl:input>
@@ -1437,8 +1437,8 @@
                 <soap:fault use="literal" name="CloudControllerServiceInvalidServiceGroupException"/>
             </wsdl:fault>
         </wsdl:operation>
-        <wsdl:operation name="getServiceGroupDependencies">
-            <soap:operation soapAction="urn:getServiceGroupDependencies" style="document"/>
+        <wsdl:operation name="getServiceGroup">
+            <soap:operation soapAction="urn:getServiceGroup" style="document"/>
             <wsdl:input>
                 <soap:body use="literal"/>
             </wsdl:input>
@@ -1596,6 +1596,12 @@
                 <soap:fault use="literal" name="CloudControllerServiceInvalidClusterException"/>
             </wsdl:fault>
         </wsdl:operation>
+        <wsdl:operation name="updateClusterStatus">
+            <soap:operation soapAction="urn:updateClusterStatus" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
         <wsdl:operation name="getClusterContext">
             <soap:operation soapAction="urn:getClusterContext" style="document"/>
             <wsdl:input>
@@ -1605,12 +1611,6 @@
                 <soap:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="updateClusterStatus">
-            <soap:operation soapAction="urn:updateClusterStatus" style="document"/>
-            <wsdl:input>
-                <soap:body use="literal"/>
-            </wsdl:input>
-        </wsdl:operation>
         <wsdl:operation name="updateKubernetesHost">
             <soap:operation soapAction="urn:updateKubernetesHost" style="document"/>
             <wsdl:input>
@@ -1803,8 +1803,8 @@
                 <soap12:fault use="literal" name="CloudControllerServiceInvalidCartridgeTypeException"/>
             </wsdl:fault>
         </wsdl:operation>
-        <wsdl:operation name="getServiceGroup">
-            <soap12:operation soapAction="urn:getServiceGroup" style="document"/>
+        <wsdl:operation name="getServiceGroupDependencies">
+            <soap12:operation soapAction="urn:getServiceGroupDependencies" style="document"/>
             <wsdl:input>
                 <soap12:body use="literal"/>
             </wsdl:input>
@@ -1815,8 +1815,8 @@
                 <soap12:fault use="literal" name="CloudControllerServiceInvalidServiceGroupException"/>
             </wsdl:fault>
         </wsdl:operation>
-        <wsdl:operation name="getServiceGroupDependencies">
-            <soap12:operation soapAction="urn:getServiceGroupDependencies" style="document"/>
+        <wsdl:operation name="getServiceGroup">
+            <soap12:operation soapAction="urn:getServiceGroup" style="document"/>
             <wsdl:input>
                 <soap12:body use="literal"/>
             </wsdl:input>
@@ -1974,6 +1974,12 @@
                 <soap12:fault use="literal" name="CloudControllerServiceInvalidClusterException"/>
             </wsdl:fault>
         </wsdl:operation>
+        <wsdl:operation name="updateClusterStatus">
+            <soap12:operation soapAction="urn:updateClusterStatus" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
         <wsdl:operation name="getClusterContext">
             <soap12:operation soapAction="urn:getClusterContext" style="document"/>
             <wsdl:input>
@@ -1983,12 +1989,6 @@
                 <soap12:body use="literal"/>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="updateClusterStatus">
-            <soap12:operation soapAction="urn:updateClusterStatus" style="document"/>
-            <wsdl:input>
-                <soap12:body use="literal"/>
-        

<TRUNCATED>

[4/6] stratos git commit: Moving domain classes in stratos manager used by rest api to stratos common

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DependencyDefinitions.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DependencyDefinitions.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DependencyDefinitions.java
deleted file mode 100644
index 3311ddb..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DependencyDefinitions.java
+++ /dev/null
@@ -1,64 +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.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-
-@XmlRootElement(name = "dependencies")
-public class DependencyDefinitions implements Serializable {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-    private List<String> startupOrders;
-
-    private List<String> scalingDependants;
-
-    private String terminationBehaviour;
-
-    public String getTerminationBehaviour() {
-        return terminationBehaviour;
-    }
-
-    public void setTerminationBehaviour(String terminationBehaviour) {
-        this.terminationBehaviour = terminationBehaviour;
-    }
-
-	public List<String> getStartupOrders() {
-		return startupOrders;
-	}
-
-	public void setStartupOrders(List<String> startupOrders) {
-		this.startupOrders = startupOrders;
-	}
-
-	public List<String> getScalingDependants() {
-		return scalingDependants;
-	}
-
-	public void setScalingDependants(List<String> scalingDependants) {
-		this.scalingDependants = scalingDependants;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/GroupDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/GroupDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/GroupDefinition.java
deleted file mode 100644
index 8cca509..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/GroupDefinition.java
+++ /dev/null
@@ -1,101 +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.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-
-@XmlRootElement(name = "groups")
-public class GroupDefinition implements Serializable {
-
-    private static final long serialVersionUID = 7261380706841894892L;
-
-	private String name;
-
-    private String alias;
-
-    private int groupMinInstances;
-
-    private int groupMaxInstances;
-
-    public boolean isGroupScalingEnabled;
-
-    private List<CartridgeDefinition> cartridges;
-
-    private List<GroupDefinition> groups;
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getAlias() {
-        return alias;
-    }
-
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    public int getGroupMinInstances() {
-        return groupMinInstances;
-    }
-
-    public void setGroupMinInstances(int groupMinInstances) {
-        this.groupMinInstances = groupMinInstances;
-    }
-
-    public int getGroupMaxInstances() {
-        return groupMaxInstances;
-    }
-
-    public void setGroupMaxInstances(int groupMaxInstances) {
-        this.groupMaxInstances = groupMaxInstances;
-    }
-
-	public boolean isGroupScalingEnabled() {
-		return isGroupScalingEnabled;
-	}
-
-	public void setGroupScalingEnabled(boolean isGroupScalingEnabled) {
-		this.isGroupScalingEnabled = isGroupScalingEnabled;
-	}
-
-	public List<CartridgeDefinition> getCartridges() {
-		return cartridges;
-	}
-
-	public void setCartridges(List<CartridgeDefinition> cartridges) {
-		this.cartridges = cartridges;
-	}
-
-	public List<GroupDefinition> getGroups() {
-		return groups;
-	}
-
-	public void setGroups(List<GroupDefinition> groups) {
-		this.groups = groups;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Policy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Policy.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Policy.java
deleted file mode 100644
index 39354df..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Policy.java
+++ /dev/null
@@ -1,148 +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.domain;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-public class Policy implements Serializable {
-
-	private static final long serialVersionUID = 1L;
-
-	private String name;
-	private String description;
-	private boolean defaultPolicy;
-
-	private Integer minAppInstances;
-	private Integer maxAppInstances;
-	private Integer maxRequestsPerSecond;
-	private BigDecimal alarmingUpperRate;
-	private BigDecimal alarmingLowerRate;
-	private BigDecimal scaleDownFactor;
-	private Integer roundsToAverage;
-
-	public Policy() {
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	public boolean isDefaultPolicy() {
-		return defaultPolicy;
-	}
-
-	public void setDefaultPolicy(boolean defaultPolicy) {
-		this.defaultPolicy = defaultPolicy;
-	}
-
-	public Integer getMinAppInstances() {
-		return minAppInstances;
-	}
-
-	public void setMinAppInstances(Integer minAppInstances) {
-		this.minAppInstances = minAppInstances;
-	}
-
-	public Integer getMaxAppInstances() {
-		return maxAppInstances;
-	}
-
-	public void setMaxAppInstances(Integer maxAppInstances) {
-		this.maxAppInstances = maxAppInstances;
-	}
-
-	public Integer getMaxRequestsPerSecond() {
-		return maxRequestsPerSecond;
-	}
-
-	public void setMaxRequestsPerSecond(Integer maxRequestsPerSecond) {
-		this.maxRequestsPerSecond = maxRequestsPerSecond;
-	}
-
-	public BigDecimal getAlarmingUpperRate() {
-		return alarmingUpperRate;
-	}
-
-	public void setAlarmingUpperRate(BigDecimal alarmingUpperRate) {
-		this.alarmingUpperRate = alarmingUpperRate;
-	}
-
-	public BigDecimal getAlarmingLowerRate() {
-		return alarmingLowerRate;
-	}
-
-	public void setAlarmingLowerRate(BigDecimal alarmingLowerRate) {
-		this.alarmingLowerRate = alarmingLowerRate;
-	}
-
-	public BigDecimal getScaleDownFactor() {
-		return scaleDownFactor;
-	}
-
-	public void setScaleDownFactor(BigDecimal scaleDownFactor) {
-		this.scaleDownFactor = scaleDownFactor;
-	}
-
-	public Integer getRoundsToAverage() {
-		return roundsToAverage;
-	}
-
-	public void setRoundsToAverage(Integer roundsToAverage) {
-		this.roundsToAverage = roundsToAverage;
-	}
-
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((name == null) ? 0 : name.hashCode());
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (!(obj instanceof Policy))
-			return false;
-		Policy other = (Policy) obj;
-		if (name == null) {
-			if (other.name != null)
-				return false;
-		} else if (!name.equals(other.name))
-			return false;
-		return true;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PolicyDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PolicyDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PolicyDefinition.java
deleted file mode 100644
index b87d935..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PolicyDefinition.java
+++ /dev/null
@@ -1,83 +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.domain;
-
-import java.io.Serializable;
-
-public class PolicyDefinition implements Serializable {
-
-	private static final long serialVersionUID = 1L;
-
-	private String name;
-	private String description;
-	private boolean defaultPolicy;
-
-	public PolicyDefinition() {
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	public boolean isDefaultPolicy() {
-		return defaultPolicy;
-	}
-
-	public void setDefaultPolicy(boolean defaultPolicy) {
-		this.defaultPolicy = defaultPolicy;
-	}
-
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((name == null) ? 0 : name.hashCode());
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (!(obj instanceof PolicyDefinition))
-			return false;
-		PolicyDefinition other = (PolicyDefinition) obj;
-		if (name == null) {
-			if (other.name != null)
-				return false;
-		} else if (!name.equals(other.name))
-			return false;
-		return true;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PortMapping.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PortMapping.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PortMapping.java
deleted file mode 100644
index 4a1a2a9..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PortMapping.java
+++ /dev/null
@@ -1,59 +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.domain;
-
-public class PortMapping {
-	private int id;
-	private String type;
-	private String primaryPort;
-	private String proxyPort;
-
-	public int getId() {
-		return id;
-	}
-
-	public void setId(int id) {
-		this.id = id;
-	}
-
-	public String getType() {
-		return type;
-	}
-
-	public void setType(String type) {
-		this.type = type;
-	}
-
-	public String getPrimaryPort() {
-		return primaryPort;
-	}
-
-	public void setPrimaryPort(String primaryPort) {
-		this.primaryPort = primaryPort;
-	}
-
-	public String getProxyPort() {
-		return proxyPort;
-	}
-
-	public void setProxyPort(String proxyPort) {
-		this.proxyPort = proxyPort;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PropertyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PropertyBean.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PropertyBean.java
deleted file mode 100644
index 4192644..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PropertyBean.java
+++ /dev/null
@@ -1,49 +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.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-
-@XmlRootElement(name = "property")
-public class PropertyBean implements Serializable {
-
-    private static final long serialVersionUID = 5756598782384376873L;
-
-	private String name;
-
-    private String value;
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryCredentials.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryCredentials.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryCredentials.java
deleted file mode 100644
index 4a6d323..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryCredentials.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.apache.stratos.manager.domain;
-/*
- *
- * 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.
- *
-*/
-
-
-public class RepositoryCredentials {
-
-	private String url;
-	private String userName;
-	private String password;
-	public String getUrl() {
-    	return url;
-    }
-	public void setUrl(String url) {
-    	this.url = url;
-    }
-	public String getUserName() {
-    	return userName;
-    }
-	public void setUserName(String userName) {
-    	this.userName = userName;
-    }
-	public String getPassword() {
-    	return password;
-    }
-	public void setPassword(String password) {
-    	this.password = password;
-    }
-	
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInfoBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInfoBean.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInfoBean.java
deleted file mode 100644
index 3426f18..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInfoBean.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.domain;
-
-import java.util.Arrays;
-
-/**
- *
- */
-public class RepositoryInfoBean {
-
-	private String repoURL;
-	private String cartridgeAlias;
-	private String tenantDomain;
-	private String userName;
-	private String password;
-	private String[] dirArray;
-
-	public RepositoryInfoBean(String repoURL, String cartridgeAlias, String tenantDomain,
-                              String userName, String password, String[] dirArray) {
-	    this.repoURL = repoURL;
-	    this.cartridgeAlias = cartridgeAlias;
-	    this.tenantDomain = tenantDomain;
-	    this.userName = userName;
-	    this.setPassword(password);
-        setDirArray(dirArray);
-    }
-	public String getRepoURL() {
-    	return repoURL;
-    }
-	public void setRepoURL(String repoURL) {
-    	this.repoURL = repoURL;
-    }
-	public String getCartridgeAlias() {
-    	return cartridgeAlias;
-    }
-	public void setCartridgeAlias(String cartridgeAlias) {
-    	this.cartridgeAlias = cartridgeAlias;
-    }
-	public String getTenantDomain() {
-    	return tenantDomain;
-    }
-	public void setTenantDomain(String tenantDomain) {
-    	this.tenantDomain = tenantDomain;
-    }
-	public String getUserName() {
-    	return userName;
-    }
-	public void setUserName(String userName) {
-    	this.userName = userName;
-    }
-	public String[] getDirArray() {
-    	return dirArray;
-    }
-	public void setDirArray(String[] dirArray) {
-        if(dirArray == null) {
-            this.dirArray = new String[0];
-        } else {
-            this.dirArray = Arrays.copyOf(dirArray, dirArray.length);
-        }
-    }
-    public String getPassword() {
-        return password;
-    }
-    public void setPassword(String password) {
-        this.password = password;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInformation.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInformation.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInformation.java
deleted file mode 100644
index 9fd0f9e..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInformation.java
+++ /dev/null
@@ -1,51 +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.domain;
-
-import java.io.Serializable;
-import java.util.Arrays;
-
-public class RepositoryInformation implements Serializable {
-
-	private static final long serialVersionUID = 1L;
-
-	private String repoURL;
-	private String[] refName;
-
-	public String getRepoURL() {
-		return repoURL;
-	}
-
-	public void setRepoURL(String repoURL) {
-		this.repoURL = repoURL;
-	}
-
-	public String[] getRefName() {
-		return refName;
-	}
-
-	public void setRefName(String[] refName) {
-        if(refName == null) {
-            this.refName = new String[0];
-        } else {
-            this.refName = Arrays.copyOf(refName, refName.length);
-        }
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ServiceGroupDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ServiceGroupDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ServiceGroupDefinition.java
deleted file mode 100644
index a490a8b..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ServiceGroupDefinition.java
+++ /dev/null
@@ -1,70 +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.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-
-@XmlRootElement(name = "groups")
-public class ServiceGroupDefinition implements Serializable {
-
-    private String name;
-
-    private List<ServiceGroupDefinition> groups;
-
-    private List<String> cartridges;
-
-    public boolean isGroupScalingEnabled;
-
-    private DependencyDefinitions dependencies;
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public List<String> getCartridges() {
-        return cartridges;
-    }
-
-    public void setCartridges(List<String> cartridges) {
-        this.cartridges = cartridges;
-    }
-
-    public DependencyDefinitions getDependencies() {
-        return dependencies;
-    }
-
-    public void setDependencies(DependencyDefinitions dependencies) {
-        this.dependencies = dependencies;
-    }
-
-    public List<ServiceGroupDefinition> getGroups() {
-        return groups;
-    }
-
-    public void setGroups(List<ServiceGroupDefinition> groups) {
-        this.groups = groups;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscribableInfo.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscribableInfo.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscribableInfo.java
deleted file mode 100644
index cdf404b..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscribableInfo.java
+++ /dev/null
@@ -1,131 +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.domain;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "subscribableInfo")
-public class SubscribableInfo implements Serializable {
-
-    private static final long serialVersionUID = 8097432440778125606L;
-
-	private String alias;
-    private String deploymentPolicy;
-    private String autoscalingPolicy;
-    private String repoUrl;
-    private boolean privateRepo;
-    private String repoUsername;
-    private int maxMembers;
-    private int minMembers;
-    private String repoPassword;
-    private String[] dependencyAliases;
-    private List<PropertyBean> property;
-
-    public String getAlias() {
-        return alias;
-    }
-
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    public String getDeploymentPolicy() {
-        return deploymentPolicy;
-    }
-
-    public void setDeploymentPolicy(String deploymentPolicy) {
-        this.deploymentPolicy = deploymentPolicy;
-    }
-
-    public String getAutoscalingPolicy() {
-        return autoscalingPolicy;
-    }
-
-    public void setAutoscalingPolicy(String autoscalingPolicy) {
-        this.autoscalingPolicy = autoscalingPolicy;
-    }
-
-    public String getRepoUrl() {
-        return repoUrl;
-    }
-
-    public void setRepoUrl(String repoUrl) {
-        this.repoUrl = repoUrl;
-    }
-
-    public boolean isPrivateRepo() {
-        return privateRepo;
-    }
-
-    public void setPrivateRepo(boolean privateRepo) {
-        this.privateRepo = privateRepo;
-    }
-
-    public String getRepoUsername() {
-        return repoUsername;
-    }
-
-    public void setRepoUsername(String repoUsername) {
-        this.repoUsername = repoUsername;
-    }
-
-    public String getRepoPassword() {
-        return repoPassword;
-    }
-
-    public void setRepoPassword(String repoPassword) {
-        this.repoPassword = repoPassword;
-    }
-
-    public String[] getDependencyAliases() {
-        return dependencyAliases;
-    }
-
-    public void setDependencyAliases(String[] dependencyAliases) {
-        this.dependencyAliases = dependencyAliases;
-    }
-    
-    public List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-
-    public int getMaxMembers() {
-        return maxMembers;
-    }
-
-    public void setMaxMembers(int maxMembers) {
-        this.maxMembers = maxMembers;
-    }
-
-    public int getMinMembers() {
-        return minMembers;
-    }
-
-    public void setMinMembers(int minMembers) {
-        this.minMembers = minMembers;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscriptionInfo.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscriptionInfo.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscriptionInfo.java
deleted file mode 100644
index 0b536b3..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscriptionInfo.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.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-
-@XmlRootElement
-public class SubscriptionInfo implements Serializable {
-
-	private static final long serialVersionUID = 1L;
-
-	private String hostname;
-	private String repositoryURL;
-
-	public String getHostname() {
-		return hostname;
-	}
-
-	public void setHostname(String hostname) {
-		this.hostname = hostname;
-	}
-
-	public String getRepositoryURL() {
-		return repositoryURL;
-	}
-
-	public void setRepositoryURL(String repositoryURL) {
-		this.repositoryURL = repositoryURL;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/repository/Repository.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/repository/Repository.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/repository/Repository.java
deleted file mode 100644
index 6231929..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/repository/Repository.java
+++ /dev/null
@@ -1,87 +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.domain.repository;
-
-import java.io.Serializable;
-
-public class Repository implements Serializable {
-
-    private static final long serialVersionUID = 8386330511938705573L;
-    private int id;
-    private String url;
-    private String userName;
-    private String password;
-    private boolean isPrivateRepository;
-    private boolean commitEnabled;
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public boolean isPrivateRepository() {
-        return isPrivateRepository;
-    }
-
-    public void setPrivateRepository(boolean privateRepository) {
-        isPrivateRepository = privateRepository;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    @Override
-    public String toString() {
-        return "Repository [id=" + id + ", url=" + url + ", userName=" + userName +
-               ", isPrivateRepository=" + isPrivateRepository + "]";
-    }
-
-    public boolean isCommitEnabled() {
-        return commitEnabled;
-    }
-
-    public void setCommitEnabled(boolean commitEnabled) {
-        this.commitEnabled = commitEnabled;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ApplicationSubscriptionException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ApplicationSubscriptionException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ApplicationSubscriptionException.java
index 9c3430b..c24ffb7 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ApplicationSubscriptionException.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ApplicationSubscriptionException.java
@@ -21,11 +21,9 @@ package org.apache.stratos.manager.exception;
 
 public class ApplicationSubscriptionException extends Exception {
 
-    /**
-	 * 
-	 */
 	private static final long serialVersionUID = 603387881177162687L;
-	private String message;
+
+    private String message;
 
     public ApplicationSubscriptionException() {
         super();

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationDefinitionException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationDefinitionException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationDefinitionException.java
deleted file mode 100644
index bda75ab..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationDefinitionException.java
+++ /dev/null
@@ -1,47 +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.exception;
-
-public class CompositeApplicationDefinitionException extends Exception {
-
-    private String message;
-
-    public CompositeApplicationDefinitionException () {
-        super();
-    }
-
-    public CompositeApplicationDefinitionException (String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-    }
-
-    public CompositeApplicationDefinitionException (String message) {
-        super(message);
-        this.message = message;
-    }
-
-    public CompositeApplicationDefinitionException (Throwable cause) {
-        super(cause);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationException.java
deleted file mode 100644
index ea47536..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationException.java
+++ /dev/null
@@ -1,47 +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.exception;
-
-public class CompositeApplicationException extends Exception {
-
-    private String message;
-
-    public CompositeApplicationException () {
-        super();
-    }
-
-    public CompositeApplicationException (String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-    }
-
-    public CompositeApplicationException (String message) {
-        super(message);
-        this.message = message;
-    }
-
-    public CompositeApplicationException (Throwable cause) {
-        super(cause);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java
deleted file mode 100644
index 2e4e366..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java
+++ /dev/null
@@ -1,49 +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.exception;
-
-public class DomainSubscriptionDoesNotExist extends Exception {
-
-    private static final long serialVersionUID = 1L;
-
-    private final String message;
-
-    private final String subscriptionDomain;
-
-    public DomainSubscriptionDoesNotExist(String message, String subscriptionDomain, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-        this.subscriptionDomain = subscriptionDomain;
-    }
-
-    public DomainSubscriptionDoesNotExist(String message, String subscriptionDomain) {
-        super(message);
-        this.message = message;
-        this.subscriptionDomain = subscriptionDomain;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public String getSubscriptionDomain() {
-        return subscriptionDomain;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DuplicateCartridgeAliasException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DuplicateCartridgeAliasException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DuplicateCartridgeAliasException.java
deleted file mode 100644
index 079783d..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DuplicateCartridgeAliasException.java
+++ /dev/null
@@ -1,56 +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.exception;
-
-public class DuplicateCartridgeAliasException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private final String message;
-
-	private final String cartridgeType;
-
-	private final String cartridgeAlias;
-
-	public DuplicateCartridgeAliasException(String message, String cartridgeType, String cartridgeAlias, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-		this.cartridgeType = cartridgeType;
-		this.cartridgeAlias = cartridgeAlias;
-	}
-
-	public DuplicateCartridgeAliasException(String message, String cartridgeType, String cartridgeAlias) {
-		super(message);
-		this.message = message;
-		this.cartridgeType = cartridgeType;
-		this.cartridgeAlias = cartridgeAlias;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-	public String getCartridgeType() {
-		return cartridgeType;
-	}
-
-	public String getCartridgeAlias() {
-		return cartridgeAlias;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/GroupSubscriptionException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/GroupSubscriptionException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/GroupSubscriptionException.java
deleted file mode 100644
index de24a45..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/GroupSubscriptionException.java
+++ /dev/null
@@ -1,47 +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.exception;
-
-public class GroupSubscriptionException extends Exception {
-
-    private String message;
-
-    public GroupSubscriptionException () {
-        super();
-    }
-
-    public GroupSubscriptionException (String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-    }
-
-    public GroupSubscriptionException (String message) {
-        super(message);
-        this.message = message;
-    }
-
-    public GroupSubscriptionException (Throwable cause) {
-        super(cause);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidRepositoryException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidRepositoryException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidRepositoryException.java
deleted file mode 100644
index 4a21afc..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidRepositoryException.java
+++ /dev/null
@@ -1,35 +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.exception;
-
-public class InvalidRepositoryException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private String message;
-
-	public InvalidRepositoryException(String message, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidServiceGroupException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidServiceGroupException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidServiceGroupException.java
deleted file mode 100644
index 063cebb..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidServiceGroupException.java
+++ /dev/null
@@ -1,47 +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.exception;
-
-public class InvalidServiceGroupException extends Exception {
-
-    private String message;
-
-    public InvalidServiceGroupException () {
-        super();
-    }
-
-    public InvalidServiceGroupException (String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-    }
-
-    public InvalidServiceGroupException (String message) {
-        super(message);
-        this.message = message;
-    }
-
-    public InvalidServiceGroupException (Throwable cause) {
-        super(cause);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/NotSubscribedException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/NotSubscribedException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/NotSubscribedException.java
deleted file mode 100644
index 1886186..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/NotSubscribedException.java
+++ /dev/null
@@ -1,49 +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.exception;
-
-public class NotSubscribedException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private final String message;
-
-	private final String cartridgeAlias;
-
-	public NotSubscribedException(String message, String cartridgeAlias, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-		this.cartridgeAlias = cartridgeAlias;
-	}
-
-	public NotSubscribedException(String message, String cartridgeAlias) {
-		super(message);
-		this.message = message;
-		this.cartridgeAlias = cartridgeAlias;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-	public String getCartridgeAlias() {
-		return cartridgeAlias;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PersistenceManagerException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PersistenceManagerException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PersistenceManagerException.java
deleted file mode 100644
index 0491639..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PersistenceManagerException.java
+++ /dev/null
@@ -1,49 +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.exception;
-
-public class PersistenceManagerException extends Exception {
-
-    private static final long serialVersionUID = 1L;
-
-    private String message;
-
-    public PersistenceManagerException() {
-        super();
-    }
-
-    public PersistenceManagerException(String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-    }
-
-    public PersistenceManagerException(String message) {
-        super(message);
-        this.message = message;
-    }
-
-    public PersistenceManagerException(Throwable cause) {
-        super(cause);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PolicyException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PolicyException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PolicyException.java
deleted file mode 100644
index 068401a..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PolicyException.java
+++ /dev/null
@@ -1,41 +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.exception;
-
-public class PolicyException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private final String message;
-
-	public PolicyException(String message, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-	}
-
-	public PolicyException(String message) {
-		super(message);
-		this.message = message;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryCredentialsRequiredException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryCredentialsRequiredException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryCredentialsRequiredException.java
deleted file mode 100644
index 1d0febe..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryCredentialsRequiredException.java
+++ /dev/null
@@ -1,40 +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.exception;
-
-public class RepositoryCredentialsRequiredException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private String message;
-
-	public RepositoryCredentialsRequiredException(String message, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-	}
-
-	public RepositoryCredentialsRequiredException(String message) {
-		super(message);
-		this.message = message;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryRequiredException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryRequiredException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryRequiredException.java
deleted file mode 100644
index bb19269..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryRequiredException.java
+++ /dev/null
@@ -1,40 +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.exception;
-
-public class RepositoryRequiredException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private String message;
-
-	public RepositoryRequiredException(String message, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-	}
-
-	public RepositoryRequiredException(String message) {
-		super(message);
-		this.message = message;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryTransportException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryTransportException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryTransportException.java
deleted file mode 100644
index 738a86e..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryTransportException.java
+++ /dev/null
@@ -1,40 +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.exception;
-
-public class RepositoryTransportException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private final String message;
-
-	public RepositoryTransportException(String message, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-	}
-
-	public RepositoryTransportException(String message) {
-		super(message);
-		this.message = message;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceAlreadyDeployedException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceAlreadyDeployedException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceAlreadyDeployedException.java
deleted file mode 100644
index 1e8fcff..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceAlreadyDeployedException.java
+++ /dev/null
@@ -1,49 +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.exception;
-
-public class ServiceAlreadyDeployedException extends Exception {
-
-    private static final long serialVersionUID = 1L;
-
-    private final String message;
-
-    private final String type;
-
-    public ServiceAlreadyDeployedException (String message, String type, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-        this.type = type;
-    }
-
-    public ServiceAlreadyDeployedException (String message, String type) {
-        super(message);
-        this.message = message;
-        this.type = type;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public String getType() {
-        return type;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java
deleted file mode 100644
index 9afe460..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.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.exception;
-
-public class ServiceDoesNotExistException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private final String message;
-
-	private final String serviceType;
-
-	public ServiceDoesNotExistException(String message, String serviceType, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-		this.serviceType = serviceType;
-	}
-
-	public ServiceDoesNotExistException(String message, String serviceType) {
-		super(message);
-		this.message = message;
-		this.serviceType = serviceType;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-	public String getServiceType() {
-		return serviceType;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceGroupDefinitioException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceGroupDefinitioException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceGroupDefinitioException.java
deleted file mode 100644
index 5644ddb..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceGroupDefinitioException.java
+++ /dev/null
@@ -1,47 +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.exception;
-
-public class ServiceGroupDefinitioException extends Exception {
-
-    private String message;
-
-    public ServiceGroupDefinitioException () {
-        super();
-    }
-
-    public ServiceGroupDefinitioException (String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-    }
-
-    public ServiceGroupDefinitioException (String message) {
-        super(message);
-        this.message = message;
-    }
-
-    public ServiceGroupDefinitioException (Throwable cause) {
-        super(cause);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/UnregisteredCartridgeException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/UnregisteredCartridgeException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/UnregisteredCartridgeException.java
deleted file mode 100644
index a53f318..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/UnregisteredCartridgeException.java
+++ /dev/null
@@ -1,54 +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.exception;
-
-public class UnregisteredCartridgeException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private final String message;
-
-	private final String cartridgeType;
-
-	public UnregisteredCartridgeException(String message, String cartridgeType, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-		this.cartridgeType = cartridgeType;
-	}
-
-	public UnregisteredCartridgeException(String message, String cartridgeType) {
-		super(message);
-		this.message = message;
-		this.cartridgeType = cartridgeType;
-	}
-	
-	public UnregisteredCartridgeException(String message, Throwable cause) {
-		super(message, cause);
-		this.cartridgeType = null;
-		this.message = message;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-	public String getCartridgeType() {
-		return cartridgeType;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/persistence/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/persistence/registry/RegistryManager.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/persistence/registry/RegistryManager.java
deleted file mode 100644
index 007a51f..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/persistence/registry/RegistryManager.java
+++ /dev/null
@@ -1,207 +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.persistence.registry;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.manager.internal.ServiceReferenceHolder;
-import org.wso2.carbon.registry.core.Resource;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.wso2.carbon.registry.core.session.UserRegistry;
-
-public class RegistryManager {
-
-    private final static Log log = LogFactory.getLog(RegistryManager.class);
-
-    private static final String STRATOS_MANAGER_REOSURCE = "/stratos_manager";
-
-    private static RegistryService registryService;
-    private static volatile RegistryManager registryManager;
-
-    public static RegistryManager getInstance() {
-
-        if (registryManager == null) {
-            synchronized (RegistryManager.class) {
-                if (registryManager == null) {
-                    registryManager = new RegistryManager();
-                }
-            }
-        }
-        return registryManager;
-    }
-
-    private RegistryManager() {
-        registryService = ServiceReferenceHolder.getRegistryService();
-    }
-
-    private UserRegistry initRegistry (int tenantId) throws RegistryException {
-
-        UserRegistry tenantGovRegistry = registryService.getGovernanceSystemRegistry(tenantId);
-
-        // check if the resource is available, else create it
-        if (!tenantGovRegistry.resourceExists(STRATOS_MANAGER_REOSURCE)) {
-            synchronized (RegistryManager.class) {
-                try {
-                    if (!tenantGovRegistry.resourceExists(STRATOS_MANAGER_REOSURCE)) {
-                        tenantGovRegistry.put(STRATOS_MANAGER_REOSURCE, tenantGovRegistry.newCollection());
-                    }
-                } catch (RegistryException e) {
-                    String errorMsg = "Failed to create the registry resource " + STRATOS_MANAGER_REOSURCE;
-                    log.error(errorMsg, e);
-                    throw e;
-                }
-            }
-        }
-
-        return tenantGovRegistry;
-    }
-
-    private UserRegistry initRegistry () throws RegistryException {
-
-        UserRegistry govRegistry = registryService.getGovernanceSystemRegistry();
-
-        // check if the resource is available, else create it
-        if (!govRegistry.resourceExists(STRATOS_MANAGER_REOSURCE)) {
-            synchronized (RegistryManager.class) {
-                try {
-                    if (!govRegistry.resourceExists(STRATOS_MANAGER_REOSURCE)) {
-                        govRegistry.put(STRATOS_MANAGER_REOSURCE, govRegistry.newCollection());
-                    }
-                } catch (RegistryException e) {
-                    String errorMsg = "Failed to create the registry resource " + STRATOS_MANAGER_REOSURCE;
-                    log.error(errorMsg, e);
-                    throw e;
-                }
-            }
-        }
-
-        return govRegistry;
-    }
-
-    public void persist (String path, byte [] resourceBytes, String tag) throws RegistryException {
-
-        UserRegistry registry = initRegistry();
-
-        try {
-            registry.beginTransaction();
-            Resource nodeResource = registry.newResource();
-            nodeResource.setContent(resourceBytes);
-            // store the resource in the registry
-            registry.put(path, nodeResource);
-            if (tag != null) {
-                // apply the tag
-                registry.applyTag(path, tag);
-            }
-            // commit
-            registry.commitTransaction();
-
-        } catch (RegistryException e) {
-            String errorMsg = "Failed to persist the given resource in registry path " + path;
-            log.error(errorMsg, e);
-            // rollback
-            try {
-                registry.rollbackTransaction();
-
-            } catch (RegistryException e1) {
-                errorMsg = "Failed to rollback the transaction in registry path " + path;
-                log.error(errorMsg, e1);
-                throw e1;
-            }
-            throw e;
-        }
-    }
-
-    public void move (String sourcePath, String targetPath) throws RegistryException {
-
-        UserRegistry registry = initRegistry();
-
-        try {
-            registry.beginTransaction();
-            registry.move(sourcePath, targetPath);
-            registry.commitTransaction();
-
-        } catch (RegistryException e) {
-            String errorMsg = "Could not move the resource at "+ sourcePath + " to " + targetPath;
-            log.error(errorMsg, e);
-            // rollback
-            try {
-                registry.rollbackTransaction();
-
-            } catch (RegistryException e1) {
-                errorMsg = "Failed to rollback moving the resource at " + sourcePath + " to " + targetPath;
-                log.error(errorMsg, e1);
-                throw e1;
-            }
-            throw e;
-        }
-    }
-
-    public void delete (String resourcePath) throws RegistryException {
-
-        UserRegistry registry = initRegistry();
-
-        try {
-            registry.beginTransaction();
-            registry.delete(resourcePath);
-            registry.commitTransaction();
-
-        } catch (RegistryException e) {
-            String errorMsg = "Could not delete resource at "+ resourcePath;
-            log.error(errorMsg, e);
-            // rollback
-            try {
-                registry.rollbackTransaction();
-
-            } catch (RegistryException e1) {
-                errorMsg = "Failed to rollback the transaction in registry path " + resourcePath;
-                log.error(errorMsg, e1);
-                throw e1;
-            }
-            throw e;
-        }
-    }
-
-    public Object retrieve (String resourcePath) throws RegistryException {
-
-        UserRegistry registry = initRegistry();
-
-        Resource resource;
-
-        try {
-            resource = registry.get(resourcePath);
-
-        } catch (ResourceNotFoundException ignore) {
-            // nothing has been persisted in the registry yet
-            if(log.isDebugEnabled()) {
-                log.debug("No resource found in the registry path " + resourcePath);
-            }
-            return null;
-
-        } catch (RegistryException e) {
-            String errorMsg = "Failed to retrieve the Resource at " + resourcePath + " from registry.";
-            log.error(errorMsg, e);
-            throw e;
-        }
-
-        return resource.getContent();
-    }
-}


[5/6] stratos git commit: Moving domain classes in stratos manager used by rest api to stratos common

Posted by im...@apache.org.
Moving domain classes in stratos manager used by rest api to stratos common


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/2032c1bc
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/2032c1bc
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/2032c1bc

Branch: refs/heads/master
Commit: 2032c1bc53487d3f8956c8f604d4e09a417ba49c
Parents: e52deaa
Author: Imesh Gunaratne <im...@apache.org>
Authored: Sun Jan 4 12:46:07 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Sun Jan 4 12:46:08 2015 +0530

----------------------------------------------------------------------
 .../apache/stratos/cli/CommandLineService.java  |  29 +-
 .../stratos/cli/RestCommandLineService.java     |   2 +-
 .../cloud/controller/domain/Persistence.java    |   3 +-
 .../cloud/controller/domain/PortMapping.java    |   2 +-
 .../common/beans/ApplicationDefinition.java     |  95 +++
 .../common/beans/ApplicationSubscription.java   |  64 ++
 .../apache/stratos/common/beans/Cartridge.java  | 329 ++++++++
 .../common/beans/CartridgeDefinition.java       |  67 ++
 .../common/beans/ComponentDefinition.java       |  40 +
 .../common/beans/DependencyDefinitions.java     |  59 ++
 .../stratos/common/beans/GroupDefinition.java   | 101 +++
 .../stratos/common/beans/Persistence.java       |  54 ++
 .../stratos/common/beans/PortMapping.java       |  69 ++
 .../stratos/common/beans/PropertyBean.java      |  49 ++
 .../common/beans/ServiceGroupDefinition.java    |  74 ++
 .../stratos/common/beans/SubscribableInfo.java  | 133 ++++
 .../org/apache/stratos/common/beans/Volume.java | 126 +++
 .../common/registry/RegistryManager.java        |  15 +-
 .../manager/domain/ApplicationDefinition.java   |  95 ---
 .../manager/domain/ApplicationSubscription.java |  68 --
 .../stratos/manager/domain/Cartridge.java       | 332 --------
 .../manager/domain/CartridgeDefinition.java     |  67 --
 .../domain/CartridgeSubscriptionInfo.java       | 200 -----
 .../manager/domain/CartridgeWrapper.java        |  52 --
 .../apache/stratos/manager/domain/Cluster.java  |  97 ---
 .../manager/domain/ComponentDefinition.java     |  40 -
 .../stratos/manager/domain/DataCartridge.java   |  62 --
 .../manager/domain/DependencyDefinitions.java   |  64 --
 .../stratos/manager/domain/GroupDefinition.java | 101 ---
 .../apache/stratos/manager/domain/Policy.java   | 148 ----
 .../manager/domain/PolicyDefinition.java        |  83 --
 .../stratos/manager/domain/PortMapping.java     |  59 --
 .../stratos/manager/domain/PropertyBean.java    |  49 --
 .../manager/domain/RepositoryCredentials.java   |  48 --
 .../manager/domain/RepositoryInfoBean.java      |  85 --
 .../manager/domain/RepositoryInformation.java   |  51 --
 .../manager/domain/ServiceGroupDefinition.java  |  70 --
 .../manager/domain/SubscribableInfo.java        | 131 ----
 .../manager/domain/SubscriptionInfo.java        |  48 --
 .../manager/domain/repository/Repository.java   |  87 ---
 .../ApplicationSubscriptionException.java       |   6 +-
 ...CompositeApplicationDefinitionException.java |  47 --
 .../CompositeApplicationException.java          |  47 --
 .../DomainSubscriptionDoesNotExist.java         |  49 --
 .../DuplicateCartridgeAliasException.java       |  56 --
 .../exception/GroupSubscriptionException.java   |  47 --
 .../exception/InvalidRepositoryException.java   |  35 -
 .../exception/InvalidServiceGroupException.java |  47 --
 .../exception/NotSubscribedException.java       |  49 --
 .../exception/PersistenceManagerException.java  |  49 --
 .../manager/exception/PolicyException.java      |  41 -
 .../RepositoryCredentialsRequiredException.java |  40 -
 .../exception/RepositoryRequiredException.java  |  40 -
 .../exception/RepositoryTransportException.java |  40 -
 .../ServiceAlreadyDeployedException.java        |  49 --
 .../exception/ServiceDoesNotExistException.java |  48 --
 .../ServiceGroupDefinitioException.java         |  47 --
 .../UnregisteredCartridgeException.java         |  54 --
 .../persistence/registry/RegistryManager.java   | 207 -----
 .../utils/ApplicationManagementUtil.java        | 212 -----
 .../rest/endpoint/api/StratosApiV40.java        |   6 +-
 .../rest/endpoint/api/StratosApiV40Utils.java   |   4 +-
 .../rest/endpoint/api/StratosApiV41.java        |   9 +-
 .../rest/endpoint/api/StratosApiV41Utils.java   |   9 +-
 .../ServiceGroupDefinitionException.java        |  37 +
 .../stratos/rest/endpoint/mock/MockContext.java |  62 +-
 .../rest/endpoint/mock/StratosApiV40Mock.java   |   7 +-
 .../util/converter/ObjectConverter.java         |  61 +-
 .../src/main/resources/AutoScalerService.wsdl   | 264 +++----
 .../main/resources/CloudControllerService.wsdl  | 776 +++++++++----------
 70 files changed, 1895 insertions(+), 3898 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineService.java
index 57e39d6..f74389a 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineService.java
@@ -18,18 +18,6 @@
  */
 package org.apache.stratos.cli;
 
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.client.ServiceClient;
@@ -37,29 +25,18 @@ import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.transport.http.HttpTransportProperties;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.stratos.cli.exception.CommandException;
 import org.apache.stratos.cli.utils.CliUtils;
-import org.apache.stratos.cli.utils.RowMapper;
-import org.apache.stratos.manager.domain.PolicyDefinition;
-import org.apache.stratos.manager.domain.PolicyDefinition;
 import org.apache.stratos.manager.stub.ApplicationManagementServiceADCExceptionException;
-import org.apache.stratos.manager.stub.ApplicationManagementServiceAlreadySubscribedExceptionException;
 import org.apache.stratos.manager.stub.ApplicationManagementServiceDomainMappingExistsExceptionException;
-import org.apache.stratos.manager.stub.ApplicationManagementServiceDuplicateCartridgeAliasExceptionException;
-import org.apache.stratos.manager.stub.ApplicationManagementServiceInvalidCartridgeAliasExceptionException;
-import org.apache.stratos.manager.stub.ApplicationManagementServiceInvalidRepositoryExceptionException;
 import org.apache.stratos.manager.stub.ApplicationManagementServiceNotSubscribedExceptionException;
-import org.apache.stratos.manager.stub.ApplicationManagementServicePolicyExceptionException;
-import org.apache.stratos.manager.stub.ApplicationManagementServiceRepositoryCredentialsRequiredExceptionException;
-import org.apache.stratos.manager.stub.ApplicationManagementServiceRepositoryRequiredExceptionException;
-import org.apache.stratos.manager.stub.ApplicationManagementServiceRepositoryTransportExceptionException;
 import org.apache.stratos.manager.stub.ApplicationManagementServiceStub;
-import org.apache.stratos.manager.stub.ApplicationManagementServiceUnregisteredCartridgeExceptionException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.gson.Gson;
+import javax.net.ssl.*;
+import java.rmi.RemoteException;
+import java.util.HashMap;
 
 public class CommandLineService {
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index d1fdefd..5ba9d83 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -44,7 +44,7 @@ import org.apache.stratos.common.beans.cartridge.definition.IaasProviderBean;
 import org.apache.stratos.common.beans.kubernetes.KubernetesCluster;
 import org.apache.stratos.common.beans.kubernetes.KubernetesHost;
 import org.apache.stratos.common.beans.topology.Cluster;
-import org.apache.stratos.manager.domain.ApplicationDefinition;
+import org.apache.stratos.common.beans.ApplicationDefinition;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Persistence.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Persistence.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Persistence.java
index ba25de9..9d2f38d 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Persistence.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Persistence.java
@@ -24,7 +24,8 @@ import java.util.Arrays;
 public class Persistence implements Serializable{
 	
 	private static final long serialVersionUID = 3455721979991902731L;
-	private boolean persistanceRequired;
+
+    private boolean persistanceRequired;
 	private Volume[] volumes;
 
     public String toString () {

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/PortMapping.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/PortMapping.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/PortMapping.java
index cedbb49..b50ffc7 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/PortMapping.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/PortMapping.java
@@ -23,12 +23,12 @@ import java.io.Serializable;
 public class PortMapping implements Serializable{
 	
     private static final long serialVersionUID = -5387564414633460306L;
+
 	private String protocol;
 	private String port;
 	private String proxyPort;
 	
 	public PortMapping(){
-		
 	}
 	
 	public PortMapping(String protocol, String port, String proxyPort){

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationDefinition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationDefinition.java
new file mode 100644
index 0000000..a436016
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationDefinition.java
@@ -0,0 +1,95 @@
+/*
+ * 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.common.beans;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ApplicationDefinition implements Serializable {
+
+    private static final long serialVersionUID = -2829206180707597651L;
+
+	private String applicationId;
+    private String name;
+    private String description;
+    private String alias;
+    private ComponentDefinition components;
+    private String status;
+    private List<PropertyBean> property;
+
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public void setAlias(String alias) {
+        this.alias = alias;
+    }
+
+    public ComponentDefinition getComponents() {
+        return components;
+    }
+
+    public void setComponents(ComponentDefinition components) {
+        this.components = components;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+	public List<PropertyBean> getProperty() {
+		return property;
+	}
+
+	public void setProperty(List<PropertyBean> property) {
+		this.property = property;
+	}
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationSubscription.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationSubscription.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationSubscription.java
new file mode 100644
index 0000000..989b004
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationSubscription.java
@@ -0,0 +1,64 @@
+/*
+ * 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.common.beans;
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+public class ApplicationSubscription implements Serializable {
+
+    private static final long serialVersionUID = 3380699449827682550L;
+
+    private String applicationId;
+    private Set<String> cartridgeSubscriptionAliases;
+    private Set<String> groupSubscriptionAliases;
+
+    public ApplicationSubscription (String applicationId) {
+
+        this.applicationId = applicationId;
+        cartridgeSubscriptionAliases = new HashSet<String>();
+        groupSubscriptionAliases = new HashSet<String>();
+    }
+
+    public Set<String> getGroupSubscriptionAliases() {
+        return groupSubscriptionAliases;
+    }
+
+    public void addCartridgeSubscriptionAlias (String cartridgeSubscriptionAlias) {
+        cartridgeSubscriptionAliases.add(cartridgeSubscriptionAlias);
+    }
+
+    public void addCartridgeSubscriptionAliases (Set<String> cartridgeSubscriptionAliases) {
+        cartridgeSubscriptionAliases.addAll(cartridgeSubscriptionAliases);
+    }
+
+    public void addGroupSubscriptionAlias (String groupSubscriptionAlias) {
+        groupSubscriptionAliases.add(groupSubscriptionAlias);
+    }
+
+    public void addGroupSubscriptionAliases (Set<String> groupSubscriptionAliases) {
+        groupSubscriptionAliases.addAll(groupSubscriptionAliases);
+    }
+
+    public String getAppId() {
+        return applicationId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Cartridge.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Cartridge.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Cartridge.java
new file mode 100644
index 0000000..a48f943
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Cartridge.java
@@ -0,0 +1,329 @@
+/*
+ * 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.common.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Arrays;
+
+@XmlRootElement
+public class Cartridge implements Comparable<Cartridge> {
+
+	private String displayName;
+	private String description;
+	private boolean isPublic;
+	private String cartridgeAlias;
+	private String cartridgeType;
+	private int activeInstances;
+	private String status;
+	//private String ip;
+	private String provider;
+	private String category;
+	private String version;
+	private boolean multiTenant;
+	private boolean isLoadBalancer;
+	private String hostName;
+	//private String policy;
+	//private String policyDescription;
+	private String repoURL;
+	private String mappedDomain;
+
+	//DB specific
+	private String dbHost;
+	private String dbUserName;
+	private String password;
+
+	//LB cluster id
+	private String lbClusterId;
+
+	private String clusterId;
+
+	private String[] accessURLs;
+	private PortMapping[] portMappings;
+
+	private String defaultAutoscalingPolicy;
+
+	private String defaultDeploymentPolicy;
+
+	private boolean isPersistance;
+
+	private Persistence persistence;
+
+	private String serviceGroup;
+
+	public String getDisplayName() {
+		return displayName;
+	}
+
+	public void setDisplayName(String displayName) {
+		this.displayName = displayName;
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public boolean getIsPublic() {
+		return isPublic;
+	}
+
+	public void setIsPublic(boolean isPublic) {
+		this.isPublic = isPublic;
+	}
+
+	public String getCartridgeAlias() {
+		return cartridgeAlias;
+	}
+
+	public void setCartridgeAlias(String cartridgeAlias) {
+		this.cartridgeAlias = cartridgeAlias;
+	}
+
+	public String getCartridgeType() {
+		return cartridgeType;
+	}
+
+	public void setCartridgeType(String cartridgeType) {
+		this.cartridgeType = cartridgeType;
+	}
+
+	public int getActiveInstances() {
+		return activeInstances;
+	}
+
+	public void setActiveInstances(int activeInstances) {
+		this.activeInstances = activeInstances;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	/*public String getIp() {
+		return ip;
+	}
+
+	public void setIp(String ip) {
+		this.ip = ip;
+	}*/
+
+	public String getPassword() {
+		return password;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public String getProvider() {
+		return provider;
+	}
+
+	public void setProvider(String provider) {
+		this.provider = provider;
+	}
+
+	public String getVersion() {
+		return version;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+
+	public boolean isMultiTenant() {
+		return multiTenant;
+	}
+
+	public void setMultiTenant(boolean multiTenant) {
+		this.multiTenant = multiTenant;
+	}
+
+	public String getHostName() {
+		return hostName;
+	}
+
+	public void setHostName(String hostName) {
+		this.hostName = hostName;
+	}
+
+	/*public String getPolicy() {
+		return policy;
+	}
+
+	public void setPolicy(String policy) {
+		this.policy = policy;
+	}
+
+	public String getPolicyDescription() {
+		return policyDescription;
+	}
+
+	public void setPolicyDescription(String policyDescription) {
+		this.policyDescription = policyDescription;
+	}*/
+
+	public String getRepoURL() {
+		return repoURL;
+	}
+
+	public void setRepoURL(String repoURL) {
+		this.repoURL = repoURL;
+	}
+
+	public String getDbUserName() {
+		return dbUserName;
+	}
+
+	public String[] getAccessURLs() {
+		return accessURLs;
+	}
+
+	public void setAccessURLs(String[] accessURLs) {
+		if (accessURLs == null) {
+			this.accessURLs = new String[0];
+		} else {
+			this.accessURLs = Arrays.copyOf(accessURLs, accessURLs.length);
+		}
+	}
+
+	public void setDbUserName(String dbUserName) {
+		this.dbUserName = dbUserName;
+	}
+
+	public String getMappedDomain() {
+		return mappedDomain;
+	}
+
+	public void setMappedDomain(String mappedDomain) {
+		this.mappedDomain = mappedDomain;
+	}
+
+	@Override
+	public int compareTo(Cartridge o) {
+		int compare = 0;
+		if (cartridgeAlias != null && o.cartridgeAlias != null) {
+			compare = cartridgeAlias.compareTo(o.cartridgeAlias);
+		}
+		if (compare == 0 && cartridgeType != null && o.cartridgeType != null) {
+			compare = cartridgeType.compareTo(o.cartridgeType);
+		}
+		return compare;
+	}
+
+	public String getDbHost() {
+		return dbHost;
+	}
+
+	public void setDbHost(String dbHost) {
+		this.dbHost = dbHost;
+	}
+
+	public PortMapping[] getPortMappings() {
+		return portMappings;
+	}
+
+	public void setPortMappings(PortMapping[] portMappings) {
+		if (portMappings == null) {
+			this.portMappings = new PortMapping[0];
+		} else {
+			this.portMappings = Arrays.copyOf(portMappings, portMappings.length);
+		}
+	}
+
+	public String getLbClusterId() {
+		return lbClusterId;
+	}
+
+	public void setLbClusterId(String lbClusterId) {
+		this.lbClusterId = lbClusterId;
+	}
+
+	public boolean isLoadBalancer() {
+		return isLoadBalancer;
+	}
+
+	public void setLoadBalancer(boolean loadBalancer) {
+		this.isLoadBalancer = loadBalancer;
+	}
+
+	public String getDefaultAutoscalingPolicy() {
+		return defaultAutoscalingPolicy;
+	}
+
+	public void setDefaultAutoscalingPolicy(String defaultAutoscalingPolicy) {
+		this.defaultAutoscalingPolicy = defaultAutoscalingPolicy;
+	}
+
+	public String getDefaultDeploymentPolicy() {
+		return defaultDeploymentPolicy;
+	}
+
+	public void setDefaultDeploymentPolicy(String defaultDeploymentPolicy) {
+		this.defaultDeploymentPolicy = defaultDeploymentPolicy;
+	}
+
+	public boolean isPersistance() {
+		return isPersistance;
+	}
+
+	public void setPersistance(boolean persistance) {
+		isPersistance = persistance;
+	}
+
+	public Persistence getPersistence() {
+		return persistence;
+	}
+
+	public void setPersistence(Persistence persistence) {
+		this.persistence = persistence;
+	}
+
+	public String getServiceGroup() {
+		return serviceGroup;
+	}
+
+	public void setServiceGroup(String serviceGroup) {
+		this.serviceGroup = serviceGroup;
+	}
+
+	public String getClusterId() {
+		return clusterId;
+	}
+
+	public void setClusterId(String clusterId) {
+		this.clusterId = clusterId;
+	}
+
+	public String getCategory() {
+		return category;
+	}
+
+	public void setCategory(String category) {
+		this.category = category;
+	}
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/CartridgeDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/CartridgeDefinition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/CartridgeDefinition.java
new file mode 100644
index 0000000..a540111
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/CartridgeDefinition.java
@@ -0,0 +1,67 @@
+/*
+ * 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.common.beans;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class CartridgeDefinition implements Serializable {
+
+    private static final long serialVersionUID = 8968224678298479827L;
+
+	private String type;
+	private int cartridgeMin;
+	private int cartridgeMax;
+	private SubscribableInfo subscribableInfo;
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public int getCartridgeMin() {
+		return cartridgeMin;
+	}
+
+	public void setCartridgeMin(int cartridgeMin) {
+		this.cartridgeMin = cartridgeMin;
+	}
+
+	public int getCartridgeMax() {
+		return cartridgeMax;
+	}
+
+	public void setCartridgeMax(int cartridgeMax) {
+		this.cartridgeMax = cartridgeMax;
+	}
+
+	public SubscribableInfo getSubscribableInfo() {
+		return subscribableInfo;
+	}
+
+	public void setSubscribableInfo(SubscribableInfo subscribableInfo) {
+		this.subscribableInfo = subscribableInfo;
+	}	
+	
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ComponentDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ComponentDefinition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ComponentDefinition.java
new file mode 100644
index 0000000..d7b3a74
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ComponentDefinition.java
@@ -0,0 +1,40 @@
+package org.apache.stratos.common.beans;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "components")
+public class ComponentDefinition implements Serializable {
+
+    private static final long serialVersionUID = -5932265453191494386L;
+
+	private List<GroupDefinition> groups;
+	private DependencyDefinitions dependencies;
+    private List<CartridgeDefinition> cartridges;
+
+    public List<GroupDefinition> getGroups() {
+        return groups;
+    }
+
+    public void setGroups(List<GroupDefinition> groups) {
+        this.groups = groups;
+    }
+
+	public DependencyDefinitions getDependencies() {
+		return dependencies;
+	}
+
+	public void setDependencies(DependencyDefinitions dependencies) {
+		this.dependencies = dependencies;
+	}
+
+	public List<CartridgeDefinition> getCartridges() {
+		return cartridges;
+	}
+
+	public void setCartridges(List<CartridgeDefinition> cartridges) {
+		this.cartridges = cartridges;
+	}
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/DependencyDefinitions.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/DependencyDefinitions.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/DependencyDefinitions.java
new file mode 100644
index 0000000..ad3826b
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/DependencyDefinitions.java
@@ -0,0 +1,59 @@
+/*
+ * 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.common.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+@XmlRootElement(name = "dependencies")
+public class DependencyDefinitions implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+    private List<String> startupOrders;
+    private List<String> scalingDependants;
+    private String terminationBehaviour;
+
+    public String getTerminationBehaviour() {
+        return terminationBehaviour;
+    }
+
+    public void setTerminationBehaviour(String terminationBehaviour) {
+        this.terminationBehaviour = terminationBehaviour;
+    }
+
+	public List<String> getStartupOrders() {
+		return startupOrders;
+	}
+
+	public void setStartupOrders(List<String> startupOrders) {
+		this.startupOrders = startupOrders;
+	}
+
+	public List<String> getScalingDependants() {
+		return scalingDependants;
+	}
+
+	public void setScalingDependants(List<String> scalingDependants) {
+		this.scalingDependants = scalingDependants;
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/GroupDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/GroupDefinition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/GroupDefinition.java
new file mode 100644
index 0000000..2ac9929
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/GroupDefinition.java
@@ -0,0 +1,101 @@
+/*
+ * 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.common.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+@XmlRootElement(name = "groups")
+public class GroupDefinition implements Serializable {
+
+    private static final long serialVersionUID = 7261380706841894892L;
+
+	private String name;
+
+    private String alias;
+
+    private int groupMinInstances;
+
+    private int groupMaxInstances;
+
+    public boolean isGroupScalingEnabled;
+
+    private List<CartridgeDefinition> cartridges;
+
+    private List<GroupDefinition> groups;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public void setAlias(String alias) {
+        this.alias = alias;
+    }
+
+    public int getGroupMinInstances() {
+        return groupMinInstances;
+    }
+
+    public void setGroupMinInstances(int groupMinInstances) {
+        this.groupMinInstances = groupMinInstances;
+    }
+
+    public int getGroupMaxInstances() {
+        return groupMaxInstances;
+    }
+
+    public void setGroupMaxInstances(int groupMaxInstances) {
+        this.groupMaxInstances = groupMaxInstances;
+    }
+
+	public boolean isGroupScalingEnabled() {
+		return isGroupScalingEnabled;
+	}
+
+	public void setGroupScalingEnabled(boolean isGroupScalingEnabled) {
+		this.isGroupScalingEnabled = isGroupScalingEnabled;
+	}
+
+	public List<CartridgeDefinition> getCartridges() {
+		return cartridges;
+	}
+
+	public void setCartridges(List<CartridgeDefinition> cartridges) {
+		this.cartridges = cartridges;
+	}
+
+	public List<GroupDefinition> getGroups() {
+		return groups;
+	}
+
+	public void setGroups(List<GroupDefinition> groups) {
+		this.groups = groups;
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Persistence.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Persistence.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Persistence.java
new file mode 100644
index 0000000..b7b334b
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Persistence.java
@@ -0,0 +1,54 @@
+/*
+ * 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.common.beans;
+
+import java.io.Serializable;
+import java.util.Arrays;
+
+public class Persistence implements Serializable{
+	
+	private static final long serialVersionUID = 3455721979991902731L;
+
+    private boolean persistanceRequired;
+	private Volume[] volumes;
+
+    public String toString () {
+        return "Persistence Required: " + isPersistanceRequired();
+    }
+
+    public boolean isPersistanceRequired() {
+        return persistanceRequired;
+    }
+
+    public void setPersistanceRequired(boolean persistanceRequired) {
+        this.persistanceRequired = persistanceRequired;
+    }
+
+    public Volume[] getVolumes() {
+        return volumes;
+    }
+
+    public void setVolumes(Volume[] volumes) {
+        if(volumes == null) {
+            this.volumes = new Volume[0];
+        } else {
+            this.volumes = Arrays.copyOf(volumes, volumes.length);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/PortMapping.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/PortMapping.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/PortMapping.java
new file mode 100644
index 0000000..9b21aeb
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/PortMapping.java
@@ -0,0 +1,69 @@
+/*
+ * 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.common.beans;
+
+import java.io.Serializable;
+
+public class PortMapping implements Serializable{
+	
+    private static final long serialVersionUID = -5387564414633460306L;
+
+	private String protocol;
+	private String port;
+	private String proxyPort;
+	
+	public PortMapping(){
+	}
+	
+	public PortMapping(String protocol, String port, String proxyPort){
+		this.protocol = protocol;
+		this.port = port;
+		this.proxyPort = proxyPort;
+	}
+
+	public String getProtocol() {
+    	return protocol;
+    }
+
+	public void setProtocol(String protocol) {
+    	this.protocol = protocol;
+    }
+
+	public String getPort() {
+    	return port;
+    }
+
+	public void setPort(String port) {
+    	this.port = port;
+    }
+
+	public String getProxyPort() {
+    	return proxyPort;
+    }
+
+	public void setProxyPort(String proxyPort) {
+    	this.proxyPort = proxyPort;
+    }
+
+    public String toString () {
+
+        return "Protocol: " + protocol + ", Port: " + port + ", Proxy Port: " + proxyPort;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/PropertyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/PropertyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/PropertyBean.java
new file mode 100644
index 0000000..baa1105
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/PropertyBean.java
@@ -0,0 +1,49 @@
+/*
+ * 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.common.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+
+@XmlRootElement(name = "property")
+public class PropertyBean implements Serializable {
+
+    private static final long serialVersionUID = 5756598782384376873L;
+
+	private String name;
+
+    private String value;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ServiceGroupDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ServiceGroupDefinition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ServiceGroupDefinition.java
new file mode 100644
index 0000000..9dfdd10
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ServiceGroupDefinition.java
@@ -0,0 +1,74 @@
+/*
+ * 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.common.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+@XmlRootElement(name = "groups")
+public class ServiceGroupDefinition implements Serializable {
+
+    private String name;
+    private List<ServiceGroupDefinition> groups;
+    private List<String> cartridges;
+    private boolean isGroupScalingEnabled;
+    private DependencyDefinitions dependencies;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<String> getCartridges() {
+        return cartridges;
+    }
+
+    public void setCartridges(List<String> cartridges) {
+        this.cartridges = cartridges;
+    }
+
+    public DependencyDefinitions getDependencies() {
+        return dependencies;
+    }
+
+    public void setDependencies(DependencyDefinitions dependencies) {
+        this.dependencies = dependencies;
+    }
+
+    public List<ServiceGroupDefinition> getGroups() {
+        return groups;
+    }
+
+    public void setGroups(List<ServiceGroupDefinition> groups) {
+        this.groups = groups;
+    }
+
+    public boolean isGroupScalingEnabled() {
+        return isGroupScalingEnabled;
+    }
+
+    public void setGroupScalingEnabled(boolean isGroupScalingEnabled) {
+        this.isGroupScalingEnabled = isGroupScalingEnabled;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/SubscribableInfo.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/SubscribableInfo.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/SubscribableInfo.java
new file mode 100644
index 0000000..020f20b
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/SubscribableInfo.java
@@ -0,0 +1,133 @@
+/*
+ * 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.common.beans;
+
+import org.apache.stratos.common.beans.PropertyBean;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "subscribableInfo")
+public class SubscribableInfo implements Serializable {
+
+    private static final long serialVersionUID = 8097432440778125606L;
+
+	private String alias;
+    private String deploymentPolicy;
+    private String autoscalingPolicy;
+    private String repoUrl;
+    private boolean privateRepo;
+    private String repoUsername;
+    private int maxMembers;
+    private int minMembers;
+    private String repoPassword;
+    private String[] dependencyAliases;
+    private List<PropertyBean> property;
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public void setAlias(String alias) {
+        this.alias = alias;
+    }
+
+    public String getDeploymentPolicy() {
+        return deploymentPolicy;
+    }
+
+    public void setDeploymentPolicy(String deploymentPolicy) {
+        this.deploymentPolicy = deploymentPolicy;
+    }
+
+    public String getAutoscalingPolicy() {
+        return autoscalingPolicy;
+    }
+
+    public void setAutoscalingPolicy(String autoscalingPolicy) {
+        this.autoscalingPolicy = autoscalingPolicy;
+    }
+
+    public String getRepoUrl() {
+        return repoUrl;
+    }
+
+    public void setRepoUrl(String repoUrl) {
+        this.repoUrl = repoUrl;
+    }
+
+    public boolean isPrivateRepo() {
+        return privateRepo;
+    }
+
+    public void setPrivateRepo(boolean privateRepo) {
+        this.privateRepo = privateRepo;
+    }
+
+    public String getRepoUsername() {
+        return repoUsername;
+    }
+
+    public void setRepoUsername(String repoUsername) {
+        this.repoUsername = repoUsername;
+    }
+
+    public String getRepoPassword() {
+        return repoPassword;
+    }
+
+    public void setRepoPassword(String repoPassword) {
+        this.repoPassword = repoPassword;
+    }
+
+    public String[] getDependencyAliases() {
+        return dependencyAliases;
+    }
+
+    public void setDependencyAliases(String[] dependencyAliases) {
+        this.dependencyAliases = dependencyAliases;
+    }
+    
+    public List<PropertyBean> getProperty() {
+        return property;
+    }
+
+    public void setProperty(List<PropertyBean> property) {
+        this.property = property;
+    }
+
+    public int getMaxMembers() {
+        return maxMembers;
+    }
+
+    public void setMaxMembers(int maxMembers) {
+        this.maxMembers = maxMembers;
+    }
+
+    public int getMinMembers() {
+        return minMembers;
+    }
+
+    public void setMinMembers(int minMembers) {
+        this.minMembers = minMembers;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Volume.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Volume.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Volume.java
new file mode 100644
index 0000000..7add8b5
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Volume.java
@@ -0,0 +1,126 @@
+/*
+ * 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.common.beans;
+
+import java.io.Serializable;
+
+public class Volume implements Serializable {
+    private static final long serialVersionUID = 3455729879991902731L;
+
+    private String id;
+    private int size;
+	private String device;
+	private boolean removeOntermination;
+    private String mappingPath;
+    private String iaasType;
+    private String snapshotId;
+    private String volumeId;
+
+    public String toString () {
+        return "Persistence Required: " + ", Size: " + getSize() + ", device: " + getDevice() +
+                " mapping path : " + mappingPath + " remove on termination " + isRemoveOntermination() + " SnaphotId " + snapshotId;
+    }
+
+    public int getSize() {
+        return size;
+    }
+
+    public void setSize(int size) {
+        this.size = size;
+    }
+
+    public String getDevice() {
+        return device;
+    }
+
+    public void setDevice(String device) {
+        this.device = device;
+    }
+
+    public boolean isRemoveOntermination() {return removeOntermination;}
+
+    public void setRemoveOntermination(boolean removeOntermination) {
+        this.removeOntermination = removeOntermination;
+    }
+
+    public String getMappingPath() {
+        return mappingPath;
+    }
+
+    public void setMappingPath(String mappingPath) {
+        this.mappingPath = mappingPath;
+    }
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((id == null) ? 0 : id.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		Volume other = (Volume) obj;
+		if (id == null) {
+			if (other.id != null)
+				return false;
+		} else if (!id.equals(other.id))
+			return false;
+		return true;
+	}
+
+	public String getIaasType() {
+		return iaasType;
+	}
+
+	public void setIaasType(String iaasType) {
+		this.iaasType = iaasType;
+	}
+
+	public String getSnapshotId() {
+		return snapshotId;
+	}
+
+	public void setSnapshotId(String snapshotId) {
+		this.snapshotId = snapshotId;
+	}
+
+    public String getVolumeId() {
+        return volumeId;
+    }
+
+    public void setVolumeId(String volumeId) {
+        this.volumeId = volumeId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/RegistryManager.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/RegistryManager.java
index b58fc2a..b2f70f6 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/RegistryManager.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/registry/RegistryManager.java
@@ -29,6 +29,7 @@ import org.wso2.carbon.registry.core.Registry;
 import org.wso2.carbon.registry.core.Resource;
 import org.wso2.carbon.registry.core.exceptions.RegistryException;
 import org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException;
+import org.wso2.carbon.registry.core.session.UserRegistry;
 import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
 
 import java.io.Serializable;
@@ -57,10 +58,11 @@ public class RegistryManager {
         if(log.isDebugEnabled()) {
             log.debug(String.format("Persisting resource in registry: [resource-path] %s", resourcePath));
         }
-        Registry registry = ServiceReferenceHolder.getInstance().getRegistryService().getRegistry();
+
+        Registry registry = getRegistry();
 
         try {
-        	PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
+            PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
         	ctx.setTenantId(MultitenantConstants.SUPER_TENANT_ID);
         	ctx.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
 
@@ -92,10 +94,7 @@ public class RegistryManager {
      */
     public synchronized Object read(String resourcePath) throws RegistryException {
         try {
-            Registry registry = ServiceReferenceHolder.getInstance().getRegistryService().getRegistry();
-            if(registry == null) {
-                return null;
-            }
+            Registry registry = getRegistry();
 
             PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
         	ctx.setTenantId(MultitenantConstants.SUPER_TENANT_ID);
@@ -119,4 +118,8 @@ public class RegistryManager {
             throw new RegistryException(msg, e);
         }
     }
+
+    private UserRegistry getRegistry() throws RegistryException {
+        return ServiceReferenceHolder.getInstance().getRegistryService().getGovernanceSystemRegistry();
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ApplicationDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ApplicationDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ApplicationDefinition.java
deleted file mode 100644
index 43b6e8f..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ApplicationDefinition.java
+++ /dev/null
@@ -1,95 +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.domain;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class ApplicationDefinition implements Serializable {
-
-    private static final long serialVersionUID = -2829206180707597651L;
-
-	private String applicationId;
-    private String name;
-    private String description;
-    private String alias;
-    private ComponentDefinition components;
-    private String status;
-    private List<PropertyBean> property;
-    
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getAlias() {
-        return alias;
-    }
-
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    public ComponentDefinition getComponents() {
-        return components;
-    }
-
-    public void setComponents(ComponentDefinition components) {
-        this.components = components;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-	public List<PropertyBean> getProperty() {
-		return property;
-	}
-
-	public void setProperty(List<PropertyBean> property) {
-		this.property = property;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ApplicationSubscription.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ApplicationSubscription.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ApplicationSubscription.java
deleted file mode 100644
index 0e9af05..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ApplicationSubscription.java
+++ /dev/null
@@ -1,68 +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.domain;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Set;
-
-public class ApplicationSubscription implements Serializable {
-
-    private static final long serialVersionUID = 3380699449827682550L;
-
-    private static Log log = LogFactory.getLog(ApplicationSubscription.class);
-    private String appId;
-    private Set<String> cartridgeSubscriptionAliases;
-    private Set<String> groupSubscriptionAliases;
-
-    public ApplicationSubscription (String appId) {
-
-        this.appId = appId;
-        cartridgeSubscriptionAliases = new HashSet<String>();
-        groupSubscriptionAliases = new HashSet<String>();
-    }
-
-    public Set<String> getGroupSubscriptionAliases() {
-        return groupSubscriptionAliases;
-    }
-
-    public void addCartridgeSubscriptionAlias (String cartridgeSubscriptionAlias) {
-        cartridgeSubscriptionAliases.add(cartridgeSubscriptionAlias);
-    }
-
-    public void addCartridgeSubscriptionAliases (Set<String> cartridgeSubscriptionAliases) {
-        cartridgeSubscriptionAliases.addAll(cartridgeSubscriptionAliases);
-    }
-
-    public void addGroupSubscriptionAlias (String groupSubscriptionAlias) {
-        groupSubscriptionAliases.add(groupSubscriptionAlias);
-    }
-
-    public void addGroupSubscriptionAliases (Set<String> groupSubscriptionAliases) {
-        groupSubscriptionAliases.addAll(groupSubscriptionAliases);
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Cartridge.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Cartridge.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Cartridge.java
deleted file mode 100644
index f44d86d..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Cartridge.java
+++ /dev/null
@@ -1,332 +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.domain;
-
-import org.apache.stratos.cloud.controller.stub.domain.Persistence;
-import org.apache.stratos.cloud.controller.stub.domain.PortMapping;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.Arrays;
-
-@XmlRootElement
-public class Cartridge implements Comparable<Cartridge> {
-
-	private String displayName;
-	private String description;
-	private boolean isPublic;
-	private String cartridgeAlias;
-	private String cartridgeType;
-	private int activeInstances;
-	private String status;
-	//private String ip;
-	private String provider;
-	private String category;
-	private String version;
-	private boolean multiTenant;
-	private boolean isLoadBalancer;
-	private String hostName;
-	//private String policy;
-	//private String policyDescription;
-	private String repoURL;
-	private String mappedDomain;
-
-	//DB specific
-	private String dbHost;
-	private String dbUserName;
-	private String password;
-
-	//LB cluster id
-	private String lbClusterId;
-
-	private String clusterId;
-
-	private String[] accessURLs;
-	private PortMapping[] portMappings;
-
-	private String defaultAutoscalingPolicy;
-
-	private String defaultDeploymentPolicy;
-
-	private boolean isPersistance;
-
-	private Persistence persistence;
-
-	private String serviceGroup;
-
-	public String getDisplayName() {
-		return displayName;
-	}
-
-	public void setDisplayName(String displayName) {
-		this.displayName = displayName;
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	public boolean getIsPublic() {
-		return isPublic;
-	}
-
-	public void setIsPublic(boolean isPublic) {
-		this.isPublic = isPublic;
-	}
-
-	public String getCartridgeAlias() {
-		return cartridgeAlias;
-	}
-
-	public void setCartridgeAlias(String cartridgeAlias) {
-		this.cartridgeAlias = cartridgeAlias;
-	}
-
-	public String getCartridgeType() {
-		return cartridgeType;
-	}
-
-	public void setCartridgeType(String cartridgeType) {
-		this.cartridgeType = cartridgeType;
-	}
-
-	public int getActiveInstances() {
-		return activeInstances;
-	}
-
-	public void setActiveInstances(int activeInstances) {
-		this.activeInstances = activeInstances;
-	}
-
-	public String getStatus() {
-		return status;
-	}
-
-	public void setStatus(String status) {
-		this.status = status;
-	}
-
-	/*public String getIp() {
-		return ip;
-	}
-
-	public void setIp(String ip) {
-		this.ip = ip;
-	}*/
-
-	public String getPassword() {
-		return password;
-	}
-
-	public void setPassword(String password) {
-		this.password = password;
-	}
-
-	public String getProvider() {
-		return provider;
-	}
-
-	public void setProvider(String provider) {
-		this.provider = provider;
-	}
-
-	public String getVersion() {
-		return version;
-	}
-
-	public void setVersion(String version) {
-		this.version = version;
-	}
-
-	public boolean isMultiTenant() {
-		return multiTenant;
-	}
-
-	public void setMultiTenant(boolean multiTenant) {
-		this.multiTenant = multiTenant;
-	}
-
-	public String getHostName() {
-		return hostName;
-	}
-
-	public void setHostName(String hostName) {
-		this.hostName = hostName;
-	}
-
-	/*public String getPolicy() {
-		return policy;
-	}
-
-	public void setPolicy(String policy) {
-		this.policy = policy;
-	}
-
-	public String getPolicyDescription() {
-		return policyDescription;
-	}
-
-	public void setPolicyDescription(String policyDescription) {
-		this.policyDescription = policyDescription;
-	}*/
-
-	public String getRepoURL() {
-		return repoURL;
-	}
-
-	public void setRepoURL(String repoURL) {
-		this.repoURL = repoURL;
-	}
-
-	public String getDbUserName() {
-		return dbUserName;
-	}
-
-	public String[] getAccessURLs() {
-		return accessURLs;
-	}
-
-	public void setAccessURLs(String[] accessURLs) {
-		if (accessURLs == null) {
-			this.accessURLs = new String[0];
-		} else {
-			this.accessURLs = Arrays.copyOf(accessURLs, accessURLs.length);
-		}
-	}
-
-	public void setDbUserName(String dbUserName) {
-		this.dbUserName = dbUserName;
-	}
-
-	public String getMappedDomain() {
-		return mappedDomain;
-	}
-
-	public void setMappedDomain(String mappedDomain) {
-		this.mappedDomain = mappedDomain;
-	}
-
-	@Override
-	public int compareTo(Cartridge o) {
-		int compare = 0;
-		if (cartridgeAlias != null && o.cartridgeAlias != null) {
-			compare = cartridgeAlias.compareTo(o.cartridgeAlias);
-		}
-		if (compare == 0 && cartridgeType != null && o.cartridgeType != null) {
-			compare = cartridgeType.compareTo(o.cartridgeType);
-		}
-		return compare;
-	}
-
-	public String getDbHost() {
-		return dbHost;
-	}
-
-	public void setDbHost(String dbHost) {
-		this.dbHost = dbHost;
-	}
-
-	public PortMapping[] getPortMappings() {
-		return portMappings;
-	}
-
-	public void setPortMappings(PortMapping[] portMappings) {
-		if (portMappings == null) {
-			this.portMappings = new PortMapping[0];
-		} else {
-			this.portMappings = Arrays.copyOf(portMappings, portMappings.length);
-		}
-	}
-
-	public String getLbClusterId() {
-		return lbClusterId;
-	}
-
-	public void setLbClusterId(String lbClusterId) {
-		this.lbClusterId = lbClusterId;
-	}
-
-	public boolean isLoadBalancer() {
-		return isLoadBalancer;
-	}
-
-	public void setLoadBalancer(boolean loadBalancer) {
-		this.isLoadBalancer = loadBalancer;
-	}
-
-	public String getDefaultAutoscalingPolicy() {
-		return defaultAutoscalingPolicy;
-	}
-
-	public void setDefaultAutoscalingPolicy(String defaultAutoscalingPolicy) {
-		this.defaultAutoscalingPolicy = defaultAutoscalingPolicy;
-	}
-
-	public String getDefaultDeploymentPolicy() {
-		return defaultDeploymentPolicy;
-	}
-
-	public void setDefaultDeploymentPolicy(String defaultDeploymentPolicy) {
-		this.defaultDeploymentPolicy = defaultDeploymentPolicy;
-	}
-
-	public boolean isPersistance() {
-		return isPersistance;
-	}
-
-	public void setPersistance(boolean persistance) {
-		isPersistance = persistance;
-	}
-
-	public Persistence getPersistence() {
-		return persistence;
-	}
-
-	public void setPersistence(Persistence persistence) {
-		this.persistence = persistence;
-	}
-
-	public String getServiceGroup() {
-		return serviceGroup;
-	}
-
-	public void setServiceGroup(String serviceGroup) {
-		this.serviceGroup = serviceGroup;
-	}
-
-	public String getClusterId() {
-		return clusterId;
-	}
-
-	public void setClusterId(String clusterId) {
-		this.clusterId = clusterId;
-	}
-
-	public String getCategory() {
-		return category;
-	}
-
-	public void setCategory(String category) {
-		this.category = category;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeDefinition.java
deleted file mode 100644
index 6fb01b6..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeDefinition.java
+++ /dev/null
@@ -1,67 +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.domain;
-
-import java.io.Serializable;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class CartridgeDefinition implements Serializable {
-
-    private static final long serialVersionUID = 8968224678298479827L;
-
-	private String type;
-	private int cartridgeMin;
-	private int cartridgeMax;
-	private SubscribableInfo subscribableInfo;
-
-	public String getType() {
-		return type;
-	}
-
-	public void setType(String type) {
-		this.type = type;
-	}
-
-	public int getCartridgeMin() {
-		return cartridgeMin;
-	}
-
-	public void setCartridgeMin(int cartridgeMin) {
-		this.cartridgeMin = cartridgeMin;
-	}
-
-	public int getCartridgeMax() {
-		return cartridgeMax;
-	}
-
-	public void setCartridgeMax(int cartridgeMax) {
-		this.cartridgeMax = cartridgeMax;
-	}
-
-	public SubscribableInfo getSubscribableInfo() {
-		return subscribableInfo;
-	}
-
-	public void setSubscribableInfo(SubscribableInfo subscribableInfo) {
-		this.subscribableInfo = subscribableInfo;
-	}	
-	
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeSubscriptionInfo.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeSubscriptionInfo.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeSubscriptionInfo.java
deleted file mode 100644
index 8a68d8a..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeSubscriptionInfo.java
+++ /dev/null
@@ -1,200 +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.domain;
-
-import org.apache.stratos.manager.domain.repository.Repository;
-
-import java.util.List;
-
-public class CartridgeSubscriptionInfo {
-
-	private int subscriptionId;
-	private int tenantId;
-	private String cartridge;
-	private String provider;
-	private String hostName;
-	private String policy;
-	private List<PortMapping> portMappings;
-	private String clusterDomain;
-	private String clusterSubdomain;
-	private Repository repository;
-	private String state;
-	private String alias;
-	private String tenantDomain;
-	private DataCartridge dataCartridge;
-	private String baseDirectory;
-	private String mappedDomain;
-	private String mgtClusterDomain;
-	private String mgtClusterSubDomain;
-	private String subscriptionKey;
-
-	public int getSubscriptionId() {
-		return subscriptionId;
-	}
-
-	public void setSubscriptionId(int subscriptionId) {
-		this.subscriptionId = subscriptionId;
-	}
-
-	public int getTenantId() {
-		return tenantId;
-	}
-
-	public void setTenantId(int tenantId) {
-		this.tenantId = tenantId;
-	}
-
-	public String getCartridge() {
-		return cartridge;
-	}
-
-	public void setCartridge(String cartridge) {
-		this.cartridge = cartridge;
-	}
-
-	public String getProvider() {
-		return provider;
-	}
-
-	public void setProvider(String provider) {
-		this.provider = provider;
-	}
-
-	public String getHostName() {
-		return hostName;
-	}
-
-	public void setHostName(String hostName) {
-		this.hostName = hostName;
-	}
-
-	public String getPolicy() {
-		return policy;
-	}
-
-	public void setPolicy(String policy) {
-		this.policy = policy;
-	}
-
-	public List<PortMapping> getPortMappings() {
-		return portMappings;
-	}
-
-	public void setPortMappings(List<PortMapping> portMappings) {
-		this.portMappings = portMappings;
-	}
-
-	public String getClusterDomain() {
-		return clusterDomain;
-	}
-
-	public void setClusterDomain(String clusterDomain) {
-		this.clusterDomain = clusterDomain;
-	}
-
-	public String getClusterSubdomain() {
-		return clusterSubdomain;
-	}
-
-	public void setClusterSubdomain(String clusterSubdomain) {
-		this.clusterSubdomain = clusterSubdomain;
-	}
-
-	public Repository getRepository() {
-		return repository;
-	}
-
-	public void setRepository(Repository repository) {
-		this.repository = repository;
-	}
-
-	public String getState() {
-		return state;
-	}
-
-	public void setState(String state) {
-		this.state = state;
-	}
-
-	public String getAlias() {
-		return alias;
-	}
-
-	public void setAlias(String alias) {
-		this.alias = alias;
-	}
-
-	public String getTenantDomain() {
-		return tenantDomain;
-	}
-
-	public void setTenantDomain(String tenantDomain) {
-		this.tenantDomain = tenantDomain;
-	}
-
-	public DataCartridge getDataCartridge() {
-		return dataCartridge;
-	}
-
-	public void setDataCartridge(DataCartridge dataCartridge) {
-		this.dataCartridge = dataCartridge;
-	}
-
-	public String getBaseDirectory() {
-		return baseDirectory;
-	}
-
-	public void setBaseDirectory(String baseDirectory) {
-		this.baseDirectory = baseDirectory;
-	}
-
-	public String getMappedDomain() {
-		return mappedDomain;
-	}
-
-	public void setMappedDomain(String mappedDomain) {
-		this.mappedDomain = mappedDomain;
-	}
-
-	public String getMgtClusterDomain() {
-		return mgtClusterDomain;
-	}
-
-	public void setMgtClusterDomain(String mgtClusterDomain) {
-		this.mgtClusterDomain = mgtClusterDomain;
-	}
-
-	public String getMgtClusterSubDomain() {
-		return mgtClusterSubDomain;
-	}
-
-	public void setMgtClusterSubDomain(String mgtClusterSubDomain) {
-		this.mgtClusterSubDomain = mgtClusterSubDomain;
-	}
-
-	public String getSubscriptionKey() {
-		return subscriptionKey;
-	}
-
-	public void setSubscriptionKey(String subscriptionKey) {
-		this.subscriptionKey = subscriptionKey;
-	}	
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeWrapper.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeWrapper.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeWrapper.java
deleted file mode 100644
index a6bcbda..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/CartridgeWrapper.java
+++ /dev/null
@@ -1,52 +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.domain;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.wso2.carbon.utils.Pageable;
-
-/**
- * This class holds paginated information about cartridges
- */
-public final class CartridgeWrapper implements Pageable {
-
-	private Cartridge[] cartridges;
-	private int numberOfPages;
-
-	public CartridgeWrapper() {
-	}
-
-	public int getNumberOfPages() {
-		return numberOfPages;
-	}
-
-	public void setNumberOfPages(int numberOfPages) {
-		this.numberOfPages = numberOfPages;
-	}
-
-	public <T> void set(List<T> items) {
-		this.cartridges = items.toArray(new Cartridge[items.size()]);
-	}
-
-	public Cartridge[] getCartridges() {
-		return cartridges != null ? Arrays.copyOf(cartridges, cartridges.length) : null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Cluster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Cluster.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Cluster.java
deleted file mode 100644
index 065c28c..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Cluster.java
+++ /dev/null
@@ -1,97 +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.domain;
-
-import java.io.Serializable;
-
-public class Cluster implements Serializable {
-	private static final long serialVersionUID = -1579127946734432357L;
-	private int id;
-    private String clusterDomain;
-    private String clusterSubDomain;
-    private String mgtClusterDomain;
-    private String mgtClusterSubDomain;
-    private String hostName;
-    private String serviceStatus;
-
-    public Cluster() {
-    }
-
-    public String getHostName() {
-        return hostName;
-    }
-
-    public String getClusterDomain() {
-        return clusterDomain;
-    }
-
-    public void setClusterDomain(String clusterDomain) {
-        this.clusterDomain = clusterDomain;
-    }
-
-    public String getClusterSubDomain() {
-        return clusterSubDomain;
-    }
-
-    public void setClusterSubDomain(String clusterSubDomain) {
-        this.clusterSubDomain = clusterSubDomain;
-    }
-
-    public String getMgtClusterDomain() {
-        return mgtClusterDomain;
-    }
-
-    public void setMgtClusterDomain(String mgtClusterDomain) {
-        this.mgtClusterDomain = mgtClusterDomain;
-    }
-
-    public String getMgtClusterSubDomain() {
-        return mgtClusterSubDomain;
-    }
-
-    public void setMgtClusterSubDomain(String mgtClusterSubDomain) {
-        this.mgtClusterSubDomain = mgtClusterSubDomain;
-    }
-
-    public void setHostName(String hostName) {
-        this.hostName = hostName;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public String getServiceStatus() {
-        return serviceStatus;
-    }
-
-    public void setServiceStatus(String serviceStatus) {
-        this.serviceStatus = serviceStatus;
-    }
-
-    public String toString () {
-        return clusterDomain;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ComponentDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ComponentDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ComponentDefinition.java
deleted file mode 100644
index f4ff529..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ComponentDefinition.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.apache.stratos.manager.domain;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "components")
-public class ComponentDefinition implements Serializable {
-
-    private static final long serialVersionUID = -5932265453191494386L;
-
-	private List<GroupDefinition> groups;
-	private DependencyDefinitions dependencies;
-    private List<CartridgeDefinition> cartridges;
-
-    public List<GroupDefinition> getGroups() {
-        return groups;
-    }
-
-    public void setGroups(List<GroupDefinition> groups) {
-        this.groups = groups;
-    }
-
-	public DependencyDefinitions getDependencies() {
-		return dependencies;
-	}
-
-	public void setDependencies(DependencyDefinitions dependencies) {
-		this.dependencies = dependencies;
-	}
-
-	public List<CartridgeDefinition> getCartridges() {
-		return cartridges;
-	}
-
-	public void setCartridges(List<CartridgeDefinition> cartridges) {
-		this.cartridges = cartridges;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DataCartridge.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DataCartridge.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DataCartridge.java
deleted file mode 100644
index 857baa9..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DataCartridge.java
+++ /dev/null
@@ -1,62 +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.domain;
-
-public class DataCartridge {
-
-	private int id;
-	private String dataCartridgeType;
-    private String host;
-	private String userName;
-	private String password;
-
-	public int getId() {
-    	return id;
-    }
-	public void setId(int id) {
-    	this.id = id;
-    }
-	public String getDataCartridgeType() {
-    	return dataCartridgeType;
-    }
-	public void setDataCartridgeType(String dataCartridgeType) {
-    	this.dataCartridgeType = dataCartridgeType;
-    }
-	public String getUserName() {
-    	return userName;
-    }
-	public void setUserName(String userName) {
-    	this.userName = userName;
-    }
-	public String getPassword() {
-    	return password;
-    }
-	public void setPassword(String password) {
-    	this.password = password;
-    }
-
-    public String getHost() {
-        return host;
-    }
-
-    public void setHost(String host) {
-        this.host = host;
-    }
-}