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:13 UTC

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

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;
-    }
-}