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/10 16:19:35 UTC

[1/8] stratos git commit: Cleaning rest api bean classes

Repository: stratos
Updated Branches:
  refs/heads/master 0456d484b -> 8bf5f9478


http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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 7e6e164..e91b399 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:ax29="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax25="http://common.stratos.apache.org/xsd" xmlns:ax23="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax218="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax222="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
 xmlns:ax211="http://application.exception.autoscaler.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://impl.services.autoscaler.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax27="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax25="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax216="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://common.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax215="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/ht
 tp/" xmlns:ax211="http://policy.exception.autoscaler.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://impl.services.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="ax29:LoadThresholds"/>
+                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax213:LoadThresholds"/>
                     <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
                 </xs:sequence>
             </xs:complexType>
@@ -20,17 +20,17 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax214="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax23="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="ax213:ComponentContext"/>
+                    <xs:element minOccurs="0" name="components" nillable="true" type="ax21:ComponentContext"/>
                     <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
                     <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax23: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"/>
@@ -39,29 +39,29 @@
             </xs:complexType>
             <xs:complexType name="ComponentContext">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax213:CartridgeContext"/>
-                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax213:DependencyContext"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax213:GroupContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax21:CartridgeContext"/>
+                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax21:DependencyContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax21: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="ax213:SubscribableInfoContext"/>
+                    <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax21:SubscribableInfoContext"/>
                     <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="SubscribableInfoContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax213:ArtifactRepositoryContext"/>
+                    <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax21:ArtifactRepositoryContext"/>
                     <xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"/>
                     <xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyAliases" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="maxMembers" type="xs:int"/>
                     <xs:element minOccurs="0" name="minMembers" type="xs:int"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="ArtifactRepositoryContext">
@@ -83,8 +83,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="ax213:CartridgeContext"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax213:GroupContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax21:CartridgeContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax21: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"/>
@@ -96,8 +96,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="ax21:Dependencies"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax21:ServiceGroup"/>
+                    <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax29:Dependencies"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax29:ServiceGroup"/>
                     <xs:element minOccurs="0" name="groupscalingEnabled" type="xs:boolean"/>
                     <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                 </xs:sequence>
@@ -110,82 +110,82 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax28="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax220="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax215="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://common.stratos.apache.org/xsd" xmlns:ax212="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
-            <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
+        <xs:schema xmlns:ax218="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="ax216:Partition"/>
+                    <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax216:ApplicationLevelNetworkPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax216:ChildLevelNetworkPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax215: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"/>
+                </xs:sequence>
+            </xs:complexType>
+            <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="ax216:ChildLevelNetworkPartition"/>
+                </xs:sequence>
+            </xs:complexType>
+        </xs:schema>
+        <xs:schema xmlns:ax28="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax220="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://common.stratos.apache.org/xsd" xmlns:ax212="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
             <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
+            <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
+            <xs:import namespace="http://pojo.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://common.stratos.apache.org/xsd"/>
             <xs:import namespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd"/>
-            <xs:element name="getServiceGroup">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getServiceGroupResponse">
+            <xs:element name="getApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getDeploymentPolicy">
+            <xs:element name="getApplicationResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax24:ApplicationContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getDeploymentPolicyResponse">
+            <xs:element name="deleteApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax28:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAutoscalingPolicy">
+            <xs:element name="getApplications">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
-                    </xs:sequence>
+                    <xs:sequence/>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAutoscalingPolicyResponse">
+            <xs:element name="getApplicationsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:AutoscalePolicy"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax24:ApplicationContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceApplicationDefinitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax212:ApplicationDefinitionException"/>
+                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax25:ApplicationDefinitionException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax215:ApplicationContext"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getApplications">
-                <xs:complexType>
-                    <xs:sequence/>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getApplicationsResponse">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax215:ApplicationContext"/>
+                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax24:ApplicationContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -206,7 +206,7 @@
             <xs:element name="AutoScalerServiceAutoScalerException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax217:AutoScalerException"/>
+                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax27:AutoScalerException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -218,7 +218,7 @@
             <xs:element name="getServiceGroupsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -232,14 +232,14 @@
             <xs:element name="AutoScalerServiceInvalidPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax219:InvalidPolicyException"/>
+                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax212:InvalidPolicyException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax29:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax214:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -258,14 +258,14 @@
             <xs:element name="getAutoScalingPoliciesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:AutoscalePolicy"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax214:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax29:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax214:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -280,7 +280,7 @@
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax28:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax219:DeploymentPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -308,14 +308,14 @@
             <xs:element name="getNetworkPartitionsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax24:ApplicationLevelNetworkPartition"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax216:ApplicationLevelNetworkPartition"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceInvalidArgumentException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax217:InvalidArgumentException"/>
+                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax27:InvalidArgumentException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -323,7 +323,7 @@
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax22:Properties"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -337,7 +337,7 @@
             <xs:element name="addServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax21:ServiceGroup"/>
+                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax29:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -348,57 +348,50 @@
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getApplication">
+            <xs:element name="getServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" 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="getApplicationResponse">
+            <xs:element name="getServiceGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax215:ApplicationContext"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deleteApplication">
+            <xs:element name="getDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getDeploymentPolicyResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax219:DeploymentPolicy"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getAutoscalingPolicy">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getAutoscalingPolicyResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax214:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
         </xs:schema>
-        <xs:schema xmlns:ax27="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="ax27:Partition"/>
-                    <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax27:ApplicationLevelNetworkPartition"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax27:ChildLevelNetworkPartition"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax23: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"/>
-                </xs:sequence>
-            </xs:complexType>
-            <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="ax27:ChildLevelNetworkPartition"/>
-                </xs:sequence>
-            </xs:complexType>
-        </xs:schema>
-        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://application.exception.autoscaler.stratos.apache.org/xsd">
-            <xs:complexType name="ApplicationDefinitionException">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-        </xs:schema>
-        <xs:schema xmlns:ax26="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:ax217="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>
@@ -406,7 +399,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="ax25:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax217:Properties"/>
                     <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
@@ -415,12 +408,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="ax24:Partition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax216:Partition"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="ChildLevelNetworkPartition">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax24:ChildLevelPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax216: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"/>
@@ -434,6 +427,13 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
+        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://application.exception.autoscaler.stratos.apache.org/xsd">
+            <xs:complexType name="ApplicationDefinitionException">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+        </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="InvalidServiceGroupException">
                 <xs:sequence>
@@ -444,7 +444,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="ax25:Property"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax22:Property"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="Property">
@@ -533,15 +533,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>
@@ -620,13 +620,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"/>
@@ -746,6 +746,12 @@
                 <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>
@@ -755,12 +761,6 @@
                 <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>
@@ -923,6 +923,12 @@
                 <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>
@@ -932,12 +938,6 @@
                 <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>
@@ -1088,6 +1088,12 @@
                 <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>
@@ -1097,12 +1103,6 @@
                 <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>

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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 16828b9..3adfc64 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
@@ -338,34 +338,6 @@
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="startInstance">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="startInstanceResponse">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="CloudControllerServiceInvalidMemberException">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="terminateInstance">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
             <xs:element name="getCartridges">
                 <xs:complexType>
                     <xs:sequence/>
@@ -516,6 +488,34 @@
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
+            <xs:element name="startInstance">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="startInstanceResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="CloudControllerServiceInvalidMemberException">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="terminateInstance">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
         </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://topology.domain.messaging.stratos.apache.org/xsd">
             <xs:complexType abstract="true" name="ClusterStatus">
@@ -619,17 +619,17 @@
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidMemberException">
+            <xs:complexType name="InvalidCartridgeDefinitionException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidCartridgeDefinitionException">
+            <xs:complexType name="InvalidKubernetesClusterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidKubernetesClusterException">
+            <xs:complexType name="InvalidMemberException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>


[2/8] stratos git commit: Cleaning rest api bean classes

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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 0b806f1..7ef13f7 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,27 +27,26 @@ 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.*;
-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.*;
-import org.apache.stratos.common.beans.autoscaler.policy.deployment.ApplicationPolicy;
-import org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.common.beans.cartridge.definition.*;
-import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
-import org.apache.stratos.common.beans.kubernetes.KubernetesCluster;
-import org.apache.stratos.common.beans.kubernetes.KubernetesHost;
-import org.apache.stratos.common.beans.kubernetes.KubernetesMaster;
-import org.apache.stratos.common.beans.kubernetes.PortRange;
-import org.apache.stratos.common.beans.subscription.domain.SubscriptionDomainBean;
+import org.apache.stratos.common.beans.application.*;
+import org.apache.stratos.common.beans.application.signup.ApplicationSignUpBean;
+import org.apache.stratos.common.beans.artifact.repository.ArtifactRepositoryBean;
+import org.apache.stratos.common.beans.cartridge.*;
+import org.apache.stratos.common.beans.kubernetes.KubernetesClusterBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesHostBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesMasterBean;
+import org.apache.stratos.common.beans.kubernetes.PortRangeBean;
+import org.apache.stratos.common.beans.partition.ApplicationLevelNetworkPartitionBean;
+import org.apache.stratos.common.beans.partition.ChildLevelNetworkPartitionBean;
+import org.apache.stratos.common.beans.partition.ChildLevelPartitionBean;
+import org.apache.stratos.common.beans.partition.PartitionBean;
+import org.apache.stratos.common.beans.policy.autoscale.*;
+import org.apache.stratos.common.beans.policy.deployment.ApplicationPolicyBean;
+import org.apache.stratos.common.beans.policy.deployment.ChildPolicyBean;
+import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
 import org.apache.stratos.common.beans.topology.*;
 import org.apache.stratos.common.util.CommonUtil;
-import org.apache.stratos.common.beans.DependencyDefinitions;
 import org.apache.stratos.manager.service.stub.domain.application.signup.ApplicationSignUp;
 import org.apache.stratos.manager.service.stub.domain.application.signup.ArtifactRepository;
 import org.apache.stratos.messaging.domain.application.Application;
@@ -55,7 +54,6 @@ import org.apache.stratos.messaging.domain.application.Group;
 import org.apache.stratos.messaging.domain.instance.ApplicationInstance;
 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;
@@ -65,7 +63,7 @@ import java.util.*;
 public class ObjectConverter {
 
     public static CartridgeConfig convertCartridgeDefinitionBeanToStubCartridgeConfig(
-            CartridgeDefinitionBean cartridgeDefinitionBean) {
+            CartridgeBean cartridgeDefinitionBean) {
 
         CartridgeConfig cartridgeConfig = new CartridgeConfig();
 
@@ -166,7 +164,7 @@ public class ObjectConverter {
         return iaasConfigsArray;
     }
 
-    public static Persistence convertPersistenceBeanToStubPersistence(PersistenceBean persistenceBean) {
+    public static Persistence convertPersistenceBeanToStubPersistence(org.apache.stratos.common.beans.cartridge.PersistenceBean persistenceBean) {
         Persistence persistence = new Persistence();
         persistence.setPersistanceRequired(persistenceBean.isRequired());
         VolumeBean[] volumeBean = new VolumeBean[persistenceBean.getVolume().size()];
@@ -192,8 +190,8 @@ public class ObjectConverter {
 
     }
 
-    public static Properties convertPropertyBeansToProperties(List<PropertyBean> propertyBeans) {
-        PropertyBean[] propertyBeansArray = new PropertyBean[propertyBeans.size()];
+    public static Properties convertPropertyBeansToProperties(List<org.apache.stratos.common.beans.cartridge.PropertyBean> propertyBeans) {
+        org.apache.stratos.common.beans.cartridge.PropertyBean[] propertyBeansArray = new org.apache.stratos.common.beans.cartridge.PropertyBean[propertyBeans.size()];
         propertyBeans.toArray(propertyBeansArray);
         Property[] propertyArray = new Property[propertyBeansArray.length];
 
@@ -210,7 +208,7 @@ public class ObjectConverter {
     }
     
     public static org.apache.stratos.cloud.controller.stub.Properties convertPropertyBeansToCCStubProperties(
-            List<PropertyBean> propertyBeans) {
+            List<org.apache.stratos.common.beans.cartridge.PropertyBean> propertyBeans) {
         if (propertyBeans == null) {
             return null;
         }
@@ -218,7 +216,7 @@ public class ObjectConverter {
         List<org.apache.stratos.cloud.controller.stub.Property> stubPropertiesList =
                 new ArrayList<org.apache.stratos.cloud.controller.stub.Property>();
 
-        for (PropertyBean propertyBean : propertyBeans) {
+        for (org.apache.stratos.common.beans.cartridge.PropertyBean propertyBean : propertyBeans) {
             org.apache.stratos.cloud.controller.stub.Property stubProperty = new org.apache.stratos.cloud.controller.stub.Property();
             stubProperty.setName(propertyBean.getName());
             stubProperty.setValue(propertyBean.getValue());
@@ -235,13 +233,13 @@ public class ObjectConverter {
 
 
     public static org.apache.stratos.autoscaler.stub.Properties convertProperyBeansToStubProperties(
-            List<PropertyBean> propertyBeans) {
+            List<org.apache.stratos.common.beans.cartridge.PropertyBean> propertyBeans) {
         if (propertyBeans == null || propertyBeans.isEmpty()) {
             return null;
         }
 
         //convert to an array
-        PropertyBean[] propertyBeansArray = new PropertyBean[propertyBeans.size()];
+        org.apache.stratos.common.beans.cartridge.PropertyBean[] propertyBeansArray = new org.apache.stratos.common.beans.cartridge.PropertyBean[propertyBeans.size()];
         propertyBeans.toArray(propertyBeansArray);
         org.apache.stratos.autoscaler.stub.Property[] propertyArray = new org.apache.stratos.autoscaler.stub.Property[propertyBeansArray.length];
 
@@ -297,7 +295,7 @@ public class ObjectConverter {
     }
 
     public static org.apache.stratos.autoscaler.stub.deployment.partition.Partition convertStubPartitionToPartition
-            (Partition partition) {
+            (PartitionBean partition) {
 
         org.apache.stratos.autoscaler.stub.deployment.partition.Partition stubPartition = new
                 org.apache.stratos.autoscaler.stub.deployment.partition.Partition();
@@ -314,7 +312,7 @@ public class ObjectConverter {
         return stubPartition;
     }
 
-    public static org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy convertToCCAutoscalerPojo(AutoscalePolicy
+    public static org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy convertToCCAutoscalerPojo(AutoscalePolicyBean
                                                                                                                         autoscalePolicyBean) {
 
         org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy autoscalePolicy = new
@@ -358,7 +356,7 @@ public class ObjectConverter {
     }
 
     public static org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy convetToASDeploymentPolicyPojo(
-            DeploymentPolicy deploymentPolicyBean) {
+            DeploymentPolicyBean deploymentPolicyBean) {
 
         org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy =
                 new org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy();
@@ -382,14 +380,14 @@ public class ObjectConverter {
         return deploymentPolicy;
     }
 
-    public static DeploymentPolicy convertStubDeploymentPolicyToDeploymentPolicy(
+    public static DeploymentPolicyBean convertStubDeploymentPolicyToDeploymentPolicy(
             org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy stubDeploymentPolicy) {
 
         if(stubDeploymentPolicy == null) {
             return null;
         }
 
-        DeploymentPolicy deploymentPolicy = new DeploymentPolicy();
+        DeploymentPolicyBean deploymentPolicy = new DeploymentPolicyBean();
         deploymentPolicy.setApplicationId(stubDeploymentPolicy.getApplicationId());
         deploymentPolicy.setDescription(stubDeploymentPolicy.getDescription());
         deploymentPolicy.setPublic(stubDeploymentPolicy.getIsPublic());
@@ -397,8 +395,8 @@ public class ObjectConverter {
             org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[]
                     networkPartitions = stubDeploymentPolicy.getApplicationLevelNetworkPartitions();
             if(networkPartitions != null) {
-                deploymentPolicy.setApplicationPolicy(new ApplicationPolicy());
-                List<ApplicationLevelNetworkPartition> networkPartitionList = new ArrayList<ApplicationLevelNetworkPartition>();
+                deploymentPolicy.setApplicationPolicy(new ApplicationPolicyBean());
+                List<ApplicationLevelNetworkPartitionBean> networkPartitionList = new ArrayList<ApplicationLevelNetworkPartitionBean>();
                 for(org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition
                         networkPartition : networkPartitions) {
                     if(networkPartition != null) {
@@ -410,52 +408,52 @@ public class ObjectConverter {
         }
 
         if (stubDeploymentPolicy.getChildPolicies() != null) {
-            List<org.apache.stratos.common.beans.autoscaler.policy.deployment.ChildPolicy> childPolicyList =
-                    new ArrayList<org.apache.stratos.common.beans.autoscaler.policy.deployment.ChildPolicy>();
+            List<ChildPolicyBean> childPolicyBeanList =
+                    new ArrayList<ChildPolicyBean>();
             for(org.apache.stratos.autoscaler.stub.deployment.policy.ChildPolicy stubChildDeploymentPolicy :
                     stubDeploymentPolicy.getChildPolicies()) {
                 if(stubChildDeploymentPolicy != null) {
-                    childPolicyList.add(convertStubChildPolicyToChildPolicy(stubChildDeploymentPolicy));
+                    childPolicyBeanList.add(convertStubChildPolicyToChildPolicy(stubChildDeploymentPolicy));
                 }
             }
-            deploymentPolicy.setChildPolicies(childPolicyList);
+            deploymentPolicy.setChildPolicies(childPolicyBeanList);
         }
         return deploymentPolicy;
     }
 
-    private static org.apache.stratos.common.beans.autoscaler.policy.deployment.ChildPolicy
+    private static ChildPolicyBean
     convertStubChildPolicyToChildPolicy(ChildPolicy stubChildDeploymentPolicy) {
         if(stubChildDeploymentPolicy == null) {
             return null;
         }
-        org.apache.stratos.common.beans.autoscaler.policy.deployment.ChildPolicy childPolicy = new
-                org.apache.stratos.common.beans.autoscaler.policy.deployment.ChildPolicy();
-        childPolicy.setAlias(stubChildDeploymentPolicy.getAlias());
+        ChildPolicyBean childPolicyBean = new
+                ChildPolicyBean();
+        childPolicyBean.setAlias(stubChildDeploymentPolicy.getAlias());
         if(stubChildDeploymentPolicy.getChildLevelNetworkPartitions() != null) {
-            List<org.apache.stratos.common.beans.autoscaler.partition.ChildLevelNetworkPartition> networkPartitionList
-                    = new ArrayList<org.apache.stratos.common.beans.autoscaler.partition.ChildLevelNetworkPartition>();
+            List<ChildLevelNetworkPartitionBean> networkPartitionList
+                    = new ArrayList<ChildLevelNetworkPartitionBean>();
             for(org.apache.stratos.autoscaler.stub.deployment.partition.ChildLevelNetworkPartition
                     stubChildLevelNetworkPartition : stubChildDeploymentPolicy.getChildLevelNetworkPartitions()) {
                 networkPartitionList.add(convertStubChildLevelNetworkPartitionToChildLevelNetworkPartition(stubChildLevelNetworkPartition));
             }
-            childPolicy.setNetworkPartition(networkPartitionList);
+            childPolicyBean.setNetworkPartition(networkPartitionList);
         }
-        return childPolicy;
+        return childPolicyBean;
     }
 
-    private static org.apache.stratos.common.beans.autoscaler.partition.ChildLevelNetworkPartition
+    private static ChildLevelNetworkPartitionBean
     convertStubChildLevelNetworkPartitionToChildLevelNetworkPartition(
             ChildLevelNetworkPartition stubChildLevelNetworkPartition) {
         if(stubChildLevelNetworkPartition == null) {
             return null;
         }
-        org.apache.stratos.common.beans.autoscaler.partition.ChildLevelNetworkPartition childLevelNetworkPartition =
-                new org.apache.stratos.common.beans.autoscaler.partition.ChildLevelNetworkPartition();
+        ChildLevelNetworkPartitionBean childLevelNetworkPartition =
+                new ChildLevelNetworkPartitionBean();
         childLevelNetworkPartition.setId(stubChildLevelNetworkPartition.getId());
         childLevelNetworkPartition.setPartitionAlgo(stubChildLevelNetworkPartition.getPartitionAlgo());
         if(stubChildLevelNetworkPartition.getChildLevelPartitions() != null) {
-            List<org.apache.stratos.common.beans.autoscaler.partition.ChildLevelPartition> partitionList =
-                    new ArrayList<org.apache.stratos.common.beans.autoscaler.partition.ChildLevelPartition>();
+            List<ChildLevelPartitionBean> partitionList =
+                    new ArrayList<ChildLevelPartitionBean>();
             for(org.apache.stratos.autoscaler.stub.deployment.partition.ChildLevelPartition stubChildLevelPartition : stubChildLevelNetworkPartition.getChildLevelPartitions()) {
                 partitionList.add(convertStubChildLevelPartitionToChildLevelPartition(stubChildLevelPartition));
             }
@@ -464,29 +462,29 @@ public class ObjectConverter {
         return childLevelNetworkPartition;
     }
 
-    private static org.apache.stratos.common.beans.autoscaler.partition.ChildLevelPartition
+    private static ChildLevelPartitionBean
     convertStubChildLevelPartitionToChildLevelPartition(ChildLevelPartition stubChildLevelPartition) {
         if(stubChildLevelPartition == null) {
             return null;
         }
-        org.apache.stratos.common.beans.autoscaler.partition.ChildLevelPartition childLevelPartition =
-                new org.apache.stratos.common.beans.autoscaler.partition.ChildLevelPartition();
+        ChildLevelPartitionBean childLevelPartition =
+                new ChildLevelPartitionBean();
         childLevelPartition.setId(stubChildLevelPartition.getPartitionId());
         childLevelPartition.setMax(stubChildLevelPartition.getMax());
         return childLevelPartition;
     }
 
-    private static ApplicationLevelNetworkPartition convertStubNetworkPartitionToNetworkPartition(
+    private static ApplicationLevelNetworkPartitionBean convertStubNetworkPartitionToNetworkPartition(
             org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition stubNetworkPartition) {
         if(stubNetworkPartition == null) {
             return null;
         }
 
-        ApplicationLevelNetworkPartition networkPartition = new ApplicationLevelNetworkPartition();
+        ApplicationLevelNetworkPartitionBean networkPartition = new ApplicationLevelNetworkPartitionBean();
         networkPartition.setId(stubNetworkPartition.getId());
         networkPartition.setActiveByDefault(stubNetworkPartition.getActiveByDefault());
         if(stubNetworkPartition.getPartitions() != null) {
-            List<Partition> partitionList = new ArrayList<Partition>();
+            List<PartitionBean> partitionList = new ArrayList<PartitionBean>();
             for(org.apache.stratos.autoscaler.stub.deployment.partition.Partition stubPartition :
                     stubNetworkPartition.getPartitions()) {
                 if(stubPartition != null) {
@@ -498,18 +496,18 @@ public class ObjectConverter {
         return networkPartition;
     }
 
-    private static Partition convertStubPartitionToPartition(org.apache.stratos.autoscaler.stub.deployment.partition.Partition stubPartition) {
+    private static PartitionBean convertStubPartitionToPartition(org.apache.stratos.autoscaler.stub.deployment.partition.Partition stubPartition) {
         if(stubPartition == null) {
             return null;
         }
-        Partition partition = new Partition();
+        PartitionBean partition = new PartitionBean();
         partition.setId(stubPartition.getId());
         partition.setPublic(stubPartition.getIsPublic());
         partition.setDescription(stubPartition.getDescription());
         partition.setProvider(stubPartition.getProvider());
         partition.setKubernetesClusterId(stubPartition.getKubernetesClusterId());
         if(stubPartition.getProperties() != null) {
-            List<PropertyBean> propertyBeanList = new ArrayList<PropertyBean>();
+            List<org.apache.stratos.common.beans.cartridge.PropertyBean> propertyBeanList = new ArrayList<org.apache.stratos.common.beans.cartridge.PropertyBean>();
             for(org.apache.stratos.autoscaler.stub.Property stubProperty : stubPartition.getProperties().getProperties()) {
                 if(stubProperty != null) {
                     propertyBeanList.add(convertStubPropertyToPropertyBean(stubProperty));
@@ -520,12 +518,12 @@ public class ObjectConverter {
         return partition;
     }
 
-    private static PropertyBean convertStubPropertyToPropertyBean(org.apache.stratos.autoscaler.stub.Property stubProperty) {
+    private static org.apache.stratos.common.beans.cartridge.PropertyBean convertStubPropertyToPropertyBean(org.apache.stratos.autoscaler.stub.Property stubProperty) {
         if ((stubProperty == null) || (!(stubProperty.getValue() instanceof String))) {
             return null;
         }
 
-        PropertyBean propertyBean = new PropertyBean();
+        org.apache.stratos.common.beans.cartridge.PropertyBean propertyBean = new org.apache.stratos.common.beans.cartridge.PropertyBean();
         propertyBean.setName(stubProperty.getName());
         propertyBean.setValue(String.valueOf(stubProperty.getValue()));
         return propertyBean;
@@ -533,7 +531,7 @@ public class ObjectConverter {
 
     private static org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[]
         convertApplicationLevelNetworkPartitionToStubApplicationLevelNetworkPartition(
-            List<ApplicationLevelNetworkPartition> networkPartitionBeans) {
+            List<ApplicationLevelNetworkPartitionBean> networkPartitionBeans) {
 
         org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[]
                 appNWPartitions = new
@@ -544,7 +542,7 @@ public class ObjectConverter {
             org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition appNWPartition = new
                     org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition();
 
-            ApplicationLevelNetworkPartition networkPartition = networkPartitionBeans.get(i);
+            ApplicationLevelNetworkPartitionBean networkPartition = networkPartitionBeans.get(i);
 
             appNWPartition.setId(networkPartition.getId());
             appNWPartition.setKubernetesClusterId(networkPartition.getKubernetesClusterId());
@@ -559,7 +557,7 @@ public class ObjectConverter {
         return appNWPartitions;
     }
 
-    private static ChildPolicy[] convertChildPoliciesToStubChildPolicies(List<org.apache.stratos.common.beans.autoscaler.policy.deployment.ChildPolicy> childPolicies) {
+    private static ChildPolicy[] convertChildPoliciesToStubChildPolicies(List<ChildPolicyBean> childPolicies) {
         ChildPolicy[] stubChildPolicyArray = new ChildPolicy[childPolicies.size()];
         for (int i = 0; i < childPolicies.size(); i++) {
             ChildPolicy childPolicy = new ChildPolicy();
@@ -570,7 +568,7 @@ public class ObjectConverter {
         return stubChildPolicyArray;
     }
 
-    private static ChildLevelNetworkPartition[] convertToCCChildNetworkPartition(List<org.apache.stratos.common.beans.autoscaler.partition.ChildLevelNetworkPartition> networkPartitions) {
+    private static ChildLevelNetworkPartition[] convertToCCChildNetworkPartition(List<ChildLevelNetworkPartitionBean> networkPartitions) {
 
         ChildLevelNetworkPartition[] childLevelNetworkPartitions = new ChildLevelNetworkPartition[networkPartitions.size()];
 
@@ -586,24 +584,24 @@ public class ObjectConverter {
         return childLevelNetworkPartitions;
     }
 
-    public static org.apache.stratos.common.beans.topology.Cluster convertClusterToClusterBean(Cluster cluster, String alias) {
-        org.apache.stratos.common.beans.topology.Cluster clusterBean = new
-                org.apache.stratos.common.beans.topology.Cluster();
+    public static ClusterBean convertClusterToClusterBean(Cluster cluster, String alias) {
+        ClusterBean clusterBean = new
+                ClusterBean();
         clusterBean.setAlias(alias);
         clusterBean.setServiceName(cluster.getServiceName());
         clusterBean.setClusterId(cluster.getClusterId());
         clusterBean.setLbCluster(cluster.isLbCluster());
         clusterBean.setTenantRange(cluster.getTenantRange());
         clusterBean.setProperty(convertJavaUtilPropertiesToPropertyBeans(cluster.getProperties()));
-        clusterBean.setMember(new ArrayList<Member>());
+        clusterBean.setMember(new ArrayList<MemberBean>());
         clusterBean.setHostNames(new ArrayList<String>());
         Collection<ClusterInstance> clusterInstances = cluster.getClusterInstances();
-        List<org.apache.stratos.common.beans.topology.Instance> instancesList =
-        		new ArrayList<org.apache.stratos.common.beans.topology.Instance>();
+        List<InstanceBean> instancesList =
+        		new ArrayList<InstanceBean>();
 		if (clusterInstances != null) {
 			for (ClusterInstance clusterInstance : clusterInstances) {
-				org.apache.stratos.common.beans.topology.Instance instance =
-						new org.apache.stratos.common.beans.topology.Instance();
+				InstanceBean instance =
+						new InstanceBean();
 				instance.setInstanceId(clusterInstance.getInstanceId());
 				instance.setStatus(clusterInstance.getStatus().toString());
 				instancesList.add(instance);
@@ -612,7 +610,7 @@ public class ObjectConverter {
 		}
 
         for (org.apache.stratos.messaging.domain.topology.Member member : cluster.getMembers()) {
-            Member memberBean = new Member();
+            MemberBean memberBean = new MemberBean();
             memberBean.setServiceName(member.getServiceName());
             memberBean.setClusterId(member.getClusterId());
             memberBean.setMemberId(member.getMemberId());
@@ -657,12 +655,12 @@ public class ObjectConverter {
                     getStatus().toString());
         }
         clusterInstanceBean.setTenantRange(cluster.getTenantRange());
-        clusterInstanceBean.setMember(new ArrayList<Member>());
+        clusterInstanceBean.setMember(new ArrayList<MemberBean>());
         clusterInstanceBean.setHostNames(new ArrayList<String>());
 
         for (org.apache.stratos.messaging.domain.topology.Member member : cluster.getMembers()) {
             if (member.getClusterInstanceId().equals(instanceId)) {
-                Member memberBean = new Member();
+                MemberBean memberBean = new MemberBean();
                 memberBean.setClusterId(member.getClusterId());
                 memberBean.setLbClusterId(member.getLbClusterId());
                 memberBean.setNetworkPartitionId(member.getNetworkPartitionId());
@@ -695,7 +693,7 @@ public class ObjectConverter {
     }
 
     private static org.apache.stratos.autoscaler.stub.deployment.partition.Partition[] convertToCCPartitionPojos
-            (List<Partition> partitionList) {
+            (List<PartitionBean> partitionList) {
 
         org.apache.stratos.autoscaler.stub.deployment.partition.Partition[] partitions =
                 new org.apache.stratos.autoscaler.stub.deployment.partition.Partition[partitionList.size()];
@@ -707,7 +705,7 @@ public class ObjectConverter {
     }
 
     private static ChildLevelPartition[] convertToCCChildPartitionPojos
-            (List<org.apache.stratos.common.beans.autoscaler.partition.ChildLevelPartition> partitionList) {
+            (List<ChildLevelPartitionBean> partitionList) {
 
         ChildLevelPartition[] childLevelPartitions = new ChildLevelPartition[partitionList.size()];
         for (int i = 0; i < partitionList.size(); i++) {
@@ -721,26 +719,26 @@ public class ObjectConverter {
         return childLevelPartitions;
     }
 
-    public static Partition[] populatePartitionPojos(org.apache.stratos.cloud.controller.stub.domain.Partition[]
+    public static PartitionBean[] populatePartitionPojos(org.apache.stratos.cloud.controller.stub.domain.Partition[]
                                                              partitions) {
 
-        Partition[] partitionBeans;
+        PartitionBean[] partitionBeans;
         if (partitions == null) {
-            partitionBeans = new Partition[0];
+            partitionBeans = new PartitionBean[0];
             return partitionBeans;
         }
 
-        partitionBeans = new Partition[partitions.length];
+        partitionBeans = new PartitionBean[partitions.length];
         for (int i = 0; i < partitions.length; i++) {
             partitionBeans[i] = populatePartitionPojo(partitions[i]);
         }
         return partitionBeans;
     }
 
-    public static Partition populatePartitionPojo(org.apache.stratos.cloud.controller.stub.domain.Partition
+    public static PartitionBean populatePartitionPojo(org.apache.stratos.cloud.controller.stub.domain.Partition
                                                           partition) {
 
-        Partition partitionBeans = new Partition();
+        PartitionBean partitionBeans = new PartitionBean();
         if (partition == null) {
             return partitionBeans;
         }
@@ -753,52 +751,24 @@ public class ObjectConverter {
         partitionBeans.partitionMax = partition.getPartitionMax();*/
         //properties 
         if (partition.getProperties() != null) {
-            List<PropertyBean> propertyBeans = convertCCStubPropertiesToPropertyBeans(partition.getProperties());
+            List<org.apache.stratos.common.beans.cartridge.PropertyBean> propertyBeans = convertCCStubPropertiesToPropertyBeans(partition.getProperties());
             partitionBeans.setProperty(propertyBeans);
         }
 
         return partitionBeans;
     }
 
-    public static List<SubscriptionDomainBean> populateSubscriptionDomainPojos(List<SubscriptionDomain> subscriptionDomains) {
+    private static List<org.apache.stratos.common.beans.cartridge.PropertyBean> convertJavaUtilPropertiesToPropertyBeans(java.util.Properties properties) {
 
-        List<SubscriptionDomainBean> subscriptionDomainBeans = new ArrayList<SubscriptionDomainBean>();
-
-        if (subscriptionDomains == null) {
-            return subscriptionDomainBeans;
-        }
-
-        for (SubscriptionDomain subscriptionDomain : subscriptionDomains) {
-            subscriptionDomainBeans.add(populateSubscriptionDomainPojo(subscriptionDomain));
-        }
-
-        return subscriptionDomainBeans;
-    }
-
-    public static SubscriptionDomainBean populateSubscriptionDomainPojo(SubscriptionDomain subscriptionDomain) {
-
-        SubscriptionDomainBean subscriptionDomainBean = new SubscriptionDomainBean();
-
-        if (subscriptionDomain == null) {
-            return subscriptionDomainBean;
-        }
-        subscriptionDomainBean.setDomainName(subscriptionDomain.getDomainName());
-        subscriptionDomainBean.setApplicationContext(subscriptionDomain.getApplicationContext());
-
-        return subscriptionDomainBean;
-    }
-
-    private static List<PropertyBean> convertJavaUtilPropertiesToPropertyBeans(java.util.Properties properties) {
-
-        List<PropertyBean> propertyBeans = null;
+        List<org.apache.stratos.common.beans.cartridge.PropertyBean> propertyBeans = null;
         if (properties != null && !properties.isEmpty()) {
             Enumeration<?> e = properties.propertyNames();
-            propertyBeans = new ArrayList<PropertyBean>();
+            propertyBeans = new ArrayList<org.apache.stratos.common.beans.cartridge.PropertyBean>();
 
             while (e.hasMoreElements()) {
                 String key = (String) e.nextElement();
                 String value = properties.getProperty(key);
-                PropertyBean propertyBean = new PropertyBean();
+                org.apache.stratos.common.beans.cartridge.PropertyBean propertyBean = new org.apache.stratos.common.beans.cartridge.PropertyBean();
                 propertyBean.setName(key);
                 propertyBean.setValue(value);
                 propertyBeans.add(propertyBean);
@@ -807,29 +777,29 @@ public class ObjectConverter {
         return propertyBeans;
     }
 
-    public static AutoscalePolicy[] convertStubAutoscalePoliciesToAutoscalePolicies(
+    public static AutoscalePolicyBean[] convertStubAutoscalePoliciesToAutoscalePolicies(
             org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy[] autoscalePolicies) {
 
-        AutoscalePolicy[] autoscalePolicyBeans;
+        AutoscalePolicyBean[] autoscalePolicyBeans;
         if (autoscalePolicies == null) {
-            autoscalePolicyBeans = new AutoscalePolicy[0];
+            autoscalePolicyBeans = new AutoscalePolicyBean[0];
             return autoscalePolicyBeans;
         }
 
-        autoscalePolicyBeans = new AutoscalePolicy[autoscalePolicies.length];
+        autoscalePolicyBeans = new AutoscalePolicyBean[autoscalePolicies.length];
         for (int i = 0; i < autoscalePolicies.length; i++) {
             autoscalePolicyBeans[i] = convertStubAutoscalePolicyToAutoscalePolicy(autoscalePolicies[i]);
         }
         return autoscalePolicyBeans;
     }
 
-    public static AutoscalePolicy convertStubAutoscalePolicyToAutoscalePolicy(org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy
+    public static AutoscalePolicyBean convertStubAutoscalePolicyToAutoscalePolicy(org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy
                                                                                       autoscalePolicy) {
         if (autoscalePolicy == null) {
             return null;
         }
 
-        AutoscalePolicy autoscalePolicyBean = new AutoscalePolicy();
+        AutoscalePolicyBean autoscalePolicyBean = new AutoscalePolicyBean();
         autoscalePolicyBean.setId(autoscalePolicy.getId());
         autoscalePolicyBean.setDescription(autoscalePolicy.getDescription());
         autoscalePolicyBean.setIsPublic(autoscalePolicy.getIsPublic());
@@ -843,22 +813,22 @@ public class ObjectConverter {
         return autoscalePolicyBean;
     }
 
-    private static LoadThresholds convertStubLoadThreasholdsToLoadThresholds(org.apache.stratos.autoscaler.stub.autoscale.policy.LoadThresholds
+    private static LoadThresholdsBean convertStubLoadThreasholdsToLoadThresholds(org.apache.stratos.autoscaler.stub.autoscale.policy.LoadThresholds
                                                                                      loadThresholds) {
 
-        LoadThresholds loadThresholdBean = new LoadThresholds();
+        LoadThresholdsBean loadThresholdBean = new LoadThresholdsBean();
         if (loadThresholds.getLoadAverageThreshold() != 0) {
-            LoadAverageThresholds loadAverage = new LoadAverageThresholds();
+            LoadAverageThresholdsBean loadAverage = new LoadAverageThresholdsBean();
             loadAverage.setThreshold(loadThresholds.getLoadAverageThreshold());
             loadThresholdBean.setLoadAverage(loadAverage);
         }
         if (loadThresholds.getMemoryConsumptionThreshold() != 0) {
-            MemoryConsumptionThresholds memoryConsumption = new MemoryConsumptionThresholds();
+            MemoryConsumptionThresholdsBean memoryConsumption = new MemoryConsumptionThresholdsBean();
             memoryConsumption.setThreshold(loadThresholds.getMemoryConsumptionThreshold());
             loadThresholdBean.setMemoryConsumption(memoryConsumption);
         }
         if (loadThresholds.getRequestsInFlightThreshold() != 0) {
-            RequestsInFlightThresholds requestsInFlight = new RequestsInFlightThresholds();
+            RequestsInFlightThresholdsBean requestsInFlight = new RequestsInFlightThresholdsBean();
             requestsInFlight.setThreshold(loadThresholds.getRequestsInFlightThreshold());
             loadThresholdBean.setRequestsInFlight(requestsInFlight);
         }
@@ -866,10 +836,10 @@ public class ObjectConverter {
         return loadThresholdBean;
     }
 
-    public static ApplicationLevelNetworkPartition convertStubApplicationLevelNetworkPartitionToApplicationLevelNetworkPartition(
+    public static ApplicationLevelNetworkPartitionBean convertStubApplicationLevelNetworkPartitionToApplicationLevelNetworkPartition(
             org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition stubApplicationLevelNetworkPartition) {
 
-        ApplicationLevelNetworkPartition networkPartitionBean = new ApplicationLevelNetworkPartition();
+        ApplicationLevelNetworkPartitionBean networkPartitionBean = new ApplicationLevelNetworkPartitionBean();
         if (stubApplicationLevelNetworkPartition == null) {
             return networkPartitionBean;
         }
@@ -887,16 +857,16 @@ public class ObjectConverter {
         return networkPartitionBean;
     }
 
-    public static ApplicationLevelNetworkPartition[] convertStubApplicationLevelNetworkPartitionsToApplicationLevelNetworkPartitions(
+    public static ApplicationLevelNetworkPartitionBean[] convertStubApplicationLevelNetworkPartitionsToApplicationLevelNetworkPartitions(
             org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[] partitionGroups) {
 
-        ApplicationLevelNetworkPartition[] networkPartitionGroupsBeans;
+        ApplicationLevelNetworkPartitionBean[] networkPartitionGroupsBeans;
         if (partitionGroups == null) {
-            networkPartitionGroupsBeans = new ApplicationLevelNetworkPartition[0];
+            networkPartitionGroupsBeans = new ApplicationLevelNetworkPartitionBean[0];
             return networkPartitionGroupsBeans;
         }
 
-        networkPartitionGroupsBeans = new ApplicationLevelNetworkPartition[partitionGroups.length];
+        networkPartitionGroupsBeans = new ApplicationLevelNetworkPartitionBean[partitionGroups.length];
 
         for (int i = 0; i < partitionGroups.length; i++) {
             networkPartitionGroupsBeans[i] = convertStubApplicationLevelNetworkPartitionToApplicationLevelNetworkPartition(partitionGroups[i]);
@@ -929,7 +899,7 @@ public class ObjectConverter {
 //    }
 
     public static org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster
-        convertToCCKubernetesClusterPojo(KubernetesCluster kubernetesClusterBean) {
+        convertToCCKubernetesClusterPojo(KubernetesClusterBean kubernetesClusterBean) {
 
         org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster kubernetesCluster = new
                 org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster();
@@ -945,7 +915,7 @@ public class ObjectConverter {
     }
 
     private static org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[]
-        convertToASKubernetesHostsPojo(List<KubernetesHost> kubernetesHosts) {
+        convertToASKubernetesHostsPojo(List<KubernetesHostBean> kubernetesHosts) {
 
         if (kubernetesHosts == null || kubernetesHosts.isEmpty()) {
             return null;
@@ -954,7 +924,7 @@ public class ObjectConverter {
         org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[]
                 kubernetesHostsArr = new org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[kubernetesHostCount];
         for (int i = 0; i < kubernetesHostCount; i++) {
-            KubernetesHost kubernetesHostBean = kubernetesHosts.get(i);
+            KubernetesHostBean kubernetesHostBean = kubernetesHosts.get(i);
             kubernetesHostsArr[i] = convertKubernetesHostToStubKubernetesHost(kubernetesHostBean);
         }
         return kubernetesHostsArr;
@@ -962,7 +932,7 @@ public class ObjectConverter {
 
 
     private static org.apache.stratos.cloud.controller.stub.domain.kubernetes.PortRange
-        convertPortRangeToStubPortRange(PortRange portRangeBean) {
+        convertPortRangeToStubPortRange(PortRangeBean portRangeBean) {
 
         if (portRangeBean == null) {
             return null;
@@ -975,7 +945,7 @@ public class ObjectConverter {
     }
 
     public static org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost
-        convertKubernetesHostToStubKubernetesHost(KubernetesHost kubernetesHostBean) {
+        convertKubernetesHostToStubKubernetesHost(KubernetesHostBean kubernetesHostBean) {
 
         if (kubernetesHostBean == null) {
             return null;
@@ -992,7 +962,7 @@ public class ObjectConverter {
     }
 
     public static org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster
-        convertStubKubernetesMasterToKubernetesMaster(KubernetesMaster kubernetesMasterBean) {
+        convertStubKubernetesMasterToKubernetesMaster(KubernetesMasterBean kubernetesMasterBean) {
 
         if (kubernetesMasterBean == null) {
             return null;
@@ -1009,23 +979,23 @@ public class ObjectConverter {
         return kubernetesMaster;
     }
 
-    public static KubernetesCluster[] convertStubKubernetesClustersToKubernetesClusters(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster[] kubernetesClusters) {
+    public static KubernetesClusterBean[] convertStubKubernetesClustersToKubernetesClusters(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster[] kubernetesClusters) {
 
         if (kubernetesClusters == null) {
             return null;
         }
-        KubernetesCluster[] kubernetesClustersBean = new KubernetesCluster[kubernetesClusters.length];
+        KubernetesClusterBean[] kubernetesClustersBean = new KubernetesClusterBean[kubernetesClusters.length];
         for (int i = 0; i < kubernetesClusters.length; i++) {
             kubernetesClustersBean[i] = convertStubKubernetesClusterToKubernetesCluster(kubernetesClusters[i]);
         }
         return kubernetesClustersBean;
     }
 
-    public static KubernetesCluster convertStubKubernetesClusterToKubernetesCluster(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster kubernetesCluster) {
+    public static KubernetesClusterBean convertStubKubernetesClusterToKubernetesCluster(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster kubernetesCluster) {
         if (kubernetesCluster == null) {
             return null;
         }
-        KubernetesCluster kubernetesClusterBean = new KubernetesCluster();
+        KubernetesClusterBean kubernetesClusterBean = new KubernetesClusterBean();
         kubernetesClusterBean.setClusterId(kubernetesCluster.getClusterId());
         kubernetesClusterBean.setDescription(kubernetesCluster.getDescription());
         kubernetesClusterBean.setPortRange(convertStubPortRangeToPortRange(kubernetesCluster.getPortRange()));
@@ -1035,11 +1005,11 @@ public class ObjectConverter {
         return kubernetesClusterBean;
     }
 
-    public static KubernetesMaster convertStubKubernetesMasterToKubernetesMaster(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster kubernetesMaster) {
+    public static KubernetesMasterBean convertStubKubernetesMasterToKubernetesMaster(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster kubernetesMaster) {
         if (kubernetesMaster == null) {
             return null;
         }
-        KubernetesMaster kubernetesMasterBean = new KubernetesMaster();
+        KubernetesMasterBean kubernetesMasterBean = new KubernetesMasterBean();
         kubernetesMasterBean.setHostId(kubernetesMaster.getHostId());
         kubernetesMasterBean.setHostname(kubernetesMaster.getHostname());
         kubernetesMasterBean.setHostIpAddress(kubernetesMaster.getHostIpAddress());
@@ -1048,23 +1018,23 @@ public class ObjectConverter {
         return kubernetesMasterBean;
     }
 
-    public static List<KubernetesHost> convertStubKubernetesHostsToKubernetesHosts(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[] kubernetesHosts) {
+    public static List<KubernetesHostBean> convertStubKubernetesHostsToKubernetesHosts(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[] kubernetesHosts) {
         if (kubernetesHosts == null) {
             return null;
         }
-        List<KubernetesHost> kubernetesHostList = new ArrayList<KubernetesHost>();
+        List<KubernetesHostBean> kubernetesHostList = new ArrayList<KubernetesHostBean>();
         for (int i = 0; i < kubernetesHosts.length; i++) {
             kubernetesHostList.add(convertStubKubernetesHostToKubernetesHost(kubernetesHosts[i]));
         }
         return kubernetesHostList;
     }
 
-    private static KubernetesHost convertStubKubernetesHostToKubernetesHost(
+    private static KubernetesHostBean convertStubKubernetesHostToKubernetesHost(
             org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost kubernetesHost) {
         if (kubernetesHost == null) {
             return null;
         }
-        KubernetesHost kubernetesHostBean = new KubernetesHost();
+        KubernetesHostBean kubernetesHostBean = new KubernetesHostBean();
         kubernetesHostBean.setHostId(kubernetesHost.getHostId());
         kubernetesHostBean.setHostname(kubernetesHost.getHostname());
         kubernetesHostBean.setHostIpAddress(kubernetesHost.getHostIpAddress());
@@ -1072,49 +1042,49 @@ public class ObjectConverter {
         return kubernetesHostBean;
     }
     
-    private static List<PropertyBean> convertCCStubPropertiesToPropertyBeans(org.apache.stratos.cloud.controller.stub.Properties properties) {
+    private static List<org.apache.stratos.common.beans.cartridge.PropertyBean> convertCCStubPropertiesToPropertyBeans(org.apache.stratos.cloud.controller.stub.Properties properties) {
         if (properties == null || properties.getProperties() == null) {
             return null;
         }
-        List<PropertyBean> propertyBeanList = new ArrayList<PropertyBean>();
+        List<org.apache.stratos.common.beans.cartridge.PropertyBean> propertyBeanList = new ArrayList<org.apache.stratos.common.beans.cartridge.PropertyBean>();
         for (int i = 0; i < properties.getProperties().length; i++) {
             propertyBeanList.add(convertStubPropertyToPropertyBean(properties.getProperties()[i]));
         }
         return propertyBeanList;
     }
 
-    private static PropertyBean convertAsStubPropertyToPropertyBean(org.apache.stratos.autoscaler.stub.Property propertyE) {
+    private static org.apache.stratos.common.beans.cartridge.PropertyBean convertAsStubPropertyToPropertyBean(org.apache.stratos.autoscaler.stub.Property propertyE) {
         if ((propertyE == null) || (!(propertyE.getValue() instanceof String))) {
             return null;
         }
 
-        PropertyBean propertyBean = new PropertyBean();
+        org.apache.stratos.common.beans.cartridge.PropertyBean propertyBean = new org.apache.stratos.common.beans.cartridge.PropertyBean();
         propertyBean.setName(propertyE.getName());
         propertyBean.setValue(String.valueOf(propertyE.getValue()));
         return propertyBean;
     }
     
-    private static PropertyBean convertStubPropertyToPropertyBean(org.apache.stratos.cloud.controller.stub.Property propertyE) {
+    private static org.apache.stratos.common.beans.cartridge.PropertyBean convertStubPropertyToPropertyBean(org.apache.stratos.cloud.controller.stub.Property propertyE) {
         if (propertyE == null) {
             return null;
         }
-        PropertyBean propertyBean = new PropertyBean();
+        org.apache.stratos.common.beans.cartridge.PropertyBean propertyBean = new org.apache.stratos.common.beans.cartridge.PropertyBean();
         propertyBean.setName(propertyE.getName());
         propertyBean.setValue(propertyE.getValue());
         return propertyBean;
     }
 
-    private static PortRange convertStubPortRangeToPortRange(org.apache.stratos.cloud.controller.stub.domain.kubernetes.PortRange portRange) {
+    private static PortRangeBean convertStubPortRangeToPortRange(org.apache.stratos.cloud.controller.stub.domain.kubernetes.PortRange portRange) {
         if (portRange == null) {
             return null;
         }
-        PortRange portRangeBean = new PortRange();
+        PortRangeBean portRangeBean = new PortRangeBean();
         portRangeBean.setUpper(portRange.getUpper());
         portRangeBean.setLower(portRange.getLower());
         return portRangeBean;
     }
 
-    public static ApplicationContext convertApplicationDefinitionToStubApplicationContext(ApplicationDefinition applicationDefinition) {
+    public static ApplicationContext convertApplicationDefinitionToStubApplicationContext(ApplicationBean applicationDefinition) {
 
         org.apache.stratos.autoscaler.stub.pojo.ApplicationContext applicationContext =
                 new org.apache.stratos.autoscaler.stub.pojo.ApplicationContext();
@@ -1150,13 +1120,13 @@ public class ObjectConverter {
         return applicationContext;
     }
 
-    public static ApplicationDefinition convertStubApplicationContextToApplicationDefinition(
+    public static ApplicationBean convertStubApplicationContextToApplicationDefinition(
             ApplicationContext applicationContext) {
         if(applicationContext == null) {
             return null;
         }
 
-        ApplicationDefinition applicationDefinition = new ApplicationDefinition();
+        ApplicationBean applicationDefinition = new ApplicationBean();
         applicationDefinition.setApplicationId(applicationContext.getApplicationId());
         applicationDefinition.setAlias(applicationContext.getAlias());
         applicationDefinition.setMultiTenant(applicationContext.getMultiTenant());
@@ -1166,7 +1136,7 @@ public class ObjectConverter {
 
         // convert and set components
         if (applicationContext.getComponents() != null) {
-            applicationDefinition.setComponents(new ComponentDefinition());
+            applicationDefinition.setComponents(new ComponentBean());
             // top level Groups
             if (applicationContext.getComponents().getGroupContexts() != null) {
                 applicationDefinition.getComponents().setGroups(
@@ -1186,12 +1156,12 @@ public class ObjectConverter {
         return applicationDefinition;
     }
 
-    private static List<GroupDefinition> convertStubGroupContextsToGroupDefinitions(GroupContext[] groupContexts) {
-        List<GroupDefinition> groupDefinitions = new ArrayList<GroupDefinition>();
+    private static List<GroupReferenceBean> convertStubGroupContextsToGroupDefinitions(GroupContext[] groupContexts) {
+        List<GroupReferenceBean> groupDefinitions = new ArrayList<GroupReferenceBean>();
         if(groupContexts != null) {
             for (GroupContext groupContext : groupContexts) {
                 if(groupContext != null) {
-                    GroupDefinition groupDefinition = new GroupDefinition();
+                    GroupReferenceBean groupDefinition = new GroupReferenceBean();
                     groupDefinition.setAlias(groupContext.getAlias());
                     groupDefinition.setGroupMaxInstances(groupContext.getGroupMaxInstances());
                     groupDefinition.setGroupMinInstances(groupContext.getGroupMinInstances());
@@ -1207,8 +1177,8 @@ public class ObjectConverter {
         return groupDefinitions;
     }
 
-    private static DependencyDefinitions convertStubDependencyContextsToDependencyDefinitions(DependencyContext dependencyContext) {
-        DependencyDefinitions dependencyDefinitions = new DependencyDefinitions();
+    private static DependencyBean convertStubDependencyContextsToDependencyDefinitions(DependencyContext dependencyContext) {
+        DependencyBean dependencyDefinitions = new DependencyBean();
         dependencyDefinitions.setTerminationBehaviour(dependencyContext.getTerminationBehaviour());
 
             if(dependencyContext.getStartupOrdersContexts() != null) {
@@ -1228,12 +1198,12 @@ public class ObjectConverter {
         return dependencyDefinitions;
     }
 
-    private static List<CartridgeDefinition> convertStubCartridgeContextsToCartridgeDefinitions(CartridgeContext[] cartridgeContexts) {
-        List<CartridgeDefinition> cartridgeDefinitions = new ArrayList<CartridgeDefinition>();
+    private static List<CartridgeReferenceBean> convertStubCartridgeContextsToCartridgeDefinitions(CartridgeContext[] cartridgeContexts) {
+        List<CartridgeReferenceBean> cartridgeDefinitions = new ArrayList<CartridgeReferenceBean>();
         if(cartridgeContexts != null) {
             for (CartridgeContext cartridgeContext : cartridgeContexts) {
                 if(cartridgeContext != null) {
-                    CartridgeDefinition cartridgeDefinition = new CartridgeDefinition();
+                    CartridgeReferenceBean cartridgeDefinition = new CartridgeReferenceBean();
                     cartridgeDefinition.setType(cartridgeContext.getType());
                     cartridgeDefinition.setCartridgeMin(cartridgeContext.getCartridgeMin());
                     cartridgeDefinition.setCartridgeMax(cartridgeContext.getCartridgeMax());
@@ -1293,11 +1263,11 @@ public class ObjectConverter {
     }
 
     private static CartridgeContext[] convertCartridgeDefinitionsToStubCartridgeContexts(
-            List<CartridgeDefinition> cartridges) {
+            List<CartridgeReferenceBean> cartridges) {
 
     	CartridgeContext[] cartridgeContextArray = new CartridgeContext[cartridges.size()];
     	int i = 0;
-    	for (CartridgeDefinition cartridgeDefinition : cartridges) {
+    	for (CartridgeReferenceBean cartridgeDefinition : cartridges) {
     		CartridgeContext context = new CartridgeContext();
     		context.setCartridgeMax(cartridgeDefinition.getCartridgeMax());
     		context.setCartridgeMin(cartridgeDefinition.getCartridgeMin());
@@ -1351,7 +1321,7 @@ public class ObjectConverter {
     }
 
 	
-    private static DependencyContext convertDependencyDefinitionsToDependencyContexts(DependencyDefinitions dependencyDefinitions) {
+    private static DependencyContext convertDependencyDefinitionsToDependencyContexts(DependencyBean dependencyDefinitions) {
         DependencyContext dependencyContext = new DependencyContext();
         dependencyContext.setTerminationBehaviour(dependencyDefinitions.getTerminationBehaviour());
 
@@ -1371,11 +1341,11 @@ public class ObjectConverter {
     }
 
     private static org.apache.stratos.autoscaler.stub.pojo.GroupContext[]
-        convertGroupDefinitionsToStubGroupContexts(List<GroupDefinition> groupDefinitions) {
+        convertGroupDefinitionsToStubGroupContexts(List<GroupReferenceBean> groupDefinitions) {
 
         GroupContext[] groupContexts = new GroupContext[groupDefinitions.size()];
         int i = 0;
-        for (GroupDefinition groupDefinition : groupDefinitions) {
+        for (GroupReferenceBean groupDefinition : groupDefinitions) {
             GroupContext groupContext = new GroupContext();
             groupContext.setName(groupDefinition.getName());
             groupContext.setAlias(groupDefinition.getAlias());
@@ -1485,12 +1455,12 @@ public class ObjectConverter {
         return groupInstanceBeans;
     }
 
-    private static List<Instance> convertGroupInstancesToInstances(Group group) {
-	    List<Instance> instanceList = new ArrayList<Instance>();
+    private static List<InstanceBean> convertGroupInstancesToInstances(Group group) {
+	    List<InstanceBean> instanceList = new ArrayList<InstanceBean>();
 	    Collection<GroupInstance> instancesInTopology = group.getInstanceIdToInstanceContextMap().values();
 	    if(instancesInTopology != null) {
 	    	for (GroupInstance groupInstance : instancesInTopology) {
-	            Instance instance = new Instance();
+	            InstanceBean instance = new InstanceBean();
 	            instance.setStatus(groupInstance.getStatus().toString());
 	            instance.setInstanceId(groupInstance.getInstanceId());
 	            instanceList.add(instance);
@@ -1544,18 +1514,18 @@ public class ObjectConverter {
         return carbonTenantInfoBean;
     }
 
-    public static ServiceGroup convertServiceGroupDefinitionToASStubServiceGroup(ServiceGroupDefinition serviceGroupDefinition) throws ServiceGroupDefinitionException {
+    public static ServiceGroup convertServiceGroupDefinitionToASStubServiceGroup(GroupBean serviceGroupDefinition) throws ServiceGroupDefinitionException {
         ServiceGroup servicegroup = new ServiceGroup();
 
         // implement conversion (mostly List -> Array)
         servicegroup.setGroupscalingEnabled(serviceGroupDefinition.isGroupScalingEnabled());
-        List<ServiceGroupDefinition> groupsDef = serviceGroupDefinition.getGroups();
+        List<GroupBean> groupsDef = serviceGroupDefinition.getGroups();
         List<String> cartridgesDef = serviceGroupDefinition.getCartridges();
 
         servicegroup.setName(serviceGroupDefinition.getName());
 
         if (groupsDef == null) {
-            groupsDef = new ArrayList<ServiceGroupDefinition>(0);
+            groupsDef = new ArrayList<GroupBean>(0);
         }
 
         if (cartridgesDef == null) {
@@ -1566,7 +1536,7 @@ public class ObjectConverter {
         String[] cartridges = new String[cartridgesDef.size()];
 
         int i = 0;
-        for (ServiceGroupDefinition groupDefinition : groupsDef) {
+        for (GroupBean groupDefinition : groupsDef) {
             subGroups[i] = convertServiceGroupDefinitionToASStubServiceGroup(groupDefinition);
             ++i;
         }
@@ -1575,7 +1545,7 @@ public class ObjectConverter {
         cartridges = cartridgesDef.toArray(cartridges);
         servicegroup.setCartridges(cartridges);
 
-        DependencyDefinitions depDefs = serviceGroupDefinition.getDependencies();
+        DependencyBean depDefs = serviceGroupDefinition.getDependencies();
 
         if (depDefs != null) {
             Dependencies dependencies = new Dependencies();
@@ -1598,18 +1568,18 @@ public class ObjectConverter {
         return servicegroup;
     }
 
-    public static ServiceGroupDefinition convertStubServiceGroupToServiceGroupDefinition(ServiceGroup serviceGroup) {
+    public static GroupBean convertStubServiceGroupToServiceGroupDefinition(ServiceGroup serviceGroup) {
         if(serviceGroup == null) {
             return null;
         }
 
-        ServiceGroupDefinition servicegroupDef = new ServiceGroupDefinition();
+        GroupBean servicegroupDef = new GroupBean();
         servicegroupDef.setName(serviceGroup.getName());
         String[] cartridges = serviceGroup.getCartridges();
         ServiceGroup[] groups = serviceGroup.getGroups();
         org.apache.stratos.autoscaler.stub.pojo.Dependencies deps = serviceGroup.getDependencies();
 
-        List<ServiceGroupDefinition> groupDefinitions = new ArrayList<ServiceGroupDefinition>(groups.length);
+        List<GroupBean> groupDefinitions = new ArrayList<GroupBean>(groups.length);
         for (ServiceGroup group : groups) {
             if (group != null) {
                 groupDefinitions.add(convertStubServiceGroupToServiceGroupDefinition(group));
@@ -1617,7 +1587,7 @@ public class ObjectConverter {
         }
 
         if (deps != null) {
-            DependencyDefinitions depsDef = new DependencyDefinitions();
+            DependencyBean depsDef = new DependencyBean();
             String[] startupOrders = deps.getStartupOrders();
             if (startupOrders != null && startupOrders[0] != null) {
                 List<String> startupOrdersDef = Arrays.asList(startupOrders);
@@ -1665,34 +1635,6 @@ public class ObjectConverter {
         }
     }
 
-    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;
-    }
-
     public static ApplicationSignUp convertApplicationSignUpBeanToStubApplicationSignUp(ApplicationSignUpBean applicationSignUpBean) {
         ApplicationSignUp applicationSignUp = new ApplicationSignUp();
         applicationSignUp.setApplicationId(applicationSignUpBean.getApplicationId());


[7/8] stratos git commit: Cleaning rest api bean classes

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ApplicationBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ApplicationBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ApplicationBean.java
new file mode 100644
index 0000000..205e8a3
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ApplicationBean.java
@@ -0,0 +1,106 @@
+/*
+ * 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.application;
+
+import org.apache.stratos.common.beans.PropertyBean;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ApplicationBean implements Serializable {
+
+    private static final long serialVersionUID = -2829206180707597651L;
+
+	private String applicationId;
+    private boolean multiTenant;
+    private String name;
+    private String description;
+    private String alias;
+    private String status;
+    private ComponentBean components;
+    private List<PropertyBean> property;
+
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+
+    public boolean isMultiTenant() {
+        return multiTenant;
+    }
+
+    public void setMultiTenant(boolean multiTenant) {
+        this.multiTenant = multiTenant;
+    }
+
+    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 ComponentBean getComponents() {
+        return components;
+    }
+
+    public void setComponents(ComponentBean 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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ComponentBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ComponentBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ComponentBean.java
new file mode 100644
index 0000000..069d8fd
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ComponentBean.java
@@ -0,0 +1,42 @@
+package org.apache.stratos.common.beans.application;
+
+import org.apache.stratos.common.beans.cartridge.CartridgeReferenceBean;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "components")
+public class ComponentBean implements Serializable {
+
+    private static final long serialVersionUID = -5932265453191494386L;
+
+	private List<GroupReferenceBean> groups;
+	private DependencyBean dependencies;
+    private List<CartridgeReferenceBean> cartridges;
+
+    public List<GroupReferenceBean> getGroups() {
+        return groups;
+    }
+
+    public void setGroups(List<GroupReferenceBean> groups) {
+        this.groups = groups;
+    }
+
+	public DependencyBean getDependencies() {
+		return dependencies;
+	}
+
+	public void setDependencies(DependencyBean dependencies) {
+		this.dependencies = dependencies;
+	}
+
+	public List<CartridgeReferenceBean> getCartridges() {
+		return cartridges;
+	}
+
+	public void setCartridges(List<CartridgeReferenceBean> cartridges) {
+		this.cartridges = cartridges;
+	}
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/DependencyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/DependencyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/DependencyBean.java
new file mode 100644
index 0000000..b4b82d4
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/DependencyBean.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.application;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+@XmlRootElement(name = "dependencies")
+public class DependencyBean 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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/GroupBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/GroupBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/GroupBean.java
new file mode 100644
index 0000000..490f1d1
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/GroupBean.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.application;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+@XmlRootElement(name = "groups")
+public class GroupBean implements Serializable {
+
+    private String name;
+    private List<GroupBean> groups;
+    private List<String> cartridges;
+    private boolean isGroupScalingEnabled;
+    private DependencyBean 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 DependencyBean getDependencies() {
+        return dependencies;
+    }
+
+    public void setDependencies(DependencyBean dependencies) {
+        this.dependencies = dependencies;
+    }
+
+    public List<GroupBean> getGroups() {
+        return groups;
+    }
+
+    public void setGroups(List<GroupBean> 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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/GroupReferenceBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/GroupReferenceBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/GroupReferenceBean.java
new file mode 100644
index 0000000..a4d00b2
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/GroupReferenceBean.java
@@ -0,0 +1,97 @@
+/*
+ * 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.application;
+
+import org.apache.stratos.common.beans.cartridge.CartridgeReferenceBean;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+@XmlRootElement(name = "groups")
+public class GroupReferenceBean implements Serializable {
+
+    private static final long serialVersionUID = 7261380706841894892L;
+
+	private String name;
+    private String alias;
+    private int groupMinInstances;
+    private int groupMaxInstances;
+    private boolean isGroupScalingEnabled;
+    private List<CartridgeReferenceBean> cartridges;
+    private List<GroupReferenceBean> 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<CartridgeReferenceBean> getCartridges() {
+		return cartridges;
+	}
+
+	public void setCartridges(List<CartridgeReferenceBean> cartridges) {
+		this.cartridges = cartridges;
+	}
+
+	public List<GroupReferenceBean> getGroups() {
+		return groups;
+	}
+
+	public void setGroups(List<GroupReferenceBean> groups) {
+		this.groups = groups;
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/SubscribableInfo.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/SubscribableInfo.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/SubscribableInfo.java
new file mode 100644
index 0000000..0dda0d4
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/SubscribableInfo.java
@@ -0,0 +1,107 @@
+/*
+ * 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.application;
+
+import org.apache.stratos.common.beans.PropertyBean;
+import org.apache.stratos.common.beans.artifact.repository.ArtifactRepositoryBean;
+
+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 int maxMembers;
+    private int minMembers;
+    private String[] dependencyAliases;
+    private ArtifactRepositoryBean artifactRepository;
+    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[] 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;
+    }
+
+    public ArtifactRepositoryBean getArtifactRepository() {
+        return artifactRepository;
+    }
+
+    public void setArtifactRepository(ArtifactRepositoryBean artifactRepository) {
+        this.artifactRepository = artifactRepository;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/signup/ApplicationSignUpBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/signup/ApplicationSignUpBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/signup/ApplicationSignUpBean.java
new file mode 100644
index 0000000..17ae826
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/signup/ApplicationSignUpBean.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.application.signup;
+
+import org.apache.stratos.common.beans.artifact.repository.ArtifactRepositoryBean;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * Application signup definition.
+ */
+@XmlRootElement(name="applicationSignUp")
+public class ApplicationSignUpBean implements Serializable {
+
+    private static final long serialVersionUID = -3055522170914869018L;
+
+    private String applicationId;
+    private List<ArtifactRepositoryBean> artifactRepositories;
+
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+
+    public List<ArtifactRepositoryBean> getArtifactRepositories() {
+        return artifactRepositories;
+    }
+
+    public void setArtifactRepositories(List<ArtifactRepositoryBean> artifactRepositories) {
+        this.artifactRepositories = artifactRepositories;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/ArtifactRepositoryBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/ArtifactRepositoryBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/ArtifactRepositoryBean.java
new file mode 100644
index 0000000..05c757d
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/ArtifactRepositoryBean.java
@@ -0,0 +1,72 @@
+/*
+ * 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.artifact.repository;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name="artifactRepository")
+public class ArtifactRepositoryBean {
+
+    private String alias;
+    private boolean privateRepo;
+    private String repoUrl;
+    private String repoUsername;
+    private String repoPassword;
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public void setAlias(String alias) {
+        this.alias = alias;
+    }
+
+    public boolean isPrivateRepo() {
+        return privateRepo;
+    }
+
+    public void setPrivateRepo(boolean privateRepo) {
+        this.privateRepo = privateRepo;
+    }
+
+    public String getRepoUrl() {
+        return repoUrl;
+    }
+
+    public void setRepoUrl(String repoUrl) {
+        this.repoUrl = repoUrl;
+    }
+
+    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;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/GitNotificationPayloadBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/GitNotificationPayloadBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/GitNotificationPayloadBean.java
new file mode 100644
index 0000000..482ff32
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/GitNotificationPayloadBean.java
@@ -0,0 +1,35 @@
+/**
+ *  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.artifact.repository;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "payload")
+public class GitNotificationPayloadBean {
+
+    private GitRepositoryBean repository;
+
+    public GitRepositoryBean getRepository() {
+        return repository;
+    }
+
+    public void setRepository(GitRepositoryBean repository) {
+        this.repository = repository;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/GitRepositoryBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/GitRepositoryBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/GitRepositoryBean.java
new file mode 100644
index 0000000..9dc7b26
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/artifact/repository/GitRepositoryBean.java
@@ -0,0 +1,44 @@
+/**
+ *  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.artifact.repository;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "repository")
+public class GitRepositoryBean {
+
+    private String url;
+    private String description;
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ApplicationLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ApplicationLevelNetworkPartition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ApplicationLevelNetworkPartition.java
deleted file mode 100644
index 14198f7..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ApplicationLevelNetworkPartition.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.common.beans.autoscaler.partition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class ApplicationLevelNetworkPartition {
-
-    private String id;
-    private String kubernetesClusterId;
-    private boolean activeByDefault;
-    private List<Partition> partitions;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getKubernetesClusterId() {
-        return kubernetesClusterId;
-    }
-
-    public void setKubernetesClusterId(String kubernetesClusterId) {
-        this.kubernetesClusterId = kubernetesClusterId;
-    }
-
-    public boolean isActiveByDefault() {
-        return activeByDefault;
-    }
-
-    public void setActiveByDefault(boolean activeByDefault) {
-        this.activeByDefault = activeByDefault;
-    }
-
-    public List<Partition> getPartitions() {
-        return partitions;
-    }
-
-    public void setPartitions(List<Partition> partitions) {
-        this.partitions = partitions;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ChildLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ChildLevelNetworkPartition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ChildLevelNetworkPartition.java
deleted file mode 100644
index 2d68911..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ChildLevelNetworkPartition.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.common.beans.autoscaler.partition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class ChildLevelNetworkPartition {
-
-    private String id;
-    private String partitionAlgo;
-    private List<ChildLevelPartition> partitions;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getPartitionAlgo() {
-        return partitionAlgo;
-    }
-
-    public void setPartitionAlgo(String partitionAlgo) {
-        this.partitionAlgo = partitionAlgo;
-    }
-
-    public List<ChildLevelPartition> getPartitions() {
-        return partitions;
-    }
-
-    public void setPartitions(List<ChildLevelPartition> partitions) {
-        this.partitions = partitions;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ChildLevelPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ChildLevelPartition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ChildLevelPartition.java
deleted file mode 100644
index 4203ba6..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ChildLevelPartition.java
+++ /dev/null
@@ -1,44 +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.common.beans.autoscaler.partition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class ChildLevelPartition {
-
-    private String id;
-    private int max;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public int getMax() {
-        return max;
-    }
-
-    public void setMax(int max) {
-        this.max = max;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/Partition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/Partition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/Partition.java
deleted file mode 100644
index bb5a325..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/Partition.java
+++ /dev/null
@@ -1,88 +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.common.beans.autoscaler.partition;
-
-import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class Partition {
-
-    private String id;
-    private String description;
-    private boolean isPublic;
-    private String provider;
-    private String kubernetesClusterId;
-    private List<PropertyBean> property;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getProvider() {
-        return provider;
-    }
-
-    public void setProvider(String provider) {
-        this.provider = provider;
-    }
-
-    public boolean getIsPublic() {
-        return isPublic();
-    }
-
-    public boolean isPublic() {
-        return isPublic;
-    }
-
-    public void setPublic(boolean isPublic) {
-        this.isPublic = isPublic;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-
-    public String getKubernetesClusterId() {
-        return kubernetesClusterId;
-    }
-
-    public void setKubernetesClusterId(String kubernetesClusterId) {
-        this.kubernetesClusterId = kubernetesClusterId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/AutoscalePolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/AutoscalePolicy.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/AutoscalePolicy.java
deleted file mode 100644
index c9b4a4a..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/AutoscalePolicy.java
+++ /dev/null
@@ -1,82 +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.common.beans.autoscaler.policy.autoscale;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class AutoscalePolicy {
-
-    private String id;
-    private String displayName;
-    private String description;
-    private LoadThresholds loadThresholds;
-    private boolean isPublic;
-    private float instanceRoundingFactor;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    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 LoadThresholds getLoadThresholds() {
-        return loadThresholds;
-    }
-
-    public void setLoadThresholds(LoadThresholds loadThresholds) {
-        this.loadThresholds = loadThresholds;
-    }
-
-    public float getInstanceRoundingFactor() {
-        return instanceRoundingFactor;
-    }
-
-    public void setInstanceRoundingFactor(float instanceRoundingFactor) {
-        this.instanceRoundingFactor = instanceRoundingFactor;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/LoadAverageThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/LoadAverageThresholds.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/LoadAverageThresholds.java
deleted file mode 100644
index ead0106..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/LoadAverageThresholds.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.common.beans.autoscaler.policy.autoscale;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class LoadAverageThresholds {
-
-	private float threshold;
-
-    public float getThreshold() {
-        return threshold;
-    }
-
-    public void setThreshold(float threshold) {
-        this.threshold = threshold;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/LoadThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/LoadThresholds.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/LoadThresholds.java
deleted file mode 100644
index b14e890..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/LoadThresholds.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.common.beans.autoscaler.policy.autoscale;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class LoadThresholds {
-
-	private RequestsInFlightThresholds requestsInFlight;
-	private MemoryConsumptionThresholds memoryConsumption;
-	private LoadAverageThresholds loadAverage;
-
-	public RequestsInFlightThresholds getRequestsInFlight() {
-		return requestsInFlight;
-	}
-
-	public void setRequestsInFlight(RequestsInFlightThresholds requestsInFlight) {
-		this.requestsInFlight = requestsInFlight;
-	}
-
-	public MemoryConsumptionThresholds getMemoryConsumption() {
-		return memoryConsumption;
-	}
-
-	public void setMemoryConsumption(MemoryConsumptionThresholds memoryConsumption) {
-		this.memoryConsumption = memoryConsumption;
-	}
-
-	public LoadAverageThresholds getLoadAverage() {
-		return loadAverage;
-	}
-
-	public void setLoadAverage(LoadAverageThresholds loadAverage) {
-		this.loadAverage = loadAverage;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/MemoryConsumptionThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/MemoryConsumptionThresholds.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/MemoryConsumptionThresholds.java
deleted file mode 100644
index 6eec829..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/MemoryConsumptionThresholds.java
+++ /dev/null
@@ -1,37 +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.common.beans.autoscaler.policy.autoscale;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class MemoryConsumptionThresholds {
-
-	private float threshold;
-
-    public float getThreshold() {
-        return threshold;
-    }
-
-    public void setThreshold(float threshold) {
-        this.threshold = threshold;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/RequestsInFlightThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/RequestsInFlightThresholds.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/RequestsInFlightThresholds.java
deleted file mode 100644
index 0232174..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/autoscale/RequestsInFlightThresholds.java
+++ /dev/null
@@ -1,37 +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.common.beans.autoscaler.policy.autoscale;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class RequestsInFlightThresholds {
-
-    private float threshold;
-
-    public float getThreshold() {
-        return threshold;
-    }
-
-    public void setThreshold(float threshold) {
-        this.threshold = threshold;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ApplicationPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ApplicationPolicy.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ApplicationPolicy.java
deleted file mode 100644
index a1c20d2..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ApplicationPolicy.java
+++ /dev/null
@@ -1,38 +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.common.beans.autoscaler.policy.deployment;
-
-import org.apache.stratos.common.beans.autoscaler.partition.ApplicationLevelNetworkPartition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class ApplicationPolicy {
-
-    private List<ApplicationLevelNetworkPartition> networkPartition;
-
-    public List<ApplicationLevelNetworkPartition> getNetworkPartition() {
-        return networkPartition;
-    }
-
-    public void setNetworkPartition(List<ApplicationLevelNetworkPartition> networkPartition) {
-        this.networkPartition = networkPartition;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ChildPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ChildPolicy.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ChildPolicy.java
deleted file mode 100644
index 14fe144..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ChildPolicy.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.common.beans.autoscaler.policy.deployment;
-
-import org.apache.stratos.common.beans.autoscaler.partition.ChildLevelNetworkPartition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class ChildPolicy {
-
-    private String alias;
-    private List<ChildLevelNetworkPartition> networkPartition;
-
-    public String getAlias() {
-        return alias;
-    }
-
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    public List<ChildLevelNetworkPartition> getNetworkPartition() {
-        return networkPartition;
-    }
-
-    public void setNetworkPartition(List<ChildLevelNetworkPartition> networkPartition) {
-        this.networkPartition = networkPartition;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/DeploymentPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/DeploymentPolicy.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/DeploymentPolicy.java
deleted file mode 100644
index 1b2e08a..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/DeploymentPolicy.java
+++ /dev/null
@@ -1,78 +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.common.beans.autoscaler.policy.deployment;
-
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class DeploymentPolicy {
-
-    private String applicationId;
-    private String description;
-    private boolean isPublic;
-    private ApplicationPolicy applicationPolicy;
-    private List<ChildPolicy> childPolicies;
-
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-
-    public boolean getIsPublic() {
-        return isPublic();
-    }
-
-    public boolean isPublic() {
-        return isPublic;
-    }
-
-    public void setPublic(boolean isPublic) {
-        this.isPublic = isPublic;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public ApplicationPolicy getApplicationPolicy() {
-        return applicationPolicy;
-    }
-
-    public void setApplicationPolicy(ApplicationPolicy applicationPolicy) {
-        this.applicationPolicy = applicationPolicy;
-    }
-
-    public List<ChildPolicy> getChildPolicies() {
-        return childPolicies;
-    }
-
-    public void setChildPolicies(List<ChildPolicy> childPolicies) {
-        this.childPolicies = childPolicies;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeBean.java
new file mode 100644
index 0000000..95a6c23
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeBean.java
@@ -0,0 +1,253 @@
+/*
+ * 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.cartridge;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement(name = "cartridgeDefinitionBean")
+public class CartridgeBean {
+
+	private String type;
+	private String host;
+	private String provider;
+    /**
+     * Category: Application|Framework|Data|LoadBalancer
+     */
+    private String category;
+	private String displayName;
+	private String description;
+	private String version;
+	private boolean multiTenant;
+	private boolean isPublic;
+    private DeploymentBean deployment;
+    private List<PortMappingBean> portMapping;
+    private PersistenceBean persistence;
+    private List<IaasProviderBean> iaasProvider;
+    private String defaultAutoscalingPolicy;
+    private String defaultDeploymentPolicy;
+    private String serviceGroup;
+    private ContainerBean container;
+    private List<PropertyBean> property;
+    private List<String> exportingProperties;
+
+    public String toString () {
+
+        return "Type: " + getType() + ", Provider: " + getProvider() + ", Category: " + getCategory() + ", Host: " + getHost() + ", Display Name: " + getDisplayName() +
+                ", Description: " + getDescription() +  ", Version: " + getVersion() + ", Multitenant " + isMultiTenant() +", Public " + isPublic() + "\n" +
+                getDeploymentDetails() + "\n PortMapping: " + getPortMappings() + "\n IaaS: " + getIaasProviders() +
+                "\n Properties: " + getProperties() +"\n VolumeBean mappings "+ getPersistence().toString()
+                + "\n Exports " + getExportingProperties().toString();
+    }
+
+	private String getDeploymentDetails () {
+
+        if(getDeployment() != null) {
+            return getDeployment().toString();
+        }
+        return null;
+    }
+
+    private String getPortMappings () {
+
+        StringBuilder portMappingBuilder = new StringBuilder();
+        if(getPortMapping() != null && !getPortMapping().isEmpty()) {
+            for(PortMappingBean portMappingBean : getPortMapping()) {
+                portMappingBuilder.append(portMappingBean.toString());
+            }
+        }
+        return portMappingBuilder.toString();
+    }
+
+    private String getIaasProviders () {
+
+        StringBuilder iaasBuilder = new StringBuilder();
+        if(getIaasProvider() != null && !getIaasProvider().isEmpty()) {
+            for(IaasProviderBean iaasProviderBean : getIaasProvider()) {
+                iaasBuilder.append(iaasProviderBean.toString());
+            }
+        }
+        return iaasBuilder.toString();
+    }
+
+    private String getProperties () {
+
+        StringBuilder propertyBuilder = new StringBuilder();
+        if(getProperty() != null) {
+            for(PropertyBean propertyBean : getProperty()) {
+                propertyBuilder.append(propertyBean.getName() + " : " + propertyBean.getValue() + " | ");
+            }
+        }
+        return propertyBuilder.toString();
+    }
+
+    public List<String> getExportingProperties() {
+        return exportingProperties;
+    }
+
+    public void setExportingProperties(List<String> exportingProperties) {
+        this.exportingProperties = exportingProperties;
+    }
+
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public String getProvider() {
+        return provider;
+    }
+
+    public void setProvider(String provider) {
+        this.provider = provider;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    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 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 boolean isPublic() {
+        return isPublic;
+    }
+
+    public void setPublic(boolean isPublic) {
+        this.isPublic = isPublic;
+    }
+
+    public DeploymentBean getDeployment() {
+        return deployment;
+    }
+
+    public void setDeployment(DeploymentBean deployment) {
+        this.deployment = deployment;
+    }
+
+    public List<PortMappingBean> getPortMapping() {
+        return portMapping;
+    }
+
+    public void setPortMapping(List<PortMappingBean> portMapping) {
+        this.portMapping = portMapping;
+    }
+
+    public PersistenceBean getPersistence() {
+        return persistence;
+    }
+
+    public void setPersistence(PersistenceBean persistence) {
+        this.persistence = persistence;
+    }
+
+    public List<IaasProviderBean> getIaasProvider() {
+        return iaasProvider;
+    }
+
+    public void setIaasProvider(List<IaasProviderBean> iaasProvider) {
+        this.iaasProvider = iaasProvider;
+    }
+
+    public List<PropertyBean> getProperty() {
+        return property;
+    }
+
+    public void setProperty(List<PropertyBean> property) {
+        this.property = property;
+    }
+
+    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 String getServiceGroup() {
+        return serviceGroup;
+    }
+
+    public void setServiceGroup(String serviceGroup) {
+        this.serviceGroup = serviceGroup;
+    }
+
+    public ContainerBean getContainer() {
+        return container;
+    }
+
+    public void setContainer(ContainerBean container) {
+        this.container = container;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeReferenceBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeReferenceBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeReferenceBean.java
new file mode 100644
index 0000000..ec974c5
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/CartridgeReferenceBean.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.cartridge;
+
+import org.apache.stratos.common.beans.application.SubscribableInfo;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class CartridgeReferenceBean 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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/ContainerBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/ContainerBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/ContainerBean.java
new file mode 100644
index 0000000..e0eff92
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/ContainerBean.java
@@ -0,0 +1,38 @@
+package org.apache.stratos.common.beans.cartridge;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+
+@XmlRootElement(name = "container")
+public class ContainerBean {
+
+	private String imageName;
+	private String dockerfileRepo;
+	private List<PropertyBean> property;
+
+	public String getImageName() {
+		return imageName;
+	}
+
+	public void setImageName(String imageName) {
+		this.imageName = imageName;
+	}
+
+	public String getDockerfileRepo() {
+		return dockerfileRepo;
+	}
+
+	public void setDockerfileRepo(String dockerfileRepo) {
+		this.dockerfileRepo = dockerfileRepo;
+	}
+
+	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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/DeploymentBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/DeploymentBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/DeploymentBean.java
new file mode 100644
index 0000000..f7436b1
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/DeploymentBean.java
@@ -0,0 +1,61 @@
+/*
+ * 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.cartridge;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement(name = "deployment")
+public class DeploymentBean {
+
+    private String baseDir;
+    private List<String> dir;
+
+    private String getDirectories () {
+
+        StringBuilder directoryBuilder = new StringBuilder();
+        if(getDir() != null) {
+            for(String directory : getDir()) {
+                directoryBuilder.append(directory + " | ");
+            }
+        }
+        return directoryBuilder.toString();
+    }
+
+    public String getBaseDir() {
+        return baseDir;
+    }
+
+    public void setBaseDir(String baseDir) {
+        this.baseDir = baseDir;
+    }
+
+    public List<String> getDir() {
+        return dir;
+    }
+
+    public void setDir(List<String> dir) {
+        this.dir = dir;
+    }
+
+    public String toString () {
+        return " Base Directory: " + getBaseDir() + " Directories: " + getDirectories();
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/FloatingNetworkBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/FloatingNetworkBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/FloatingNetworkBean.java
new file mode 100644
index 0000000..8fdbf4a
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/FloatingNetworkBean.java
@@ -0,0 +1,73 @@
+/*
+ * 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.cartridge;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement (name = "floatingNetworks")
+public class FloatingNetworkBean {
+
+	private String name;
+	private String networkUuid;
+	private String floatingIP;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getNetworkUuid() {
+		return networkUuid;
+	}
+
+	public void setNetworkUuid(String networkUuid) {
+		this.networkUuid = networkUuid;
+	}
+
+	public String getFloatingIP() {
+		return floatingIP;
+	}
+
+	public void setFloatingIP(String floatingIP) {
+		this.floatingIP = floatingIP;
+	}
+
+	public String toString () {
+		StringBuilder sb = new StringBuilder('{');
+		String delimeter = "";
+		if (getName() != null) {
+			sb.append(delimeter).append("name : ").append(getName());
+			delimeter = ", ";
+		}
+		if (getNetworkUuid() != null) {
+			sb.append(delimeter).append("networkUuid : ").append(getNetworkUuid());
+			delimeter = ", ";
+		}
+		if (getFloatingIP() != null) {
+			sb.append(delimeter).append("floatingIP : ").append(getFloatingIP());
+			delimeter = ", ";
+		}
+		sb.append('}');
+		return sb.toString();
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/IaasProviderBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/IaasProviderBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/IaasProviderBean.java
new file mode 100644
index 0000000..23f2c7e
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/IaasProviderBean.java
@@ -0,0 +1,140 @@
+/*
+ * 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.cartridge;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement (name = "iaasProvider")
+public class IaasProviderBean {
+
+    private String type;
+    private String name;
+    private String className;
+    private String imageId;
+    private String provider;
+    private String identity;
+    private String credential;
+    private List<PropertyBean> property;
+    private List<NetworkInterfaceBean> networkInterfaces;
+
+    public List<NetworkInterfaceBean> getNetworkInterfaces() {
+        return networkInterfaces;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getClassName() {
+        return className;
+    }
+
+    public void setClassName(String className) {
+        this.className = className;
+    }
+
+    public String getImageId() {
+        return imageId;
+    }
+
+    public void setImageId(String imageId) {
+        this.imageId = imageId;
+    }
+
+    public String getProvider() {
+        return provider;
+    }
+
+    public void setProvider(String provider) {
+        this.provider = provider;
+    }
+
+    public String getIdentity() {
+        return identity;
+    }
+
+    public void setIdentity(String identity) {
+        this.identity = identity;
+    }
+
+    public String getCredential() {
+        return credential;
+    }
+
+    public void setCredential(String credential) {
+        this.credential = credential;
+    }
+
+    public List<PropertyBean> getProperty() {
+        return property;
+    }
+
+    public void setProperty(List<PropertyBean> property) {
+        this.property = property;
+    }
+
+    public void setNetworkInterfaces(List<NetworkInterfaceBean> networkInterfaces) {
+        this.networkInterfaces = networkInterfaces;
+    }
+
+    private String getIaasPropertiesString () {
+        StringBuilder iaasPropertyBuilder = new StringBuilder();
+        if(getProperty() != null) {
+            for (PropertyBean propertyBean : getProperty()) {
+                iaasPropertyBuilder.append(propertyBean.getName() + " : " + propertyBean.getValue() + " | ");
+            }
+        }
+        return iaasPropertyBuilder.toString();
+    }
+
+    private String getNetworkInterfacesString() {
+        StringBuilder sb = new StringBuilder();
+        if (getNetworkInterfaces() != null) {
+            sb.append('[');
+            String delimeter = "";
+            for (NetworkInterfaceBean nib: getNetworkInterfaces()) {
+                sb.append(delimeter).append(nib);
+                delimeter = ", ";
+            }
+            sb.append(']');
+        }
+        return sb.toString();
+    }
+
+    public String toString () {
+        return " [ Type: " + getType() + ", Name: " + getName() + ", Class Name: " + getClassName() + ", Image Id: " + getImageId() +
+                ", Provider: " + getProvider() + ", Identity: " + getIdentity() +
+                ", Credentials: " + getCredential() + ", Properties: " + getIaasPropertiesString() + ", Network Interfaces: " +
+                getNetworkInterfacesString() + " ] ";
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/NetworkInterfaceBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/NetworkInterfaceBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/NetworkInterfaceBean.java
new file mode 100644
index 0000000..d3b6028
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/NetworkInterfaceBean.java
@@ -0,0 +1,102 @@
+/*
+ * 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.cartridge;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement (name = "networkInterfaces")
+public class NetworkInterfaceBean {
+
+	private String networkUuid;
+	private String fixedIp;
+	private String portUuid;
+	private List<FloatingNetworkBean> floatingNetworks;
+    
+    private String getFloatingNetworksString() {
+    	StringBuilder sb = new StringBuilder();
+    	if (floatingNetworks != null) {
+    		sb.append('[');
+    		String delimeter = "";
+    		for (FloatingNetworkBean floatingNetworkBean:floatingNetworks) {
+    			sb.append(delimeter).append(floatingNetworkBean);
+    			delimeter = ", ";
+    		}
+    		sb.append(']');
+    	}
+    	return sb.toString();
+    }
+
+	public String getNetworkUuid() {
+		return networkUuid;
+	}
+
+	public void setNetworkUuid(String networkUuid) {
+		this.networkUuid = networkUuid;
+	}
+
+	public String getFixedIp() {
+		return fixedIp;
+	}
+
+	public void setFixedIp(String fixedIp) {
+		this.fixedIp = fixedIp;
+	}
+
+	public String getPortUuid() {
+		return portUuid;
+	}
+
+	public void setPortUuid(String portUuid) {
+		this.portUuid = portUuid;
+	}
+
+	public void setFloatingNetworks(List<FloatingNetworkBean> floatingNetworks) {
+		this.floatingNetworks = floatingNetworks;
+	}
+
+	public List<FloatingNetworkBean> getFloatingNetworks() {
+		return floatingNetworks;
+	}
+
+	public String toString () {
+		StringBuilder sb = new StringBuilder('{');
+		String delimeter = "";
+		if (getNetworkUuid() != null) {
+			sb.append(delimeter).append("networkUuid : ").append(getNetworkUuid());
+			delimeter = ", ";
+		}
+		if (getFixedIp() != null) {
+			sb.append(delimeter).append("fixedIp : ").append(getFixedIp());
+			delimeter = ", ";
+		}
+		if (getPortUuid() != null) {
+			sb.append(delimeter).append("portUuid : ").append(getPortUuid());
+			delimeter = ", ";
+		}
+		if (getFloatingNetworks() != null) {
+			sb.append(delimeter).append("floatingNetworks : ").append(getFloatingNetworks());
+			delimeter = ", ";
+		}
+		sb.append('}');
+		return sb.toString();
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PersistenceBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PersistenceBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PersistenceBean.java
new file mode 100644
index 0000000..70ef494
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PersistenceBean.java
@@ -0,0 +1,61 @@
+/*
+ * 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.cartridge;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class PersistenceBean {
+
+    private boolean isRequired;
+    private List<VolumeBean> volume;
+
+    public String toString () {
+        return " [ Persistence Required : " + isRequired() + "\n" +
+                "volume: " + getVolumes() + "] ";
+    }
+
+    private String getVolumes() {
+        StringBuilder volumeBuilder = new StringBuilder();
+        if(getVolume() != null && !getVolume().isEmpty()) {
+            for(VolumeBean volumeBean : getVolume()) {
+                volumeBuilder.append(volumeBean.toString());
+            }
+        }
+        return volumeBuilder.toString();
+    }
+
+    public boolean isRequired() {
+        return isRequired;
+    }
+
+    public void setRequired(boolean isRequired) {
+        this.isRequired = isRequired;
+    }
+
+    public List<VolumeBean> getVolume() {
+        return volume;
+    }
+
+    public void setVolume(List<VolumeBean> volume) {
+        this.volume = volume;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PortMappingBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PortMappingBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PortMappingBean.java
new file mode 100644
index 0000000..3845077
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PortMappingBean.java
@@ -0,0 +1,58 @@
+/*
+ * 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.cartridge;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "portMapping")
+public class PortMappingBean {
+
+    private String protocol;
+    private int port;
+    private int proxyPort;
+
+    public String toString () {
+        return " [ Protocol: " + getProtocol() + ", Port: " + getPort() + ", Proxy port: " + getProxyPort() + "] ";
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public void setProtocol(String protocol) {
+        this.protocol = protocol;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public void setPort(int port) {
+        this.port = port;
+    }
+
+    public int getProxyPort() {
+        return proxyPort;
+    }
+
+    public void setProxyPort(int proxyPort) {
+        this.proxyPort = proxyPort;
+    }
+}


[4/8] stratos git commit: Cleaning rest api bean classes

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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 0a8ff5c..13e3578 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
@@ -29,19 +29,18 @@ import org.apache.stratos.autoscaler.stub.AutoScalerServiceInvalidPolicyExceptio
 import org.apache.stratos.cloud.controller.stub.CloudControllerServiceInvalidCartridgeDefinitionExceptionException;
 import org.apache.stratos.cloud.controller.stub.CloudControllerServiceInvalidCartridgeTypeExceptionException;
 import org.apache.stratos.cloud.controller.stub.CloudControllerServiceInvalidIaasProviderExceptionException;
+import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
 import org.apache.stratos.common.client.AutoscalerServiceClient;
 import org.apache.stratos.common.client.CloudControllerServiceClient;
-import org.apache.stratos.common.beans.Cartridge;
 import org.apache.stratos.common.client.StratosManagerServiceClient;
 import org.apache.stratos.manager.utils.ApplicationManagementUtil;
 import org.apache.stratos.manager.utils.CartridgeConstants;
-import org.apache.stratos.common.beans.StratosApiResponse;
-import org.apache.stratos.common.beans.SubscriptionDomainRequest;
-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.AutoscalePolicy;
-import org.apache.stratos.common.beans.cartridge.definition.CartridgeDefinitionBean;
-import org.apache.stratos.common.beans.repositoryNotificationInfoBean.Payload;
+import org.apache.stratos.common.beans.ApiResponseBean;
+import org.apache.stratos.common.beans.partition.ApplicationLevelNetworkPartitionBean;
+import org.apache.stratos.common.beans.partition.PartitionBean;
+import org.apache.stratos.common.beans.policy.autoscale.AutoscalePolicyBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeBean;
+import org.apache.stratos.common.beans.artifact.repository.GitNotificationPayloadBean;
 import org.apache.stratos.rest.endpoint.util.converter.ObjectConverter;
 import org.apache.stratos.rest.endpoint.exception.RestAPIException;
 
@@ -63,7 +62,7 @@ public class StratosApiV40Utils {
 
     private static Log log = LogFactory.getLog(StratosApiV40Utils.class);
 
-    static StratosApiResponse deployCartridge (CartridgeDefinitionBean cartridgeDefinitionBean, ConfigurationContext ctxt,
+    static ApiResponseBean deployCartridge (CartridgeBean cartridgeDefinitionBean, ConfigurationContext ctxt,
                                                String userName, String tenantDomain) throws RestAPIException {
 
         log.info("Starting to deploy a Cartridge [type] "+ cartridgeDefinitionBean.getType());
@@ -96,7 +95,7 @@ public class StratosApiV40Utils {
             }
         }
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         String message = "Successfully added cartridge definition: [cartridge-type] " + cartridgeDefinitionBean.getType();
         stratosApiResponse.setMessage(message);
         if(log.isInfoEnabled()) {
@@ -125,7 +124,7 @@ public class StratosApiV40Utils {
         return commonPolicies.toArray(new DeploymentPolicy[0]);
     }
 
-    static StratosApiResponse undeployCartridge(String cartridgeType) throws RestAPIException {
+    static ApiResponseBean undeployCartridge(String cartridgeType) throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
@@ -142,13 +141,13 @@ public class StratosApiV40Utils {
 
         }
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully undeployed cartridge definition with type " + cartridgeType);
         return stratosApiResponse;
     }
 
 
-    public static StratosApiResponse deployPartition(Partition partitionBean) throws RestAPIException {
+    public static ApiResponseBean deployPartition(PartitionBean partitionBean) throws RestAPIException {
 
         //log.info("***** " + cartridgeDefinitionBean.toString() + " *****");
 
@@ -171,12 +170,12 @@ public class StratosApiV40Utils {
 
         }
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully deployed partition definition with id " + partitionBean.getId());
         return stratosApiResponse;
     }
 
-    public static StratosApiResponse deployAutoscalingPolicy(AutoscalePolicy autoscalePolicyBean) throws RestAPIException {
+    public static ApiResponseBean deployAutoscalingPolicy(AutoscalePolicyBean autoscalePolicyBean) throws RestAPIException {
 
         //log.info("***** " + cartridgeDefinitionBean.toString() + " *****");
 
@@ -201,7 +200,7 @@ public class StratosApiV40Utils {
 
         }
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully deployed autoscaling policy definition with id " + autoscalePolicyBean.getId());
         return stratosApiResponse;
     }
@@ -219,7 +218,7 @@ public class StratosApiV40Utils {
         }
     }
 
-    public static Partition[] getAvailablePartitions () throws RestAPIException {
+    public static PartitionBean[] getAvailablePartitions () throws RestAPIException {
 
        org.apache.stratos.cloud.controller.stub.domain.Partition[] partitions = null;
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
@@ -237,7 +236,7 @@ public class StratosApiV40Utils {
         return ObjectConverter.populatePartitionPojos(partitions);
     }
 
-    public static Partition[] getPartitionsOfDeploymentPolicy(String deploymentPolicyId)
+    public static PartitionBean[] getPartitionsOfDeploymentPolicy(String deploymentPolicyId)
             throws RestAPIException {
 
         org.apache.stratos.cloud.controller.stub.domain.Partition[] partitions = null;
@@ -258,7 +257,7 @@ public class StratosApiV40Utils {
         return ObjectConverter.populatePartitionPojos(partitions);
     }
 
-    public static Partition[]
+    public static PartitionBean[]
     getPartitionsOfGroup(String deploymentPolicyId, String groupId) throws RestAPIException {
 
         org.apache.stratos.cloud.controller.stub.domain.Partition[] partitions = null;
@@ -279,7 +278,7 @@ public class StratosApiV40Utils {
         return ObjectConverter.populatePartitionPojos(partitions);
     }
 
-    public static Partition getPartition (String partitionId) throws RestAPIException {
+    public static PartitionBean getPartition (String partitionId) throws RestAPIException {
 
         org.apache.stratos.cloud.controller.stub.domain.Partition partition = null;
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
@@ -309,7 +308,7 @@ public class StratosApiV40Utils {
         }
     }
 
-    public static AutoscalePolicy[] getAutoScalePolicies () throws RestAPIException {
+    public static AutoscalePolicyBean[] getAutoScalePolicies () throws RestAPIException {
 
         org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy[] autoscalePolicies = null;
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
@@ -326,7 +325,7 @@ public class StratosApiV40Utils {
         return ObjectConverter.convertStubAutoscalePoliciesToAutoscalePolicies(autoscalePolicies);
     }
 
-    public static AutoscalePolicy getAutoScalePolicy (String autoscalePolicyId) throws RestAPIException {
+    public static AutoscalePolicyBean getAutoScalePolicy (String autoscalePolicyId) throws RestAPIException {
 
         org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy autoscalePolicy = null;
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
@@ -345,7 +344,7 @@ public class StratosApiV40Utils {
         return ObjectConverter.convertStubAutoscalePolicyToAutoscalePolicy(autoscalePolicy);
     }
 
-    public static org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy
+    public static DeploymentPolicyBean
     getDeploymentPolicy(String deploymentPolicyId) throws RestAPIException {
 
         DeploymentPolicy deploymentPolicy = null;
@@ -371,7 +370,7 @@ public class StratosApiV40Utils {
         return ObjectConverter.convertStubDeploymentPolicyToDeploymentPolicy(deploymentPolicy);
     }
 
-    public static ApplicationLevelNetworkPartition[] getPartitionGroups (String deploymentPolicyId)
+    public static ApplicationLevelNetworkPartitionBean[] getPartitionGroups (String deploymentPolicyId)
             throws RestAPIException{
 
         org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[] applicationLevelNetworkPartitions = null;
@@ -391,10 +390,10 @@ public class StratosApiV40Utils {
         return ObjectConverter.convertStubApplicationLevelNetworkPartitionsToApplicationLevelNetworkPartitions(applicationLevelNetworkPartitions);
     }
 
-    static Cartridge getAvailableCartridgeInfo(String cartridgeType, Boolean multiTenant, ConfigurationContext configurationContext) throws RestAPIException {
-        List<Cartridge> cartridges = getAvailableCartridges(null, multiTenant, configurationContext);
-        for(Cartridge cartridge : cartridges) {
-            if(cartridge.getCartridgeType().equals(cartridgeType)) {
+    static CartridgeBean getAvailableCartridgeInfo(String cartridgeType, Boolean multiTenant, ConfigurationContext configurationContext) throws RestAPIException {
+        List<CartridgeBean> cartridges = getAvailableCartridges(null, multiTenant, configurationContext);
+        for(CartridgeBean cartridge : cartridges) {
+            if(cartridge.getType().equals(cartridgeType)) {
                 return cartridge;
             }
         }
@@ -403,13 +402,13 @@ public class StratosApiV40Utils {
         throw new RestAPIException(msg) ;
     }
 
-    static List<Cartridge> getAvailableLbCartridges(Boolean multiTenant,
+    static List<CartridgeBean> getAvailableLbCartridges(Boolean multiTenant,
                                                     ConfigurationContext configurationContext) throws RestAPIException {
-        List<Cartridge> cartridges = getAvailableCartridges(null, multiTenant,
+        List<CartridgeBean> cartridges = getAvailableCartridges(null, multiTenant,
                 configurationContext);
-        List<Cartridge> lbCartridges = new ArrayList<Cartridge>();
-        for (Cartridge cartridge : cartridges) {
-            if (cartridge.isLoadBalancer()) {
+        List<CartridgeBean> lbCartridges = new ArrayList<CartridgeBean>();
+        for (CartridgeBean cartridge : cartridges) {
+            if (cartridge.getCategory().equals("LoadBalancer")) {
                 lbCartridges.add(cartridge);
             }
         }
@@ -422,8 +421,8 @@ public class StratosApiV40Utils {
         return lbCartridges;
     }
 
-    static List<Cartridge> getAvailableCartridges(String cartridgeSearchString, Boolean multiTenant, ConfigurationContext configurationContext) throws RestAPIException {
-        List<Cartridge> cartridges = new ArrayList<Cartridge>();
+    static List<CartridgeBean> getAvailableCartridges(String cartridgeSearchString, Boolean multiTenant, ConfigurationContext configurationContext) throws RestAPIException {
+        List<CartridgeBean> cartridges = new ArrayList<CartridgeBean>();
 
         if (log.isDebugEnabled()) {
             log.debug("Getting available cartridges. Search String: " + cartridgeSearchString + ", Multi-Tenant: " + multiTenant);
@@ -468,25 +467,25 @@ public class StratosApiV40Utils {
                         continue;
                     }
 
-                    Cartridge cartridge = new Cartridge();
-                    cartridge.setCartridgeType(cartridgeType);
+                    CartridgeBean cartridge = new CartridgeBean();
+                    cartridge.setType(cartridgeType);
                     cartridge.setProvider(cartridgeInfo.getProvider());
                     cartridge.setDisplayName(cartridgeInfo.getDisplayName());
                     cartridge.setDescription(cartridgeInfo.getDescription());
                     cartridge.setVersion(cartridgeInfo.getVersion());
                     cartridge.setMultiTenant(cartridgeInfo.getMultiTenant());
-                    cartridge.setHostName(cartridgeInfo.getHostName());
+                    cartridge.setHost(cartridgeInfo.getHostName());
                     cartridge.setDefaultAutoscalingPolicy(cartridgeInfo.getDefaultAutoscalingPolicy());
                     cartridge.setDefaultDeploymentPolicy(cartridgeInfo.getDefaultDeploymentPolicy());
                     //cartridge.setStatus(CartridgeConstants.NOT_SUBSCRIBED);
-                    cartridge.setCartridgeAlias("-");
-                    cartridge.setPersistence(ObjectConverter.convertStubPersistenceToPersistence(cartridgeInfo.getPersistence()));
+                    //cartridge.setCartridgeAlias("-");
+                    //cartridge.setPersistence(ObjectConverter.convertStubPersistenceToPersistence(cartridgeInfo.getPersistence()));
                     cartridge.setServiceGroup(cartridgeInfo.getServiceGroup());
 
                     if(cartridgeInfo.getLbConfig() != null && cartridgeInfo.getProperties() != null) {
                         for(org.apache.stratos.cloud.controller.stub.Property property: cartridgeInfo.getProperties()) {
                             if(property.getName().equals("load.balancer")) {
-                                cartridge.setLoadBalancer(true);
+                                //cartridge.setLoadBalancer(true);
                             }
                         }
                     }
@@ -518,7 +517,7 @@ public class StratosApiV40Utils {
             throw new RestAPIException(msg, e);
         }
 
-        Collections.sort(cartridges);
+        //Collections.sort(cartridges);
 
         if (log.isDebugEnabled()) {
             log.debug("Returning available cartridges " + cartridges.size());
@@ -972,27 +971,11 @@ public class StratosApiV40Utils {
         return cartridgeSubscription.getClusterDomain();
     } */
 
-    static StratosApiResponse unsubscribe(String alias, String tenantDomain) throws RestAPIException {
-
+    static ApiResponseBean unsubscribe(String alias, String tenantDomain) throws RestAPIException {
         throw new RestAPIException("Not implemented");
-//        try {
-//            cartridgeSubsciptionManager.unsubscribeFromCartridge(tenantDomain, alias);
-//        } catch (ADCException e) {
-//            String msg = "Failed to unsubscribe from [alias] "+alias+". Cause: "+ e.getMessage();
-//            log.error(msg, e);
-//            throw new RestAPIException(msg, e);
-//
-//        } catch (NotSubscribedException e) {
-//            log.error(e.getMessage(), e);
-//            throw new RestAPIException(e.getMessage(), e);
-//        }
-//
-//        StratosApiResponse stratosApiResponse = new StratosApiResponse();
-//        stratosApiResponse.setMessage("Successfully terminated the subscription with alias " + alias);
-//        return stratosApiResponse;
     }
 
-    static void notifyArtifactUpdatedEvent(Payload payload) throws RestAPIException {
+    static void notifyArtifactUpdatedEvent(GitNotificationPayloadBean payload) throws RestAPIException {
         try {
             StratosManagerServiceClient serviceClient = StratosManagerServiceClient.getInstance();
             serviceClient.notifyArtifactUpdatedEventForRepository(payload.getRepository().getUrl());
@@ -1003,103 +986,8 @@ public class StratosApiV40Utils {
         }
     }
 
-    public static StratosApiResponse addSubscriptionDomains(ConfigurationContext configurationContext, String cartridgeType,
-                                                            String subscriptionAlias,
-                                                            SubscriptionDomainRequest request)
-            throws RestAPIException {
-//        try {
-//            int tenantId = ApplicationManagementUtil.getTenantId(configurationContext);
-//
-//            for (org.apache.stratos.common.beans.subscription.domain.SubscriptionDomainBean subscriptionDomain : request.getDomains()) {
-//                boolean isDomainExists = isSubscriptionDomainExists(configurationContext, cartridgeType, subscriptionAlias, subscriptionDomain.getDomainName());
-//                if (isDomainExists) {
-//                    String message = "Subscription domain " + subscriptionDomain.getDomainName() + " exists";
-//                    throw new RestAPIException(Status.INTERNAL_SERVER_ERROR, message);
-//                }
-//            }
-//
-//            for (org.apache.stratos.common.beans.subscription.domain.SubscriptionDomainBean subscriptionDomain : request.getDomains()) {
-//                cartridgeSubsciptionManager.addSubscriptionDomain(tenantId, subscriptionAlias,
-//                        subscriptionDomain.getDomainName(), subscriptionDomain.getApplicationContext());
-//            }
-//        } catch (Exception e) {
-//            log.error(e.getMessage(), e);
-//            throw new RestAPIException(e.getMessage(), e);
-//        }
-
-//        StratosApiResponse stratosApiResponse = new StratosApiResponse();
-//        stratosApiResponse.setMessage("Successfully added domains to cartridge subscription");
-//        return stratosApiResponse;
-
-        throw new RestAPIException("Not implemented");
-    }
-
-//    public static boolean isSubscriptionDomainExists(ConfigurationContext configurationContext, String cartridgeType,
-//                                                     String subscriptionAlias, String domain) throws RestAPIException {
-//        try {
-//            int tenantId = ApplicationManagementUtil.getTenantId(configurationContext);
-//            SubscriptionDomainBean subscriptionDomain = ObjectConverter.populateSubscriptionDomainPojo(cartridgeSubsciptionManager.getSubscriptionDomain(tenantId,
-//                    subscriptionAlias, domain));
-//
-//            if (subscriptionDomain.getDomainName() != null) {
-//                return true;
-//            } else {
-//                return false;
-//            }
-//        } catch (Exception e) {
-//            log.error(e.getMessage(), e);
-//            throw new RestAPIException(e.getMessage(), e);
-//        }
-//
-//    }
-
-//    public static List<SubscriptionDomainBean> getSubscriptionDomains(ConfigurationContext configurationContext, String cartridgeType,
-//                                                                      String subscriptionAlias) throws RestAPIException {
-//        try {
-//            int tenantId = ApplicationManagementUtil.getTenantId(configurationContext);
-//            return ObjectConverter.populateSubscriptionDomainPojos(cartridgeSubsciptionManager.getSubscriptionDomains(tenantId, subscriptionAlias));
-//        } catch (Exception e) {
-//            log.error(e.getMessage(), e);
-//            throw new RestAPIException(e.getMessage(), e);
-//        }
-//    }
-
-//    public static SubscriptionDomainBean getSubscriptionDomain(ConfigurationContext configurationContext, String cartridgeType,
-//                                                               String subscriptionAlias, String domain) throws RestAPIException {
-//        try {
-//            int tenantId = ApplicationManagementUtil
-//                    .getTenantId(configurationContext);
-//            SubscriptionDomainBean subscriptionDomain = ObjectConverter.populateSubscriptionDomainPojo(cartridgeSubsciptionManager.getSubscriptionDomain(tenantId,
-//                    subscriptionAlias, domain));
-//
-//            if (subscriptionDomain == null) {
-//                String message = "Could not find a subscription [domain] "+domain+ " for Cartridge [type] "
-//                        +cartridgeType+ " and [alias] "+subscriptionAlias;
-//                log.error(message);
-//                throw new RestAPIException(Status.NOT_FOUND, message);
-//            }
-//
-//            return subscriptionDomain;
-//
-//        } catch (Exception e) {
-//            log.error(e.getMessage(), e);
-//            throw new RestAPIException(e.getMessage(), e);
-//        }
-//    }
-
-    public static StratosApiResponse removeSubscriptionDomain(ConfigurationContext configurationContext, String cartridgeType,
+    public static ApiResponseBean removeSubscriptionDomain(ConfigurationContext configurationContext, String cartridgeType,
                                                               String subscriptionAlias, String domain) throws RestAPIException {
-//        try {
-//            int tenantId = ApplicationManagementUtil.getTenantId(configurationContext);
-//            cartridgeSubsciptionManager.removeSubscriptionDomain(tenantId, subscriptionAlias, domain);
-//        } catch (Exception e) {
-//            log.error(e.getMessage(), e);
-//            throw new RestAPIException(e.getMessage(), e);
-//        }
-//
-//        StratosApiResponse stratosApiResponse = new StratosApiResponse();
-//        stratosApiResponse.setMessage("Successfully removed domains from cartridge subscription");
-//        return stratosApiResponse;
         throw new RestAPIException("Not implemented");
     }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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 4802b8a..54b90fb 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
@@ -21,13 +21,16 @@ package org.apache.stratos.rest.endpoint.api;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.common.beans.*;
-import org.apache.stratos.common.beans.autoscaler.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.common.beans.cartridge.definition.CartridgeDefinitionBean;
-import org.apache.stratos.common.beans.kubernetes.KubernetesCluster;
-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.application.ApplicationBean;
+import org.apache.stratos.common.beans.application.GroupBean;
+import org.apache.stratos.common.beans.application.signup.ApplicationSignUpBean;
+import org.apache.stratos.common.beans.policy.autoscale.AutoscalePolicyBean;
+import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesClusterBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesHostBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesMasterBean;
+import org.apache.stratos.common.beans.artifact.repository.GitNotificationPayloadBean;
 import org.apache.stratos.common.beans.topology.ApplicationInfoBean;
 import org.apache.stratos.common.util.ClaimsMgtUtil;
 import org.apache.stratos.common.util.CommonUtil;
@@ -89,7 +92,7 @@ public class StratosApiV41 extends AbstractApi {
     @AuthorizationAction("/permission/admin/restlogin")
     public Response initialize()
             throws RestAPIException {
-        StratosApiResponse response = new StratosApiResponse();
+        ApiResponseBean response = new ApiResponseBean();
         response.setMessage("Successfully authenticated");
         return Response.ok(response).build();
     }
@@ -132,7 +135,7 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/add/cartridgeDefinition")
-    public Response addCartridge(CartridgeDefinitionBean cartridgeDefinitionBean)
+    public Response addCartridge(CartridgeBean cartridgeDefinitionBean)
             throws RestAPIException {
         StratosApiV41Utils.addCartridge(cartridgeDefinitionBean);
         URI url = uriInfo.getAbsolutePathBuilder().path(cartridgeDefinitionBean.getType()).build();
@@ -152,12 +155,12 @@ public class StratosApiV41 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/view/cartridge")
     public Response getCartridges() throws RestAPIException {
-        List<CartridgeDefinitionBean> cartridges = StratosApiV41Utils.getAvailableCartridges(null, null, getConfigContext());
+        List<CartridgeBean> cartridges = StratosApiV41Utils.getAvailableCartridges(null, null, getConfigContext());
         if (cartridges == null) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }
-        CartridgeDefinitionBean[] cartridgeArray = cartridges.isEmpty() ?
-                new CartridgeDefinitionBean[0] : cartridges.toArray(new CartridgeDefinitionBean[cartridges.size()]);
+        CartridgeBean[] cartridgeArray = cartridges.isEmpty() ?
+                new CartridgeBean[0] : cartridges.toArray(new CartridgeBean[cartridges.size()]);
         return Response.ok().entity(cartridgeArray).build();
     }
 
@@ -167,7 +170,7 @@ public class StratosApiV41 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/view/cartridge")
     public Response getCartridge(@PathParam("cartridgeType") String cartridgeType) throws RestAPIException {
-        CartridgeDefinitionBean cartridge = StratosApiV41Utils.getCartridge(cartridgeType);
+        CartridgeBean cartridge = StratosApiV41Utils.getCartridge(cartridgeType);
         if (cartridge == null) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }
@@ -189,13 +192,13 @@ public class StratosApiV41 extends AbstractApi {
     @AuthorizationAction("/permission/admin/manage/view/cartridge")
     public Response getCartridgesByFilter(@DefaultValue("") @PathParam("filter") String filter,
                                           @QueryParam("criteria") String criteria) throws RestAPIException {
-        List<CartridgeDefinitionBean> cartridges = StratosApiV41Utils.
+        List<CartridgeBean> cartridges = StratosApiV41Utils.
                 getCartridgesByFilter(filter, criteria, getConfigContext());
         if (cartridges == null) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }
-        CartridgeDefinitionBean[] cartridgeArray = cartridges.isEmpty() ?
-                new CartridgeDefinitionBean[0] : cartridges.toArray(new CartridgeDefinitionBean[cartridges.size()]);
+        CartridgeBean[] cartridgeArray = cartridges.isEmpty() ?
+                new CartridgeBean[0] : cartridges.toArray(new CartridgeBean[cartridges.size()]);
         return Response.ok().entity(cartridgeArray).build();
     }
 
@@ -214,7 +217,7 @@ public class StratosApiV41 extends AbstractApi {
     @AuthorizationAction("/permission/admin/manage/view/cartridge")
     public Response getCartridgeByFilter(@PathParam("cartridgeType") String cartridgeType,
                                          @DefaultValue("") @PathParam("filter") String filter) throws RestAPIException {
-        CartridgeDefinitionBean cartridge = StratosApiV41Utils.getCartridgeByFilter(filter, cartridgeType, getConfigContext());
+        CartridgeBean cartridge = StratosApiV41Utils.getCartridgeByFilter(filter, cartridgeType, getConfigContext());
         if (cartridge == null) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }
@@ -253,7 +256,7 @@ public class StratosApiV41 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public Response addServiceGroup(ServiceGroupDefinition serviceGroupDefinition)
+    public Response addServiceGroup(GroupBean serviceGroupDefinition)
             throws RestAPIException {
         StratosApiV41Utils.addServiceGroup(serviceGroupDefinition);
         URI url = uriInfo.getAbsolutePathBuilder().path(serviceGroupDefinition.getName()).build();
@@ -274,7 +277,7 @@ public class StratosApiV41 extends AbstractApi {
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     public Response getServiceGroupDefinition(@PathParam("groupDefinitionName") String groupDefinitionName)
             throws RestAPIException {
-        ServiceGroupDefinition serviceGroupDefinition = StratosApiV41Utils.getServiceGroupDefinition(groupDefinitionName);
+        GroupBean serviceGroupDefinition = StratosApiV41Utils.getServiceGroupDefinition(groupDefinitionName);
         Response.ResponseBuilder rb;
         if (serviceGroupDefinition != null) {
             rb = Response.ok().entity(serviceGroupDefinition);
@@ -297,7 +300,7 @@ public class StratosApiV41 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     public Response getServiceGroups() throws RestAPIException {
-        ServiceGroupDefinition[] serviceGroups = StratosApiV41Utils.getServiceGroupDefinitions();
+        GroupBean[] serviceGroups = StratosApiV41Utils.getServiceGroupDefinitions();
         Response.ResponseBuilder rb;
         if (serviceGroups != null) {
             rb = Response.ok().entity(serviceGroups);
@@ -342,7 +345,7 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Response addApplication(ApplicationDefinition applicationDefinition)
+    public Response addApplication(ApplicationBean applicationDefinition)
             throws RestAPIException {
         StratosApiV41Utils.addApplication(applicationDefinition, getConfigContext(), getUsername(), getTenantDomain());
         URI url = uriInfo.getAbsolutePathBuilder().path(applicationDefinition.getApplicationId()).build();
@@ -361,8 +364,8 @@ public class StratosApiV41 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     public Response getApplications() throws RestAPIException {
-        List<ApplicationDefinition> applicationDefinitions = StratosApiV41Utils.getApplications();
-        ApplicationDefinition[] applicationDefinitionsArray = applicationDefinitions.toArray(new ApplicationDefinition[applicationDefinitions.size()]);
+        List<ApplicationBean> applicationDefinitions = StratosApiV41Utils.getApplications();
+        ApplicationBean[] applicationDefinitionsArray = applicationDefinitions.toArray(new ApplicationBean[applicationDefinitions.size()]);
         return Response.ok(applicationDefinitionsArray).build();
     }
 
@@ -373,7 +376,7 @@ public class StratosApiV41 extends AbstractApi {
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     public Response getApplication(@PathParam("applicationId") String applicationId)
             throws RestAPIException {
-        ApplicationDefinition applicationDefinition = StratosApiV41Utils.getApplication(applicationId);
+        ApplicationBean applicationDefinition = StratosApiV41Utils.getApplication(applicationId);
         if (applicationDefinition == null) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }
@@ -392,7 +395,7 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Response deployApplication(@PathParam("applicationId") String applicationId, DeploymentPolicy deploymentPolicy)
+    public Response deployApplication(@PathParam("applicationId") String applicationId, DeploymentPolicyBean deploymentPolicy)
             throws RestAPIException {
         StratosApiV41Utils.deployApplication(applicationId, deploymentPolicy);
         return Response.accepted().build();
@@ -405,7 +408,7 @@ public class StratosApiV41 extends AbstractApi {
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     public Response getApplicationDeploymentPolicy(@PathParam("applicationId") String applicationId)
             throws RestAPIException {
-        DeploymentPolicy deploymentPolicy = StratosApiV41Utils.getDeploymentPolicy(applicationId);
+        DeploymentPolicyBean deploymentPolicy = StratosApiV41Utils.getDeploymentPolicy(applicationId);
         if (deploymentPolicy == null) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }
@@ -525,7 +528,7 @@ public class StratosApiV41 extends AbstractApi {
     @SuperTenantService(true)
     public Response removeApplication(@PathParam("applicationId") String applicationId)
             throws RestAPIException {
-        ApplicationDefinition applicationDefinition = StratosApiV41Utils.getApplication(applicationId);
+        ApplicationBean applicationDefinition = StratosApiV41Utils.getApplication(applicationId);
         if (applicationDefinition == null) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }
@@ -564,7 +567,7 @@ public class StratosApiV41 extends AbstractApi {
     @AuthorizationAction("/permission/admin/manage/view/autoscalingPolicy")
     public Response getAutoscalingPolicy(@PathParam("autoscalePolicyId") String autoscalePolicyId)
             throws RestAPIException {
-        AutoscalePolicy autoScalePolicy = StratosApiV41Utils.getAutoScalePolicy(autoscalePolicyId);
+        AutoscalePolicyBean autoScalePolicy = StratosApiV41Utils.getAutoScalePolicy(autoscalePolicyId);
         if (autoScalePolicy == null) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }
@@ -583,7 +586,7 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/add/autoscalingPolicy")
-    public Response addAutoscalingPolicy(AutoscalePolicy autoscalePolicy)
+    public Response addAutoscalingPolicy(AutoscalePolicyBean autoscalePolicy)
             throws RestAPIException {
 
         StratosApiV41Utils.addAutoscalingPolicy(autoscalePolicy);
@@ -603,7 +606,7 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/add/autoscalingPolicy")
-    public Response updateAutoscalingPolicyDefintion(AutoscalePolicy autoscalePolicy)
+    public Response updateAutoscalingPolicyDefintion(AutoscalePolicyBean autoscalePolicy)
             throws RestAPIException {
 
         StratosApiV41Utils.updateAutoscalingPolicy(autoscalePolicy);
@@ -612,25 +615,25 @@ public class StratosApiV41 extends AbstractApi {
 
     // API methods for subscriptions
 
-    /**
-     * Gets the subscriptions of an application.
-     *
-     * @param applicationId the application id
-     * @return the subscriptions of application
-     * @throws RestAPIException the rest api exception
-     */
-    @GET
-    @Path("/subscriptions/{applicationId}")
-    @Produces("application/json")
-    @Consumes("application/json")
-    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Response getSubscriptionsForApplication(@PathParam("applicationId") String applicationId) throws RestAPIException {
-        List<ApplicationSubscription> subscriptions = StratosApiV41Utils.getApplicationSubscriptions(applicationId);
-        if (subscriptions == null) {
-            return Response.status(Response.Status.NOT_FOUND).build();
-        }
-        return Response.ok().entity(subscriptions).build();
-    }
+//    /**
+//     * Gets the subscriptions of an application.
+//     *
+//     * @param applicationId the application id
+//     * @return the subscriptions of application
+//     * @throws RestAPIException the rest api exception
+//     */
+//    @GET
+//    @Path("/subscriptions/{applicationId}")
+//    @Produces("application/json")
+//    @Consumes("application/json")
+//    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
+//    public Response getSubscriptionsForApplication(@PathParam("applicationId") String applicationId) throws RestAPIException {
+//        List<ApplicationSubscription> subscriptions = StratosApiV41Utils.getApplicationSubscriptions(applicationId);
+//        if (subscriptions == null) {
+//            return Response.status(Response.Status.NOT_FOUND).build();
+//        }
+//        return Response.ok().entity(subscriptions).build();
+//    }
 
     /**
      * Gets the subscribed cartridges of service group.
@@ -1243,7 +1246,7 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/add/sync")
-    public Response notifyRepository(Payload payload) throws RestAPIException {
+    public Response notifyRepository(GitNotificationPayloadBean payload) throws RestAPIException {
         if (log.isInfoEnabled()) {
             log.info(String.format("Git update"));
         }
@@ -1396,7 +1399,7 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/add/kubernetes")
-    public Response addKubernetesHostCluster(KubernetesCluster kubernetesCluster) throws RestAPIException {
+    public Response addKubernetesHostCluster(KubernetesClusterBean kubernetesCluster) throws RestAPIException {
 
         StratosApiV41Utils.addKubernetesCluster(kubernetesCluster);
         URI url = uriInfo.getAbsolutePathBuilder().path(kubernetesCluster.getClusterId()).build();
@@ -1416,7 +1419,7 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/add/kubernetes")
-    public Response addKubernetesHost(@PathParam("kubernetesClusterId") String kubernetesClusterId, KubernetesHost kubernetesHost)
+    public Response addKubernetesHost(@PathParam("kubernetesClusterId") String kubernetesClusterId, KubernetesHostBean kubernetesHost)
             throws RestAPIException {
 
         StratosApiV41Utils.addKubernetesHost(kubernetesClusterId, kubernetesHost);
@@ -1436,7 +1439,7 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/add/kubernetes")
-    public Response updateKubernetesMaster(KubernetesMaster kubernetesMaster) throws RestAPIException {
+    public Response updateKubernetesMaster(KubernetesMasterBean kubernetesMaster) throws RestAPIException {
         try {
             StratosApiV41Utils.updateKubernetesMaster(kubernetesMaster);
             URI url = uriInfo.getAbsolutePathBuilder().path(kubernetesMaster.getHostId()).build();
@@ -1452,7 +1455,7 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/add/kubernetes")
-    public Response updateKubernetesHost(KubernetesHost kubernetesHost) throws RestAPIException {
+    public Response updateKubernetesHost(KubernetesHostBean kubernetesHost) throws RestAPIException {
         try {
             StratosApiV41Utils.updateKubernetesHost(kubernetesHost);
             URI url = uriInfo.getAbsolutePathBuilder().path(kubernetesHost.getHostId()).build();

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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 ef370fd..631983b 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
@@ -34,15 +34,19 @@ 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.domain.Volume;
 import org.apache.stratos.common.beans.*;
-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;
-import org.apache.stratos.common.beans.cartridge.definition.PersistenceBean;
-import org.apache.stratos.common.beans.cartridge.definition.VolumeBean;
-import org.apache.stratos.common.beans.kubernetes.KubernetesCluster;
-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.application.ApplicationBean;
+import org.apache.stratos.common.beans.application.GroupBean;
+import org.apache.stratos.common.beans.application.signup.ApplicationSignUpBean;
+import org.apache.stratos.common.beans.partition.ApplicationLevelNetworkPartitionBean;
+import org.apache.stratos.common.beans.policy.autoscale.AutoscalePolicyBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeBean;
+import org.apache.stratos.common.beans.cartridge.PersistenceBean;
+import org.apache.stratos.common.beans.cartridge.VolumeBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesClusterBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesHostBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesMasterBean;
+import org.apache.stratos.common.beans.artifact.repository.GitNotificationPayloadBean;
+import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
 import org.apache.stratos.common.beans.topology.ApplicationInfoBean;
 import org.apache.stratos.common.beans.topology.ApplicationInstanceBean;
 import org.apache.stratos.common.beans.topology.GroupInstanceBean;
@@ -79,7 +83,7 @@ public class StratosApiV41Utils {
     private static Log log = LogFactory.getLog(StratosApiV41Utils.class);
 
     // Util methods for cartridges
-    public static void addCartridge(CartridgeDefinitionBean cartridgeDefinition) throws RestAPIException {
+    public static void addCartridge(CartridgeBean cartridgeDefinition) throws RestAPIException {
 
         try {
             if(log.isDebugEnabled()) {
@@ -129,9 +133,9 @@ public class StratosApiV41Utils {
         }
     }
 
-    public static List<CartridgeDefinitionBean> getCartridgesByFilter(String filter, String criteria, ConfigurationContext configurationContext)
+    public static List<CartridgeBean> getCartridgesByFilter(String filter, String criteria, ConfigurationContext configurationContext)
 			throws RestAPIException {
-		List<CartridgeDefinitionBean> cartridges = null;
+		List<CartridgeBean> cartridges = null;
 
 		if (filter.equals("singleTenant")) {
 			cartridges = getAvailableCartridges(null, false, configurationContext);
@@ -146,11 +150,11 @@ public class StratosApiV41Utils {
 		return cartridges;
 	}
 
-	public static CartridgeDefinitionBean getCartridgeByFilter(String filter, String cartridgeType, ConfigurationContext configurationContext)
+	public static CartridgeBean getCartridgeByFilter(String filter, String cartridgeType, ConfigurationContext configurationContext)
 	throws RestAPIException {
-		List<CartridgeDefinitionBean> cartridges = getCartridgesByFilter(filter, null, configurationContext);
+		List<CartridgeBean> cartridges = getCartridgesByFilter(filter, null, configurationContext);
 
-		for (CartridgeDefinitionBean cartridge : cartridges) {
+		for (CartridgeBean cartridge : cartridges) {
 			if (cartridge.getType().equals(cartridgeType)) {
 				return cartridge;
 			}
@@ -160,12 +164,12 @@ public class StratosApiV41Utils {
 		throw new RestAPIException(msg);
 	}
 
-    private static List<CartridgeDefinitionBean> getAvailableLbCartridges(Boolean multiTenant,
+    private static List<CartridgeBean> getAvailableLbCartridges(Boolean multiTenant,
                                                     ConfigurationContext configurationContext) throws RestAPIException {
-        List<CartridgeDefinitionBean> cartridges = getAvailableCartridges(null, multiTenant,
+        List<CartridgeBean> cartridges = getAvailableCartridges(null, multiTenant,
                 configurationContext);
-        List<CartridgeDefinitionBean> lbCartridges = new ArrayList<CartridgeDefinitionBean>();
-        for (CartridgeDefinitionBean cartridge : cartridges) {
+        List<CartridgeBean> lbCartridges = new ArrayList<CartridgeBean>();
+        for (CartridgeBean cartridge : cartridges) {
             if ("loadbalancer".equalsIgnoreCase(cartridge.getCategory())) {
                 lbCartridges.add(cartridge);
             }
@@ -180,8 +184,8 @@ public class StratosApiV41Utils {
 	 * @return List of the cartridge definitions
 	 * @throws RestAPIException
 	 */
-	private static List<CartridgeDefinitionBean> getAvailableCartridgesByProvider(String provider, ConfigurationContext configurationContext) throws RestAPIException {
-		List<CartridgeDefinitionBean> cartridges = new ArrayList<CartridgeDefinitionBean>();
+	private static List<CartridgeBean> getAvailableCartridgesByProvider(String provider, ConfigurationContext configurationContext) throws RestAPIException {
+		List<CartridgeBean> cartridges = new ArrayList<CartridgeBean>();
 
 		if (log.isDebugEnabled()) {
 			log.debug("Reading cartridges: [provider-name] " + provider );
@@ -214,7 +218,7 @@ public class StratosApiV41Utils {
 						continue;
 					}
 
-                    CartridgeDefinitionBean cartridge = convertCartridgeToCartridgeDefinitionBean(cartridgeInfo);
+                    CartridgeBean cartridge = convertCartridgeToCartridgeDefinitionBean(cartridgeInfo);
 					cartridges.add(cartridge);
 				}
 			} else {
@@ -243,8 +247,8 @@ public class StratosApiV41Utils {
 		return cartridges;
     }
 
-    public static List<CartridgeDefinitionBean> getAvailableCartridges(String cartridgeSearchString, Boolean multiTenant, ConfigurationContext configurationContext) throws RestAPIException {
-        List<CartridgeDefinitionBean> cartridges = new ArrayList<CartridgeDefinitionBean>();
+    public static List<CartridgeBean> getAvailableCartridges(String cartridgeSearchString, Boolean multiTenant, ConfigurationContext configurationContext) throws RestAPIException {
+        List<CartridgeBean> cartridges = new ArrayList<CartridgeBean>();
 
         if (log.isDebugEnabled()) {
             log.debug("Getting available cartridges. Search String: " + cartridgeSearchString + ", Multi-Tenant: " + multiTenant);
@@ -289,7 +293,7 @@ public class StratosApiV41Utils {
                         continue;
                     }
 
-                    CartridgeDefinitionBean cartridge = convertCartridgeToCartridgeDefinitionBean(cartridgeInfo);
+                    CartridgeBean cartridge = convertCartridgeToCartridgeDefinitionBean(cartridgeInfo);
                     cartridges.add(cartridge);
 
 
@@ -326,7 +330,7 @@ public class StratosApiV41Utils {
         return cartridges;
     }
 
-    public static CartridgeDefinitionBean getCartridge(String cartridgeType) throws RestAPIException {
+    public static CartridgeBean getCartridge(String cartridgeType) throws RestAPIException {
         try {
             CartridgeInfo cartridgeInfo = CloudControllerServiceClient.getInstance().getCartridgeInfo(cartridgeType);
             if(cartridgeInfo == null) {
@@ -344,8 +348,8 @@ public class StratosApiV41Utils {
         }
     }
 
-    private static CartridgeDefinitionBean convertCartridgeToCartridgeDefinitionBean(CartridgeInfo cartridgeInfo) {
-        CartridgeDefinitionBean cartridge = new CartridgeDefinitionBean();
+    private static CartridgeBean convertCartridgeToCartridgeDefinitionBean(CartridgeInfo cartridgeInfo) {
+        CartridgeBean cartridge = new CartridgeBean();
         cartridge.setType(cartridgeInfo.getType());
         cartridge.setProvider(cartridgeInfo.getProvider());
         cartridge.setCategory(cartridgeInfo.getCategory());
@@ -449,7 +453,7 @@ public class StratosApiV41Utils {
 
     // Util methods for Autoscaling policies
 
-    public static void addAutoscalingPolicy(AutoscalePolicy autoscalePolicyBean) throws RestAPIException {
+    public static void addAutoscalingPolicy(AutoscalePolicyBean autoscalePolicyBean) throws RestAPIException {
 
         log.info(String.format("Adding autoscaling policy: [id] %s", autoscalePolicyBean.getId()));
 
@@ -474,7 +478,7 @@ public class StratosApiV41Utils {
         }
     }
 
-    public static void updateAutoscalingPolicy(AutoscalePolicy autoscalePolicyBean) throws RestAPIException {
+    public static void updateAutoscalingPolicy(AutoscalePolicyBean autoscalePolicyBean) throws RestAPIException {
 
         log.info(String.format("Updating autoscaling policy: [id] %s", autoscalePolicyBean.getId()));
 
@@ -497,7 +501,7 @@ public class StratosApiV41Utils {
         }
     }
 
-    public static AutoscalePolicy[] getAutoScalePolicies() throws RestAPIException {
+    public static AutoscalePolicyBean[] getAutoScalePolicies() throws RestAPIException {
 
         org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy[] autoscalePolicies = null;
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
@@ -514,7 +518,7 @@ public class StratosApiV41Utils {
         return ObjectConverter.convertStubAutoscalePoliciesToAutoscalePolicies(autoscalePolicies);
     }
 
-    public static AutoscalePolicy getAutoScalePolicy(String autoscalePolicyId) throws RestAPIException {
+    public static AutoscalePolicyBean getAutoScalePolicy(String autoscalePolicyId) throws RestAPIException {
 
         org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy autoscalePolicy = null;
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
@@ -533,7 +537,7 @@ public class StratosApiV41Utils {
         return ObjectConverter.convertStubAutoscalePolicyToAutoscalePolicy(autoscalePolicy);
     }
 
-    public static org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy
+    public static DeploymentPolicyBean
         getDeploymentPolicy(String applicationId) throws RestAPIException {
 
         try {
@@ -547,7 +551,7 @@ public class StratosApiV41Utils {
         }
     }
 
-    public static ApplicationLevelNetworkPartition[] getPartitionGroups(String deploymentPolicyId)
+    public static ApplicationLevelNetworkPartitionBean[] getPartitionGroups(String deploymentPolicyId)
             throws RestAPIException {
 
         org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[] partitionGroups = null;
@@ -602,7 +606,7 @@ public class StratosApiV41Utils {
 
     // Util methods for repo actions
 
-    public static void notifyArtifactUpdatedEvent(Payload payload) throws RestAPIException {
+    public static void notifyArtifactUpdatedEvent(GitNotificationPayloadBean payload) throws RestAPIException {
         try {
             StratosManagerServiceClient serviceClient = StratosManagerServiceClient.getInstance();
             serviceClient.notifyArtifactUpdatedEventForRepository(payload.getRepository().getUrl());
@@ -615,7 +619,7 @@ public class StratosApiV41Utils {
 
     // Util methods for service groups
 
-    public static void addServiceGroup(ServiceGroupDefinition serviceGroupDefinition) throws RestAPIException {
+    public static void addServiceGroup(GroupBean serviceGroupDefinition) throws RestAPIException {
         try {
             if (serviceGroupDefinition == null) {
                 throw new RuntimeException("Service Group definition is null");
@@ -671,9 +675,9 @@ public class StratosApiV41Utils {
                     log.debug("checking subGroups in service group " + serviceGroupDefinition.getName());
                 }
 
-                List<ServiceGroupDefinition> groupDefinitions = serviceGroupDefinition.getGroups();
+                List<GroupBean> groupDefinitions = serviceGroupDefinition.getGroups();
                 List<String> groupNames = new ArrayList<String>();
-                for (ServiceGroupDefinition groupList : groupDefinitions) {
+                for (GroupBean groupList : groupDefinitions) {
                     groupNames.add(groupList.getName());
                 }
 
@@ -721,7 +725,7 @@ public class StratosApiV41Utils {
         return retVals;
     }
 
-    public static ServiceGroupDefinition getServiceGroupDefinition(String name) throws RestAPIException {
+    public static GroupBean getServiceGroupDefinition(String name) throws RestAPIException {
 
         if (log.isDebugEnabled()) {
             log.debug("Reading service group: [group-name] " + name);
@@ -734,7 +738,7 @@ public class StratosApiV41Utils {
                 return null;
             }
 
-            ServiceGroupDefinition serviceGroupDef = ObjectConverter.convertStubServiceGroupToServiceGroupDefinition(serviceGroup);
+            GroupBean serviceGroupDef = ObjectConverter.convertStubServiceGroupToServiceGroupDefinition(serviceGroup);
             return serviceGroupDef;
 
         } catch (Exception e) {
@@ -744,7 +748,7 @@ public class StratosApiV41Utils {
         }
     }
 
-    public static ServiceGroupDefinition[] getServiceGroupDefinitions() throws RestAPIException {
+    public static GroupBean[] getServiceGroupDefinitions() throws RestAPIException {
 
         if (log.isDebugEnabled()) {
             log.debug("Reading service groups...");
@@ -757,7 +761,7 @@ public class StratosApiV41Utils {
                 return null;
             }
 
-            ServiceGroupDefinition[] serviceGroupDefinitions = new ServiceGroupDefinition[serviceGroups.length];
+            GroupBean[] serviceGroupDefinitions = new GroupBean[serviceGroups.length];
             for (int i = 0; i < serviceGroups.length; i++) {
                 serviceGroupDefinitions[i] = ObjectConverter.convertStubServiceGroupToServiceGroupDefinition(serviceGroups[i]);
             }
@@ -795,7 +799,7 @@ public class StratosApiV41Utils {
      * @param tenantDomain
      * @throws RestAPIException
      */
-    public static void addApplication(ApplicationDefinition appDefinition, ConfigurationContext ctxt,
+    public static void addApplication(ApplicationBean appDefinition, ConfigurationContext ctxt,
                                                    String userName, String tenantDomain)
             throws RestAPIException {
 
@@ -843,7 +847,7 @@ public class StratosApiV41Utils {
      */
     public static void deployApplication(
             String applicationId,
-            org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy deploymentPolicy)
+            DeploymentPolicyBean deploymentPolicy)
             throws RestAPIException {
 
         try {
@@ -892,10 +896,6 @@ public class StratosApiV41Utils {
         }
     }
 
-    public static List<ApplicationSubscription> getApplicationSubscriptions(String applicationId) throws RestAPIException {
-        return null;
-    }
-
     public static void removeApplication(String applicationId) throws RestAPIException {
 
         try {
@@ -907,7 +907,7 @@ public class StratosApiV41Utils {
         }
     }
 
-    public static ApplicationDefinition getApplication(String applicationId) throws RestAPIException {
+    public static ApplicationBean getApplication(String applicationId) throws RestAPIException {
         try {
             return ObjectConverter.convertStubApplicationContextToApplicationDefinition(
                     AutoscalerServiceClient.getInstance().getApplication(applicationId));
@@ -918,14 +918,14 @@ public class StratosApiV41Utils {
         }
     }
 
-    public static List<ApplicationDefinition> getApplications() throws RestAPIException {
+    public static List<ApplicationBean> getApplications() throws RestAPIException {
         try {
-            List<ApplicationDefinition> applicationDefinitions = new ArrayList<ApplicationDefinition>();
+            List<ApplicationBean> applicationDefinitions = new ArrayList<ApplicationBean>();
             ApplicationContext[] applicationContexts = AutoscalerServiceClient.getInstance().getApplications();
             if(applicationContexts != null) {
                 for (ApplicationContext applicationContext : applicationContexts) {
                     if(applicationContext != null) {
-                        ApplicationDefinition applicationDefinition =
+                        ApplicationBean applicationDefinition =
                                 ObjectConverter.convertStubApplicationContextToApplicationDefinition(applicationContext);
                         applicationDefinitions.add(applicationDefinition);
                     }
@@ -1110,7 +1110,7 @@ public class StratosApiV41Utils {
 
     // Util methods for Kubernetes clusters
     
-    public static boolean addKubernetesCluster(KubernetesCluster kubernetesClusterBean) throws RestAPIException {
+    public static boolean addKubernetesCluster(KubernetesClusterBean kubernetesClusterBean) throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
@@ -1131,7 +1131,7 @@ public class StratosApiV41Utils {
         return false;
     }
 
-    public static boolean addKubernetesHost(String kubernetesClusterId, KubernetesHost kubernetesHostBean)
+    public static boolean addKubernetesHost(String kubernetesClusterId, KubernetesHostBean kubernetesHostBean)
             throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
@@ -1157,7 +1157,7 @@ public class StratosApiV41Utils {
         return false;
     }
 
-    public static boolean updateKubernetesMaster(KubernetesMaster kubernetesMasterBean) throws RestAPIException {
+    public static boolean updateKubernetesMaster(KubernetesMasterBean kubernetesMasterBean) throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
@@ -1182,7 +1182,7 @@ public class StratosApiV41Utils {
         return false;
     }
 
-    public static KubernetesCluster[] getAvailableKubernetesClusters() throws RestAPIException {
+    public static KubernetesClusterBean[] getAvailableKubernetesClusters() throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
@@ -1199,7 +1199,7 @@ public class StratosApiV41Utils {
         return null;
     }
 
-    public static KubernetesCluster getKubernetesCluster(String kubernetesClusterId) throws RestAPIException {
+    public static KubernetesClusterBean getKubernetesCluster(String kubernetesClusterId) throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
@@ -1258,7 +1258,7 @@ public class StratosApiV41Utils {
         return false;
     }
 
-    public static KubernetesHost[] getKubernetesHosts(String kubernetesClusterId) throws RestAPIException {
+    public static KubernetesHostBean[] getKubernetesHosts(String kubernetesClusterId) throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
@@ -1266,8 +1266,8 @@ public class StratosApiV41Utils {
                 org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[]
                         kubernetesHosts = cloudControllerServiceClient.getKubernetesHosts(kubernetesClusterId);
 
-                List<KubernetesHost> arrayList = ObjectConverter.convertStubKubernetesHostsToKubernetesHosts(kubernetesHosts);
-                KubernetesHost[] array = new KubernetesHost[arrayList.size()];
+                List<KubernetesHostBean> arrayList = ObjectConverter.convertStubKubernetesHostsToKubernetesHosts(kubernetesHosts);
+                KubernetesHostBean[] array = new KubernetesHostBean[arrayList.size()];
                 array = arrayList.toArray(array);
                 return array;
             } catch (RemoteException e) {
@@ -1282,7 +1282,7 @@ public class StratosApiV41Utils {
         return null;
     }
 
-    public static KubernetesMaster getKubernetesMaster(String kubernetesClusterId) throws RestAPIException {
+    public static KubernetesMasterBean getKubernetesMaster(String kubernetesClusterId) throws RestAPIException {
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
             try {
@@ -1302,7 +1302,7 @@ public class StratosApiV41Utils {
         return null;
     }
 
-    public static boolean updateKubernetesHost(KubernetesHost kubernetesHostBean) throws RestAPIException {
+    public static boolean updateKubernetesHost(KubernetesHostBean kubernetesHostBean) throws RestAPIException {
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
             org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost kubernetesHost =
@@ -1330,7 +1330,7 @@ public class StratosApiV41Utils {
             throw new RestAPIException("Application id is null");
         }
 
-        ApplicationDefinition application = getApplication(applicationId);
+        ApplicationBean application = getApplication(applicationId);
         if(application == null) {
             throw new RestAPIException("Application does not exist: [application-id] " + applicationId);
         }
@@ -1389,7 +1389,7 @@ public class StratosApiV41Utils {
             throw new RestAPIException("Application id is null");
         }
 
-        ApplicationDefinition application = getApplication(applicationId);
+        ApplicationBean application = getApplication(applicationId);
         if(application == null) {
             throw new RestAPIException("Application does not exist: [application-id] " + applicationId);
         }
@@ -1420,7 +1420,7 @@ public class StratosApiV41Utils {
             throw new RestAPIException("Application id is null");
         }
 
-        ApplicationDefinition application = getApplication(applicationId);
+        ApplicationBean application = getApplication(applicationId);
         if(application == null) {
             throw new RestAPIException("Application does not exist: [application-id] " + applicationId);
         }
@@ -1452,7 +1452,7 @@ public class StratosApiV41Utils {
             throw new RestAPIException("Application id is null");
         }
 
-        ApplicationDefinition application = getApplication(applicationId);
+        ApplicationBean application = getApplication(applicationId);
         if(application == null) {
             throw new RestAPIException("Application does not exist: [application-id] " + applicationId);
         }


[5/8] stratos git commit: Cleaning rest api bean classes

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/AutoscalePolicyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/AutoscalePolicyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/AutoscalePolicyBean.java
new file mode 100644
index 0000000..e18c34c
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/AutoscalePolicyBean.java
@@ -0,0 +1,82 @@
+/*
+ * 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.policy.autoscale;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class AutoscalePolicyBean {
+
+    private String id;
+    private String displayName;
+    private String description;
+    private LoadThresholdsBean loadThresholds;
+    private boolean isPublic;
+    private float instanceRoundingFactor;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    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 LoadThresholdsBean getLoadThresholds() {
+        return loadThresholds;
+    }
+
+    public void setLoadThresholds(LoadThresholdsBean loadThresholds) {
+        this.loadThresholds = loadThresholds;
+    }
+
+    public float getInstanceRoundingFactor() {
+        return instanceRoundingFactor;
+    }
+
+    public void setInstanceRoundingFactor(float instanceRoundingFactor) {
+        this.instanceRoundingFactor = instanceRoundingFactor;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/LoadAverageThresholdsBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/LoadAverageThresholdsBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/LoadAverageThresholdsBean.java
new file mode 100644
index 0000000..8ea73e5
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/LoadAverageThresholdsBean.java
@@ -0,0 +1,36 @@
+/*
+ * 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.policy.autoscale;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class LoadAverageThresholdsBean {
+
+	private float threshold;
+
+    public float getThreshold() {
+        return threshold;
+    }
+
+    public void setThreshold(float threshold) {
+        this.threshold = threshold;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/LoadThresholdsBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/LoadThresholdsBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/LoadThresholdsBean.java
new file mode 100644
index 0000000..903114d
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/LoadThresholdsBean.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.policy.autoscale;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class LoadThresholdsBean {
+
+	private RequestsInFlightThresholdsBean requestsInFlight;
+	private MemoryConsumptionThresholdsBean memoryConsumption;
+	private LoadAverageThresholdsBean loadAverage;
+
+	public RequestsInFlightThresholdsBean getRequestsInFlight() {
+		return requestsInFlight;
+	}
+
+	public void setRequestsInFlight(RequestsInFlightThresholdsBean requestsInFlight) {
+		this.requestsInFlight = requestsInFlight;
+	}
+
+	public MemoryConsumptionThresholdsBean getMemoryConsumption() {
+		return memoryConsumption;
+	}
+
+	public void setMemoryConsumption(MemoryConsumptionThresholdsBean memoryConsumption) {
+		this.memoryConsumption = memoryConsumption;
+	}
+
+	public LoadAverageThresholdsBean getLoadAverage() {
+		return loadAverage;
+	}
+
+	public void setLoadAverage(LoadAverageThresholdsBean loadAverage) {
+		this.loadAverage = loadAverage;
+	}
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/MemoryConsumptionThresholdsBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/MemoryConsumptionThresholdsBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/MemoryConsumptionThresholdsBean.java
new file mode 100644
index 0000000..d216854
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/MemoryConsumptionThresholdsBean.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.common.beans.policy.autoscale;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class MemoryConsumptionThresholdsBean {
+
+	private float threshold;
+
+    public float getThreshold() {
+        return threshold;
+    }
+
+    public void setThreshold(float threshold) {
+        this.threshold = threshold;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/RequestsInFlightThresholdsBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/RequestsInFlightThresholdsBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/RequestsInFlightThresholdsBean.java
new file mode 100644
index 0000000..55f33ab
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/autoscale/RequestsInFlightThresholdsBean.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.common.beans.policy.autoscale;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class RequestsInFlightThresholdsBean {
+
+    private float threshold;
+
+    public float getThreshold() {
+        return threshold;
+    }
+
+    public void setThreshold(float threshold) {
+        this.threshold = threshold;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java
new file mode 100644
index 0000000..bb0d3d8
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java
@@ -0,0 +1,38 @@
+/*
+ * 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.policy.deployment;
+
+import org.apache.stratos.common.beans.partition.ApplicationLevelNetworkPartitionBean;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class ApplicationPolicyBean {
+
+    private List<ApplicationLevelNetworkPartitionBean> networkPartition;
+
+    public List<ApplicationLevelNetworkPartitionBean> getNetworkPartition() {
+        return networkPartition;
+    }
+
+    public void setNetworkPartition(List<ApplicationLevelNetworkPartitionBean> networkPartition) {
+        this.networkPartition = networkPartition;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ChildPolicyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ChildPolicyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ChildPolicyBean.java
new file mode 100644
index 0000000..b022b4c
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ChildPolicyBean.java
@@ -0,0 +1,47 @@
+/*
+ * 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.policy.deployment;
+
+import org.apache.stratos.common.beans.partition.ChildLevelNetworkPartitionBean;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class ChildPolicyBean {
+
+    private String alias;
+    private List<ChildLevelNetworkPartitionBean> networkPartition;
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public void setAlias(String alias) {
+        this.alias = alias;
+    }
+
+    public List<ChildLevelNetworkPartitionBean> getNetworkPartition() {
+        return networkPartition;
+    }
+
+    public void setNetworkPartition(List<ChildLevelNetworkPartitionBean> networkPartition) {
+        this.networkPartition = networkPartition;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/DeploymentPolicyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/DeploymentPolicyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/DeploymentPolicyBean.java
new file mode 100644
index 0000000..6598d4e
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/DeploymentPolicyBean.java
@@ -0,0 +1,78 @@
+/*
+ * 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.policy.deployment;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class DeploymentPolicyBean {
+
+    private String applicationId;
+    private String description;
+    private boolean isPublic;
+    private ApplicationPolicyBean applicationPolicy;
+    private List<ChildPolicyBean> childPolicies;
+
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+
+    public boolean getIsPublic() {
+        return isPublic();
+    }
+
+    public boolean isPublic() {
+        return isPublic;
+    }
+
+    public void setPublic(boolean isPublic) {
+        this.isPublic = isPublic;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public ApplicationPolicyBean getApplicationPolicy() {
+        return applicationPolicy;
+    }
+
+    public void setApplicationPolicy(ApplicationPolicyBean applicationPolicy) {
+        this.applicationPolicy = applicationPolicy;
+    }
+
+    public List<ChildPolicyBean> getChildPolicies() {
+        return childPolicies;
+    }
+
+    public void setChildPolicies(List<ChildPolicyBean> childPolicies) {
+        this.childPolicies = childPolicies;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/repositoryNotificationInfoBean/Payload.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/repositoryNotificationInfoBean/Payload.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/repositoryNotificationInfoBean/Payload.java
deleted file mode 100644
index a724a7e..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/repositoryNotificationInfoBean/Payload.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.common.beans.repositoryNotificationInfoBean;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "payload")
-public class Payload {
-
-    private Repository repository;
-
-    public Repository getRepository() {
-        return repository;
-    }
-
-    public void setRepository(Repository repository) {
-        this.repository = repository;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/repositoryNotificationInfoBean/Repository.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/repositoryNotificationInfoBean/Repository.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/repositoryNotificationInfoBean/Repository.java
deleted file mode 100644
index 0d88195..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/repositoryNotificationInfoBean/Repository.java
+++ /dev/null
@@ -1,44 +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.common.beans.repositoryNotificationInfoBean;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "repository")
-public class Repository {
-
-    private String url;
-    private String description;
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/subscription/domain/SubscriptionDomainBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/subscription/domain/SubscriptionDomainBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/subscription/domain/SubscriptionDomainBean.java
deleted file mode 100644
index cd3aa46..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/subscription/domain/SubscriptionDomainBean.java
+++ /dev/null
@@ -1,45 +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.common.beans.subscription.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "domains")
-public class SubscriptionDomainBean {
-
-    private String domainName;
-    private String applicationContext;
-
-    public String getDomainName() {
-        return domainName;
-    }
-
-    public void setDomainName(String domainName) {
-        this.domainName = domainName;
-    }
-
-    public String getApplicationContext() {
-        return applicationContext;
-    }
-
-    public void setApplicationContext(String applicationContext) {
-        this.applicationContext = applicationContext;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Cluster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Cluster.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Cluster.java
deleted file mode 100644
index d309432..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Cluster.java
+++ /dev/null
@@ -1,118 +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.common.beans.topology;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
-
-import java.util.List;
-
-@XmlRootElement(name="clusters")
-public class Cluster {
-
-    private String alias;
-	private String serviceName;
-    private String clusterId;
-    private List<Member> member;
-    private String tenantRange;
-    private List<String> hostNames;
-    private boolean isLbCluster;
-    private List<PropertyBean> property;
-    private List<Instance> instances;    
-    
-    public List<Instance> getInstances() {
-		return instances;
-	}
-
-	public void setInstances(List<Instance> instances) {
-		this.instances = instances;
-	}
-
-	@Override
-    public String toString() {
-        return "Cluster [serviceName=" + getServiceName() + ", clusterId=" + getClusterId() + ", member=" + getMember()
-                + ", tenantRange=" + getTenantRange() + ", hostNames=" + getHostNames() + ", isLbCluster=" + isLbCluster()
-                + ", property=" + getProperty() + "]";
-    }
-
-
-    public String getAlias() {
-        return alias;
-    }
-
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public void setServiceName(String serviceName) {
-        this.serviceName = serviceName;
-    }
-
-    public String getClusterId() {
-        return clusterId;
-    }
-
-    public void setClusterId(String clusterId) {
-        this.clusterId = clusterId;
-    }
-
-    public List<Member> getMember() {
-        return member;
-    }
-
-    public void setMember(List<Member> member) {
-        this.member = member;
-    }
-
-    public String getTenantRange() {
-        return tenantRange;
-    }
-
-    public void setTenantRange(String tenantRange) {
-        this.tenantRange = tenantRange;
-    }
-
-    public List<String> getHostNames() {
-        return hostNames;
-    }
-
-    public void setHostNames(List<String> hostNames) {
-        this.hostNames = hostNames;
-    }
-
-    public boolean isLbCluster() {
-        return isLbCluster;
-    }
-
-    public void setLbCluster(boolean isLbCluster) {
-        this.isLbCluster = isLbCluster;
-    }
-
-    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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/ClusterBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/ClusterBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/ClusterBean.java
new file mode 100644
index 0000000..e883c52
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/ClusterBean.java
@@ -0,0 +1,118 @@
+/**
+ *  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.topology;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import org.apache.stratos.common.beans.cartridge.PropertyBean;
+
+import java.util.List;
+
+@XmlRootElement(name="clusters")
+public class ClusterBean {
+
+    private String alias;
+	private String serviceName;
+    private String clusterId;
+    private List<MemberBean> member;
+    private String tenantRange;
+    private List<String> hostNames;
+    private boolean isLbCluster;
+    private List<PropertyBean> property;
+    private List<InstanceBean> instances;
+    
+    public List<InstanceBean> getInstances() {
+		return instances;
+	}
+
+	public void setInstances(List<InstanceBean> instances) {
+		this.instances = instances;
+	}
+
+	@Override
+    public String toString() {
+        return "Cluster [serviceName=" + getServiceName() + ", clusterId=" + getClusterId() + ", member=" + getMember()
+                + ", tenantRange=" + getTenantRange() + ", hostNames=" + getHostNames() + ", isLbCluster=" + isLbCluster()
+                + ", property=" + getProperty() + "]";
+    }
+
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public void setAlias(String alias) {
+        this.alias = alias;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public void setClusterId(String clusterId) {
+        this.clusterId = clusterId;
+    }
+
+    public List<MemberBean> getMember() {
+        return member;
+    }
+
+    public void setMember(List<MemberBean> member) {
+        this.member = member;
+    }
+
+    public String getTenantRange() {
+        return tenantRange;
+    }
+
+    public void setTenantRange(String tenantRange) {
+        this.tenantRange = tenantRange;
+    }
+
+    public List<String> getHostNames() {
+        return hostNames;
+    }
+
+    public void setHostNames(List<String> hostNames) {
+        this.hostNames = hostNames;
+    }
+
+    public boolean isLbCluster() {
+        return isLbCluster;
+    }
+
+    public void setLbCluster(boolean isLbCluster) {
+        this.isLbCluster = isLbCluster;
+    }
+
+    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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/ClusterInstanceBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/ClusterInstanceBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/ClusterInstanceBean.java
index 93e5ae6..27e65ac 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/ClusterInstanceBean.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/ClusterInstanceBean.java
@@ -31,7 +31,7 @@ public class ClusterInstanceBean implements Serializable {
     private String alias;
     private String serviceName;
     private String clusterId;
-    private List<Member> member;
+    private List<MemberBean> member;
     private String tenantRange;
     private List<String> hostNames;
 
@@ -75,11 +75,11 @@ public class ClusterInstanceBean implements Serializable {
         this.clusterId = clusterId;
     }
 
-    public List<Member> getMember() {
+    public List<MemberBean> getMember() {
         return member;
     }
 
-    public void setMember(List<Member> member) {
+    public void setMember(List<MemberBean> member) {
         this.member = member;
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Instance.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Instance.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Instance.java
deleted file mode 100644
index 9c76b1c..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Instance.java
+++ /dev/null
@@ -1,44 +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.common.beans.topology;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class Instance {
-
-	private String status;
-	private String instanceId;
-
-	public String getStatus() {
-		return status;
-	}
-
-	public void setStatus(String status) {
-		this.status = status;
-	}
-
-	public String getInstanceId() {
-		return instanceId;
-	}
-
-	public void setInstanceId(String instanceId) {
-		this.instanceId = instanceId;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/InstanceBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/InstanceBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/InstanceBean.java
new file mode 100644
index 0000000..dfc4a8d
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/InstanceBean.java
@@ -0,0 +1,44 @@
+/*
+ * 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.topology;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class InstanceBean {
+
+	private String status;
+	private String instanceId;
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public String getInstanceId() {
+		return instanceId;
+	}
+
+	public void setInstanceId(String instanceId) {
+		this.instanceId = instanceId;
+	}
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Member.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Member.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Member.java
deleted file mode 100644
index d0b9dae..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Member.java
+++ /dev/null
@@ -1,162 +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.common.beans.topology;
-
-import java.util.List;
-import javax.xml.bind.annotation.XmlRootElement;
-import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
-
-@XmlRootElement
-public class Member {
-
-    private String serviceName;
-    private String clusterId;
-    private String clusterInstanceId;
-    private String networkPartitionId;
-    private String partitionId;
-    private String memberId;
-    private String status;
-    private String defaultPrivateIP;
-    private List<String> memberPrivateIPs;
-    private String lbClusterId;
-    private String defaultPublicIP;
-    private List<String> memberPublicIPs;
-    private List<PropertyBean> property;
-
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public void setServiceName(String serviceName) {
-        this.serviceName = serviceName;
-    }
-
-    public String getClusterId() {
-        return clusterId;
-    }
-
-    public void setClusterId(String clusterId) {
-        this.clusterId = clusterId;
-    }
-
-    public String getNetworkPartitionId() {
-        return networkPartitionId;
-    }
-
-    public void setNetworkPartitionId(String networkPartitionId) {
-        this.networkPartitionId = networkPartitionId;
-    }
-
-    public String getPartitionId() {
-        return partitionId;
-    }
-
-    public void setPartitionId(String partitionId) {
-        this.partitionId = partitionId;
-    }
-
-    public String getMemberId() {
-        return memberId;
-    }
-
-    public void setMemberId(String memberId) {
-        this.memberId = memberId;
-    }
-    
-    public List<String> getMemberPrivateIPs() {
-		return memberPrivateIPs;
-	}
-
-	public void setMemberPrivateIPs(List<String> memberPrivateIPs) {
-		this.memberPrivateIPs = memberPrivateIPs;
-	}
-
-	public List<String> getMemberPublicIPs() {
-		return memberPublicIPs;
-	}
-
-	public void setMemberPublicIPs(List<String> memberPublicIPs) {
-		this.memberPublicIPs = memberPublicIPs;
-	}
-
-	public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getDefaultPrivateIP() {
-        return defaultPrivateIP;
-    }
-
-    public void setDefaultPrivateIP(String defaultPrivateIP) {
-        this.defaultPrivateIP = defaultPrivateIP;
-    }
-
-    public String getLbClusterId() {
-        return lbClusterId;
-    }
-
-    public void setLbClusterId(String lbClusterId) {
-        this.lbClusterId = lbClusterId;
-    }
-
-    public String getDefaultPublicIP() {
-        return defaultPublicIP;
-    }
-
-    public void setDefaultPublicIP(String defaultPublicIP) {
-        this.defaultPublicIP = defaultPublicIP;
-    }
-
-    public List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-
-    public String getClusterInstanceId() {
-        return clusterInstanceId;
-    }
-
-    public void setClusterInstanceId(String clusterInstanceId) {
-        this.clusterInstanceId = clusterInstanceId;
-    }
-
-    @Override
-    public String toString() {
-        return "Member [serviceName=" + getServiceName()
-                + ", clusterId=" + getClusterId()
-                + ", memberId=" + getMemberId()
-                + ", clusterInstanceId=" + getClusterInstanceId()
-                + ", networkPartitionId=" + getNetworkPartitionId()
-                + ", partitionId=" + getPartitionId()
-                + ", status=" + getStatus()
-                + ", defaultPrivateIP=" + getDefaultPrivateIP()
-                + ", memberPrivateIPs=" + memberPrivateIPs.toString()
-                + ", defaultPublicIP=" + getDefaultPublicIP()
-                + ", memberPublicIPs=" + memberPublicIPs.toString()
-                + ", lbClusterId=" + getLbClusterId()
-                + ", property=" + getProperty() + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/MemberBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/MemberBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/MemberBean.java
new file mode 100644
index 0000000..df76cf8
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/MemberBean.java
@@ -0,0 +1,162 @@
+/**
+ *  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.topology;
+
+import java.util.List;
+import javax.xml.bind.annotation.XmlRootElement;
+import org.apache.stratos.common.beans.cartridge.PropertyBean;
+
+@XmlRootElement
+public class MemberBean {
+
+    private String serviceName;
+    private String clusterId;
+    private String clusterInstanceId;
+    private String networkPartitionId;
+    private String partitionId;
+    private String memberId;
+    private String status;
+    private String defaultPrivateIP;
+    private List<String> memberPrivateIPs;
+    private String lbClusterId;
+    private String defaultPublicIP;
+    private List<String> memberPublicIPs;
+    private List<PropertyBean> property;
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public void setClusterId(String clusterId) {
+        this.clusterId = clusterId;
+    }
+
+    public String getNetworkPartitionId() {
+        return networkPartitionId;
+    }
+
+    public void setNetworkPartitionId(String networkPartitionId) {
+        this.networkPartitionId = networkPartitionId;
+    }
+
+    public String getPartitionId() {
+        return partitionId;
+    }
+
+    public void setPartitionId(String partitionId) {
+        this.partitionId = partitionId;
+    }
+
+    public String getMemberId() {
+        return memberId;
+    }
+
+    public void setMemberId(String memberId) {
+        this.memberId = memberId;
+    }
+    
+    public List<String> getMemberPrivateIPs() {
+		return memberPrivateIPs;
+	}
+
+	public void setMemberPrivateIPs(List<String> memberPrivateIPs) {
+		this.memberPrivateIPs = memberPrivateIPs;
+	}
+
+	public List<String> getMemberPublicIPs() {
+		return memberPublicIPs;
+	}
+
+	public void setMemberPublicIPs(List<String> memberPublicIPs) {
+		this.memberPublicIPs = memberPublicIPs;
+	}
+
+	public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getDefaultPrivateIP() {
+        return defaultPrivateIP;
+    }
+
+    public void setDefaultPrivateIP(String defaultPrivateIP) {
+        this.defaultPrivateIP = defaultPrivateIP;
+    }
+
+    public String getLbClusterId() {
+        return lbClusterId;
+    }
+
+    public void setLbClusterId(String lbClusterId) {
+        this.lbClusterId = lbClusterId;
+    }
+
+    public String getDefaultPublicIP() {
+        return defaultPublicIP;
+    }
+
+    public void setDefaultPublicIP(String defaultPublicIP) {
+        this.defaultPublicIP = defaultPublicIP;
+    }
+
+    public List<PropertyBean> getProperty() {
+        return property;
+    }
+
+    public void setProperty(List<PropertyBean> property) {
+        this.property = property;
+    }
+
+    public String getClusterInstanceId() {
+        return clusterInstanceId;
+    }
+
+    public void setClusterInstanceId(String clusterInstanceId) {
+        this.clusterInstanceId = clusterInstanceId;
+    }
+
+    @Override
+    public String toString() {
+        return "Member [serviceName=" + getServiceName()
+                + ", clusterId=" + getClusterId()
+                + ", memberId=" + getMemberId()
+                + ", clusterInstanceId=" + getClusterInstanceId()
+                + ", networkPartitionId=" + getNetworkPartitionId()
+                + ", partitionId=" + getPartitionId()
+                + ", status=" + getStatus()
+                + ", defaultPrivateIP=" + getDefaultPrivateIP()
+                + ", memberPrivateIPs=" + memberPrivateIPs.toString()
+                + ", defaultPublicIP=" + getDefaultPublicIP()
+                + ", memberPublicIPs=" + memberPublicIPs.toString()
+                + ", lbClusterId=" + getLbClusterId()
+                + ", property=" + getProperty() + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/domain/NameValuePair.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/domain/NameValuePair.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/domain/NameValuePair.java
new file mode 100644
index 0000000..be67377
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/domain/NameValuePair.java
@@ -0,0 +1,50 @@
+/*
+ * 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.domain;
+
+import java.io.Serializable;
+
+/**
+ * Name value pair.
+ */
+public class NameValuePair implements Serializable {
+
+    private static final long serialVersionUID = 6783497955930623020L;
+
+    private final String name;
+    private String value;
+
+    public NameValuePair(String name, String value) {
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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 ad71d8f..795bf75 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
@@ -20,38 +20,34 @@ package org.apache.stratos.rest.endpoint.api;
 
 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.beans.ApiResponseBean;
+import org.apache.stratos.common.beans.artifact.repository.GitNotificationPayloadBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeBean;
+import org.apache.stratos.common.beans.partition.ApplicationLevelNetworkPartitionBean;
+import org.apache.stratos.common.beans.partition.PartitionBean;
+import org.apache.stratos.common.beans.policy.autoscale.AutoscalePolicyBean;
+import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
 import org.apache.stratos.common.util.ClaimsMgtUtil;
 import org.apache.stratos.common.util.CommonUtil;
-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;
 import org.apache.stratos.rest.endpoint.annotation.SuperTenantService;
-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;
-import org.apache.stratos.common.beans.autoscaler.partition.Partition;
-import org.apache.stratos.common.beans.autoscaler.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy;
-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.rest.endpoint.exception.RestAPIException;
-import org.wso2.carbon.tenant.mgt.core.TenantPersistor;
-import org.wso2.carbon.tenant.mgt.util.TenantMgtUtil;
 import org.wso2.carbon.context.PrivilegedCarbonContext;
 import org.wso2.carbon.context.RegistryType;
 import org.wso2.carbon.registry.core.exceptions.RegistryException;
 import org.wso2.carbon.registry.core.session.UserRegistry;
+import org.wso2.carbon.stratos.common.beans.TenantInfoBean;
+import org.wso2.carbon.stratos.common.exception.StratosException;
+import org.wso2.carbon.tenant.mgt.core.TenantPersistor;
+import org.wso2.carbon.tenant.mgt.util.TenantMgtUtil;
 import org.wso2.carbon.user.api.UserRealm;
 import org.wso2.carbon.user.api.UserStoreManager;
 import org.wso2.carbon.user.core.UserStoreException;
 import org.wso2.carbon.user.core.tenant.Tenant;
 import org.wso2.carbon.user.core.tenant.TenantManager;
 import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
-import org.wso2.carbon.stratos.common.exception.StratosException;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
@@ -76,10 +72,10 @@ public class StratosApiV40 extends AbstractApi {
     @POST
     @Path("/init")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public StratosApiResponse initialize ()
+    public ApiResponseBean initialize ()
             throws RestAPIException {
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully logged in");
         return stratosApiResponse;
     }
@@ -112,7 +108,7 @@ public class StratosApiV40 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deployCartridgeDefinition(CartridgeDefinitionBean cartridgeDefinitionBean)
+    public ApiResponseBean deployCartridgeBeanDefinition(CartridgeBean cartridgeDefinitionBean)
             throws RestAPIException {
 
         return StratosApiV40Utils.deployCartridge(cartridgeDefinitionBean, getConfigContext(), getUsername(),
@@ -126,7 +122,7 @@ public class StratosApiV40 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse unDeployCartridgeDefinition (@PathParam("cartridgeType") String cartridgeType) throws RestAPIException {
+    public ApiResponseBean unDeployCartridgeBeanDefinition (@PathParam("cartridgeType") String cartridgeType) throws RestAPIException {
 
         return StratosApiV40Utils.undeployCartridge(cartridgeType);
     }
@@ -137,7 +133,7 @@ public class StratosApiV40 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deployPartition (Partition partition)
+    public ApiResponseBean deployPartition (PartitionBean partition)
             throws RestAPIException {
 
         return StratosApiV40Utils.deployPartition(partition);
@@ -149,7 +145,7 @@ public class StratosApiV40 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deployAutoscalingPolicyDefintion (AutoscalePolicy autoscalePolicy)
+    public ApiResponseBean deployAutoscalingPolicyDefintion (AutoscalePolicyBean autoscalePolicy)
             throws RestAPIException {
 
         return StratosApiV40Utils.deployAutoscalingPolicy(autoscalePolicy);
@@ -161,7 +157,7 @@ public class StratosApiV40 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public Response deployDeploymentPolicyDefinition(DeploymentPolicy deploymentPolicy)
+    public Response deployDeploymentPolicyDefinition(DeploymentPolicyBean deploymentPolicy)
             throws RestAPIException {
         // Not supported in 4.1.0
         return Response.status(Response.Status.GONE).build();
@@ -182,7 +178,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Partition getPartition (@PathParam("partitionId") String partitionId) throws RestAPIException {
+    public PartitionBean getPartition (@PathParam("partitionId") String partitionId) throws RestAPIException {
 
         return StratosApiV40Utils.getPartition(partitionId);
     }
@@ -192,7 +188,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public ApplicationLevelNetworkPartition[] getPartitionGroups (@PathParam("deploymentPolicyId") String deploymentPolicyId)
+    public ApplicationLevelNetworkPartitionBean[] getPartitionGroups (@PathParam("deploymentPolicyId") String deploymentPolicyId)
             throws RestAPIException {
 
         return StratosApiV40Utils.getPartitionGroups(deploymentPolicyId);
@@ -203,7 +199,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Partition [] getPartitions (@PathParam("deploymentPolicyId") String deploymentPolicyId,
+    public PartitionBean[] getPartitions (@PathParam("deploymentPolicyId") String deploymentPolicyId,
                                        @PathParam("partitionGroupId") String partitionGroupId) throws RestAPIException {
 
         return StratosApiV40Utils.getPartitionsOfGroup(deploymentPolicyId, partitionGroupId);
@@ -214,7 +210,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Partition [] getPartitionsOfPolicy (@PathParam("deploymentPolicyId") String deploymentPolicyId)
+    public PartitionBean[] getPartitionsOfPolicy (@PathParam("deploymentPolicyId") String deploymentPolicyId)
             throws RestAPIException {
 
         return StratosApiV40Utils.getPartitionsOfDeploymentPolicy(deploymentPolicyId);
@@ -225,7 +221,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public AutoscalePolicy[] getAutoscalePolicies () throws RestAPIException {
+    public AutoscalePolicyBean[] getAutoscalePolicies () throws RestAPIException {
 
         return StratosApiV40Utils.getAutoScalePolicies();
     }
@@ -235,7 +231,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public AutoscalePolicy getAutoscalePolicies (@PathParam("autoscalePolicyId") String autoscalePolicyId)
+    public AutoscalePolicyBean getAutoscalePolicies (@PathParam("autoscalePolicyId") String autoscalePolicyId)
             throws RestAPIException {
 
         return StratosApiV40Utils.getAutoScalePolicy(autoscalePolicyId);
@@ -278,9 +274,9 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableMultiTenantCartridges() throws RestAPIException {
-        List<Cartridge> cartridges = StratosApiV40Utils.getAvailableCartridges(null, true, getConfigContext());
-        return cartridges.isEmpty() ? new Cartridge[0] : cartridges.toArray(new Cartridge[cartridges.size()]);
+    public CartridgeBean[] getAvailableMultiTenantCartridgeBeans() throws RestAPIException {
+        List<CartridgeBean> cartridges = StratosApiV40Utils.getAvailableCartridges(null, true, getConfigContext());
+        return cartridges.isEmpty() ? new CartridgeBean[0] : cartridges.toArray(new CartridgeBean[cartridges.size()]);
     }
 
     @GET
@@ -288,9 +284,9 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableSingleTenantCartridges() throws RestAPIException {
-        List<Cartridge> cartridges = StratosApiV40Utils.getAvailableCartridges(null, false, getConfigContext());
-        return cartridges.isEmpty() ? new Cartridge[0] : cartridges.toArray(new Cartridge[cartridges.size()]);
+    public CartridgeBean[] getAvailableSingleTenantCartridgeBeans() throws RestAPIException {
+        List<CartridgeBean> cartridges = StratosApiV40Utils.getAvailableCartridges(null, false, getConfigContext());
+        return cartridges.isEmpty() ? new CartridgeBean[0] : cartridges.toArray(new CartridgeBean[cartridges.size()]);
     }
 
     @GET
@@ -298,9 +294,9 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableCartridges() throws RestAPIException {
-        List<Cartridge> cartridges = StratosApiV40Utils.getAvailableCartridges(null, null, getConfigContext());
-        return cartridges.isEmpty() ? new Cartridge[0] : cartridges.toArray(new Cartridge[cartridges.size()]);
+    public CartridgeBean[] getAvailableCartridgeBeans() throws RestAPIException {
+        List<CartridgeBean> cartridges = StratosApiV40Utils.getAvailableCartridges(null, null, getConfigContext());
+        return cartridges.isEmpty() ? new CartridgeBean[0] : cartridges.toArray(new CartridgeBean[cartridges.size()]);
     }
 
     @GET
@@ -308,7 +304,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Response getSubscribedCartridges() throws RestAPIException {
+    public Response getSubscribedCartridgeBeans() throws RestAPIException {
         return Response.status(404).build();
     }
 
@@ -317,7 +313,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Response getSubscribedCartridgesForServiceGroup(@PathParam("serviceGroup") String serviceGroup) throws RestAPIException {
+    public Response getSubscribedCartridgeBeansForServiceGroup(@PathParam("serviceGroup") String serviceGroup) throws RestAPIException {
         return Response.status(404).build();
     }
 
@@ -326,7 +322,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Response getCartridgeInfo(@PathParam("subscriptionAlias") String subscriptionAlias) throws RestAPIException {
+    public Response getCartridgeBeanInfo(@PathParam("subscriptionAlias") String subscriptionAlias) throws RestAPIException {
         return Response.status(404).build();
     }
 
@@ -335,7 +331,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge getAvailableSingleTenantCartridgeInfo(@PathParam("cartridgeType") String cartridgeType)
+    public CartridgeBean getAvailableSingleTenantCartridgeBeanInfo(@PathParam("cartridgeType") String cartridgeType)
             throws RestAPIException {
         return StratosApiV40Utils.getAvailableCartridgeInfo(cartridgeType, null, getConfigContext());
     }
@@ -345,7 +341,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public List<Cartridge> getAvailableLbCartridges()
+    public List<CartridgeBean> getAvailableLbCartridgeBeans()
             throws RestAPIException {
         return StratosApiV40Utils.getAvailableLbCartridges(false, getConfigContext());
     }
@@ -365,8 +361,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Response subscribe(CartridgeInfoBean cartridgeInfoBean) throws RestAPIException {
-
+    public Response subscribe(Object cartridgeInfoBean) throws RestAPIException {
         return Response.status(404).build();
     }
 
@@ -422,7 +417,7 @@ public class StratosApiV40 extends AbstractApi {
     @Path("/cartridge/unsubscribe")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public StratosApiResponse unsubscribe(String alias) throws RestAPIException {
+    public ApiResponseBean unsubscribe(String alias) throws RestAPIException {
 
         return StratosApiV40Utils.unsubscribe(alias, getTenantDomain());
 
@@ -434,7 +429,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse addTenant(TenantInfoBean tenantInfoBean) throws RestAPIException {
+    public ApiResponseBean addTenant(TenantInfoBean tenantInfoBean) throws RestAPIException {
         try {
             CommonUtil.validateEmail(tenantInfoBean.getEmail());
         } catch (Exception e) {
@@ -509,7 +504,7 @@ public class StratosApiV40 extends AbstractApi {
             throw new RestAPIException(msg);
         }
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully added new tenant with domain " + tenantInfoBean.getTenantDomain());
         return stratosApiResponse;
     }
@@ -519,7 +514,7 @@ public class StratosApiV40 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse updateTenant(TenantInfoBean tenantInfoBean) throws RestAPIException {
+    public ApiResponseBean updateTenant(TenantInfoBean tenantInfoBean) throws RestAPIException {
 
         try {
             return updateExistingTenant(tenantInfoBean);
@@ -530,7 +525,7 @@ public class StratosApiV40 extends AbstractApi {
         }
     }
 
-    private StratosApiResponse updateExistingTenant(TenantInfoBean tenantInfoBean) throws Exception {
+    private ApiResponseBean updateExistingTenant(TenantInfoBean tenantInfoBean) throws Exception {
 
         TenantManager tenantManager = ServiceHolder.getTenantManager();
         UserStoreManager userStoreManager;
@@ -650,7 +645,7 @@ public class StratosApiV40 extends AbstractApi {
             throw new Exception(msg, e);
         }
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully updated the tenant " + tenantDomain);
         return stratosApiResponse;
     }
@@ -721,7 +716,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deleteTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
+    public ApiResponseBean deleteTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
         TenantManager tenantManager = ServiceHolder.getTenantManager();
         int tenantId = 0;
         try {
@@ -745,7 +740,7 @@ public class StratosApiV40 extends AbstractApi {
             throw new RestAPIException(msg);
         }
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully deleted tenant " + tenantDomain);
         return stratosApiResponse;
     }
@@ -790,7 +785,7 @@ public class StratosApiV40 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse activateTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
+    public ApiResponseBean activateTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
         TenantManager tenantManager = ServiceHolder.getTenantManager();
         int tenantId;
         try {
@@ -806,7 +801,7 @@ public class StratosApiV40 extends AbstractApi {
             throw new RestAPIException( e);
         }
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
 
         try {
             TenantMgtUtil.activateTenant(tenantDomain, tenantManager, tenantId);
@@ -849,7 +844,7 @@ public class StratosApiV40 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deactivateTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
+    public ApiResponseBean deactivateTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
 
         TenantManager tenantManager = ServiceHolder.getTenantManager();
         int tenantId;
@@ -867,7 +862,7 @@ public class StratosApiV40 extends AbstractApi {
             throw new RestAPIException( e);
         }
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
 
         try {
             TenantMgtUtil.deactivateTenant(tenantDomain, tenantManager, tenantId);
@@ -894,7 +889,7 @@ public class StratosApiV40 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public Response deployService(ServiceDefinitionBean serviceDefinitionBean)
+    public Response deployService(Object serviceDefinitionBean)
             throws RestAPIException {
         return Response.status(404).build();
     }
@@ -943,7 +938,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public void getRepoNotification(Payload payload) throws RestAPIException {
+    public void getRepoNotification(GitNotificationPayloadBean payload) throws RestAPIException {
 
         StratosApiV40Utils.notifyArtifactUpdatedEvent(payload);
     }
@@ -952,11 +947,11 @@ public class StratosApiV40 extends AbstractApi {
     @Path("/cartridge/sync")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public StratosApiResponse synchronizeRepository(String alias) throws RestAPIException {
+    public ApiResponseBean synchronizeRepository(String alias) throws RestAPIException {
         if (log.isDebugEnabled()) {
             log.debug(String.format("Synchronizing Git repository for alias '%s'", alias));
         }
-//        CartridgeSubscription cartridgeSubscription = StratosApiV40Utils.getCartridgeSubscription(alias, getConfigContext());
+//        CartridgeBeanSubscription cartridgeSubscription = StratosApiV40Utils.getCartridgeBeanSubscription(alias, getConfigContext());
 //        if (cartridgeSubscription != null && cartridgeSubscription.getRepository() != null && log.isDebugEnabled()) {
 //            log.debug(String.format("Found subscription for '%s'. Git repository: %s", alias, cartridgeSubscription
 //                    .getRepository().getUrl()));
@@ -1010,10 +1005,9 @@ public class StratosApiV40 extends AbstractApi {
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     public Response addSubscriptionDomains(@PathParam("cartridgeType") String cartridgeType,
                                            @PathParam("subscriptionAlias") String subscriptionAlias,
-                                           SubscriptionDomainRequest request) throws RestAPIException {
+                                           Object request) throws RestAPIException {
 
-        StratosApiResponse stratosApiResponse = StratosApiV40Utils.addSubscriptionDomains(getConfigContext(), cartridgeType, subscriptionAlias, request);
-        return Response.ok().entity(stratosApiResponse).build();
+        throw new RestAPIException("Not implemented");
     }
 
     @GET
@@ -1051,10 +1045,10 @@ public class StratosApiV40 extends AbstractApi {
     @Path("/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domains/{domainName}")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public StratosApiResponse removeSubscriptionDomain(@PathParam("cartridgeType") String cartridgeType,
+    public ApiResponseBean removeSubscriptionDomain(@PathParam("cartridgeType") String cartridgeType,
                                                          @PathParam("subscriptionAlias") String subscriptionAlias,
                                                          @PathParam("domainName") String domainName) throws RestAPIException {
-        return StratosApiV40Utils.removeSubscriptionDomain(getConfigContext(), cartridgeType, subscriptionAlias, domainName);
+        throw new RestAPIException("Not implemented");
     }
 
     @GET


[8/8] stratos git commit: Cleaning rest api bean classes

Posted by im...@apache.org.
Cleaning rest api bean classes


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

Branch: refs/heads/master
Commit: 8bf5f9478a7a432002002c59e1af3e0ec781dbcc
Parents: 0456d48
Author: Imesh Gunaratne <im...@apache.org>
Authored: Sat Jan 10 20:49:10 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Sat Jan 10 20:49:11 2015 +0530

----------------------------------------------------------------------
 .../stratos/cli/RestCommandLineService.java     |  94 ++---
 .../cloud/controller/domain/MemberContext.java  |   2 +-
 .../iaases/kubernetes/KubernetesIaas.java       |   2 +-
 .../iaases/kubernetes/KubernetesIaasUtil.java   |   3 +-
 .../stratos/common/beans/ApiResponseBean.java   |  36 ++
 .../common/beans/ApplicationDefinition.java     | 104 ------
 .../common/beans/ApplicationSignUpBean.java     |  52 ---
 .../common/beans/ApplicationSubscription.java   |  64 ----
 .../common/beans/ArtifactRepositoryBean.java    |  72 ----
 .../apache/stratos/common/beans/Cartridge.java  | 329 ----------------
 .../common/beans/CartridgeDefinition.java       |  67 ----
 .../stratos/common/beans/CartridgeInfoBean.java | 164 --------
 .../common/beans/ComponentDefinition.java       |  40 --
 .../common/beans/DependencyDefinitions.java     |  59 ---
 .../org/apache/stratos/common/beans/Error.java  |  46 ---
 .../apache/stratos/common/beans/GroupBean.java  | 100 -----
 .../stratos/common/beans/NameValuePair.java     |  50 ---
 .../stratos/common/beans/Persistence.java       |  54 ---
 .../stratos/common/beans/PortMapping.java       |  69 ----
 .../common/beans/ServiceGroupDefinition.java    |  74 ----
 .../common/beans/StratosApiResponse.java        |  36 --
 .../stratos/common/beans/SubscribableInfo.java  | 104 ------
 .../common/beans/SubscriptionDomainRequest.java |  43 ---
 .../org/apache/stratos/common/beans/Volume.java | 126 -------
 .../application/ApplicationAliasesBean.java     |  64 ++++
 .../beans/application/ApplicationBean.java      | 106 ++++++
 .../common/beans/application/ComponentBean.java |  42 +++
 .../beans/application/DependencyBean.java       |  59 +++
 .../common/beans/application/GroupBean.java     |  74 ++++
 .../beans/application/GroupReferenceBean.java   |  97 +++++
 .../beans/application/SubscribableInfo.java     | 107 ++++++
 .../signup/ApplicationSignUpBean.java           |  54 +++
 .../repository/ArtifactRepositoryBean.java      |  72 ++++
 .../repository/GitNotificationPayloadBean.java  |  35 ++
 .../artifact/repository/GitRepositoryBean.java  |  44 +++
 .../ApplicationLevelNetworkPartition.java       |  64 ----
 .../partition/ChildLevelNetworkPartition.java   |  54 ---
 .../partition/ChildLevelPartition.java          |  44 ---
 .../beans/autoscaler/partition/Partition.java   |  88 -----
 .../policy/autoscale/AutoscalePolicy.java       |  82 ----
 .../policy/autoscale/LoadAverageThresholds.java |  36 --
 .../policy/autoscale/LoadThresholds.java        |  54 ---
 .../autoscale/MemoryConsumptionThresholds.java  |  37 --
 .../autoscale/RequestsInFlightThresholds.java   |  37 --
 .../policy/deployment/ApplicationPolicy.java    |  38 --
 .../policy/deployment/ChildPolicy.java          |  47 ---
 .../policy/deployment/DeploymentPolicy.java     |  78 ----
 .../common/beans/cartridge/CartridgeBean.java   | 253 +++++++++++++
 .../beans/cartridge/CartridgeReferenceBean.java |  69 ++++
 .../common/beans/cartridge/ContainerBean.java   |  38 ++
 .../common/beans/cartridge/DeploymentBean.java  |  61 +++
 .../beans/cartridge/FloatingNetworkBean.java    |  73 ++++
 .../beans/cartridge/IaasProviderBean.java       | 140 +++++++
 .../beans/cartridge/NetworkInterfaceBean.java   | 102 +++++
 .../common/beans/cartridge/PersistenceBean.java |  61 +++
 .../common/beans/cartridge/PortMappingBean.java |  58 +++
 .../common/beans/cartridge/PropertyBean.java    |  45 +++
 .../common/beans/cartridge/VolumeBean.java      |  95 +++++
 .../definition/CartridgeDefinitionBean.java     | 253 -------------
 .../cartridge/definition/ContainerBean.java     |  38 --
 .../cartridge/definition/DeploymentBean.java    |  61 ---
 .../definition/FloatingNetworkBean.java         |  73 ----
 .../cartridge/definition/IaasProviderBean.java  | 140 -------
 .../cartridge/definition/LoadBalancerBean.java  |  77 ----
 .../definition/NetworkInterfaceBean.java        | 102 -----
 .../cartridge/definition/PersistenceBean.java   |  61 ---
 .../cartridge/definition/PortMappingBean.java   |  58 ---
 .../cartridge/definition/PropertyBean.java      |  45 ---
 .../definition/ServiceDefinitionBean.java       |  85 -----
 .../beans/cartridge/definition/VolumeBean.java  |  95 -----
 .../beans/kubernetes/KubernetesCluster.java     |  84 -----
 .../beans/kubernetes/KubernetesClusterBean.java |  84 +++++
 .../common/beans/kubernetes/KubernetesHost.java |  68 ----
 .../beans/kubernetes/KubernetesHostBean.java    |  68 ++++
 .../beans/kubernetes/KubernetesMaster.java      |  77 ----
 .../beans/kubernetes/KubernetesMasterBean.java  |  77 ++++
 .../common/beans/kubernetes/PortRange.java      |  45 ---
 .../common/beans/kubernetes/PortRangeBean.java  |  45 +++
 .../common/beans/kubernetes/Properties.java     |  49 ---
 .../common/beans/kubernetes/PropertiesBean.java |  48 +++
 .../common/beans/kubernetes/Property.java       |  65 ----
 .../common/beans/kubernetes/PropertyBean.java   |  65 ++++
 .../ApplicationLevelNetworkPartitionBean.java   |  64 ++++
 .../ChildLevelNetworkPartitionBean.java         |  54 +++
 .../partition/ChildLevelPartitionBean.java      |  44 +++
 .../common/beans/partition/PartitionBean.java   |  88 +++++
 .../policy/autoscale/AutoscalePolicyBean.java   |  82 ++++
 .../autoscale/LoadAverageThresholdsBean.java    |  36 ++
 .../policy/autoscale/LoadThresholdsBean.java    |  54 +++
 .../MemoryConsumptionThresholdsBean.java        |  37 ++
 .../RequestsInFlightThresholdsBean.java         |  37 ++
 .../deployment/ApplicationPolicyBean.java       |  38 ++
 .../policy/deployment/ChildPolicyBean.java      |  47 +++
 .../policy/deployment/DeploymentPolicyBean.java |  78 ++++
 .../repositoryNotificationInfoBean/Payload.java |  35 --
 .../Repository.java                             |  44 ---
 .../domain/SubscriptionDomainBean.java          |  45 ---
 .../stratos/common/beans/topology/Cluster.java  | 118 ------
 .../common/beans/topology/ClusterBean.java      | 118 ++++++
 .../beans/topology/ClusterInstanceBean.java     |   6 +-
 .../stratos/common/beans/topology/Instance.java |  44 ---
 .../common/beans/topology/InstanceBean.java     |  44 +++
 .../stratos/common/beans/topology/Member.java   | 162 --------
 .../common/beans/topology/MemberBean.java       | 162 ++++++++
 .../stratos/common/domain/NameValuePair.java    |  50 +++
 .../rest/endpoint/api/StratosApiV40.java        | 124 +++----
 .../rest/endpoint/api/StratosApiV40Utils.java   | 200 +++-------
 .../rest/endpoint/api/StratosApiV41.java        | 111 +++---
 .../rest/endpoint/api/StratosApiV41Utils.java   | 132 +++----
 .../stratos/rest/endpoint/mock/MockContext.java | 364 +++++++-----------
 .../rest/endpoint/mock/StratosApiV40Mock.java   | 159 +++-----
 .../util/converter/ObjectConverter.java         | 372 ++++++++-----------
 .../src/main/resources/AutoScalerService.wsdl   | 254 ++++++-------
 .../main/resources/CloudControllerService.wsdl  |  62 ++--
 114 files changed, 3979 insertions(+), 5347 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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 5ba9d83..37895f8 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
@@ -34,17 +34,17 @@ import org.apache.stratos.cli.exception.ExceptionMapper;
 import org.apache.stratos.cli.utils.CliConstants;
 import org.apache.stratos.cli.utils.CliUtils;
 import org.apache.stratos.cli.utils.RowMapper;
-import org.apache.stratos.common.beans.GroupBean;
 import org.apache.stratos.common.beans.TenantInfoBean;
 import org.apache.stratos.common.beans.UserInfoBean;
-import org.apache.stratos.common.beans.autoscaler.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.common.beans.cartridge.definition.CartridgeDefinitionBean;
-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.common.beans.ApplicationDefinition;
+import org.apache.stratos.common.beans.application.GroupBean;
+import org.apache.stratos.common.beans.policy.autoscale.AutoscalePolicyBean;
+import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
+import org.apache.stratos.common.beans.cartridge.CartridgeBean;
+import org.apache.stratos.common.beans.cartridge.IaasProviderBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesClusterBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesHostBean;
+import org.apache.stratos.common.beans.topology.ClusterBean;
+import org.apache.stratos.common.beans.application.ApplicationBean;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -251,9 +251,9 @@ public class RestCommandLineService {
      */
     public void listCartridges() throws CommandException {
         try {
-            Type listType = new TypeToken<ArrayList<CartridgeDefinitionBean>>() {
+            Type listType = new TypeToken<ArrayList<CartridgeBean>>() {
             }.getType();
-            List<CartridgeDefinitionBean> cartridgeList = (List<CartridgeDefinitionBean>) restClient.listEntity(ENDPOINT_LIST_CARTRIDGES,
+            List<CartridgeBean> cartridgeList = (List<CartridgeBean>) restClient.listEntity(ENDPOINT_LIST_CARTRIDGES,
                     listType, "cartridges");
 
             if ((cartridgeList == null) || (cartridgeList.size() == 0)) {
@@ -261,8 +261,8 @@ public class RestCommandLineService {
                 return;
             }
 
-            RowMapper<CartridgeDefinitionBean> cartridgeMapper = new RowMapper<CartridgeDefinitionBean>() {
-                public String[] getData(CartridgeDefinitionBean cartridge) {
+            RowMapper<CartridgeBean> cartridgeMapper = new RowMapper<CartridgeBean>() {
+                public String[] getData(CartridgeBean cartridge) {
                     String[] data = new String[6];
                     data[0] = cartridge.getType();
                     data[1] = cartridge.getCategory();
@@ -274,7 +274,7 @@ public class RestCommandLineService {
                 }
             };
 
-            CartridgeDefinitionBean[] cartridges = new CartridgeDefinitionBean[cartridgeList.size()];
+            CartridgeBean[] cartridges = new CartridgeBean[cartridgeList.size()];
             cartridges = cartridgeList.toArray(cartridges);
 
             System.out.println("Cartridges found:");
@@ -293,14 +293,14 @@ public class RestCommandLineService {
      */
     public void describeCartridge(final String cartridgeType) throws CommandException {
         try {
-            Type listType = new TypeToken<ArrayList<CartridgeDefinitionBean>>() {
+            Type listType = new TypeToken<ArrayList<CartridgeBean>>() {
             }.getType();
             // GET /cartridges/{cartridgeType} not available, hence using the list method
-            List<CartridgeDefinitionBean> cartridgeList = (List<CartridgeDefinitionBean>) restClient.listEntity(ENDPOINT_LIST_CARTRIDGES,
+            List<CartridgeBean> cartridgeList = (List<CartridgeBean>) restClient.listEntity(ENDPOINT_LIST_CARTRIDGES,
                     listType, "cartridges");
 
-            CartridgeDefinitionBean cartridge = null;
-            for(CartridgeDefinitionBean item : cartridgeList) {
+            CartridgeBean cartridge = null;
+            for(CartridgeBean item : cartridgeList) {
                 if(item.getType().equals(cartridgeType)) {
                     cartridge = item;
                     break;
@@ -350,7 +350,7 @@ public class RestCommandLineService {
         }
     }
 
-    private Cluster getClusterObjectFromString(String resultString) {
+    private ClusterBean getClusterObjectFromString(String resultString) {
         String tmp;
         if (resultString.startsWith("{\"cluster\"")) {
             tmp = resultString.substring("{\"cluster\"".length() + 1, resultString.length() - 1);
@@ -358,7 +358,7 @@ public class RestCommandLineService {
         }
         GsonBuilder gsonBuilder = new GsonBuilder();
         Gson gson = gsonBuilder.create();
-        return gson.fromJson(resultString, Cluster.class);
+        return gson.fromJson(resultString, ClusterBean.class);
     }
 
     // This method helps to create the new tenant
@@ -641,9 +641,9 @@ public class RestCommandLineService {
     // This method helps to list applications
     public void listApplications() throws CommandException {
         try {
-            Type listType = new TypeToken<ArrayList<ApplicationDefinition>>() {
+            Type listType = new TypeToken<ArrayList<ApplicationBean>>() {
             }.getType();
-            List<ApplicationDefinition> list = (List<ApplicationDefinition>) restClient.listEntity(ENDPOINT_LIST_APPLICATION,
+            List<ApplicationBean> list = (List<ApplicationBean>) restClient.listEntity(ENDPOINT_LIST_APPLICATION,
                     listType, "applications");
 
             if ((list == null) || (list.size() == 0)) {
@@ -651,8 +651,8 @@ public class RestCommandLineService {
                 return;
             }
 
-            RowMapper<ApplicationDefinition> rowMapper = new RowMapper<ApplicationDefinition>() {
-                public String[] getData(ApplicationDefinition applicationDefinition) {
+            RowMapper<ApplicationBean> rowMapper = new RowMapper<ApplicationBean>() {
+                public String[] getData(ApplicationBean applicationDefinition) {
                     String[] data = new String[4];
                     data[0] = applicationDefinition.getApplicationId();
                     data[1] = StringUtils.isEmpty(applicationDefinition.getName()) ? "" :
@@ -663,7 +663,7 @@ public class RestCommandLineService {
                 }
             };
 
-            ApplicationDefinition[] array = new ApplicationDefinition[list.size()];
+            ApplicationBean[] array = new ApplicationBean[list.size()];
             array = list.toArray(array);
 
             System.out.println("Applications found:");
@@ -688,9 +688,9 @@ public class RestCommandLineService {
 
     public void listAutoscalingPolicies() throws CommandException {
         try {
-            Type listType = new TypeToken<ArrayList<AutoscalePolicy>>() {
+            Type listType = new TypeToken<ArrayList<AutoscalePolicyBean>>() {
             }.getType();
-            List<AutoscalePolicy> list = (List<AutoscalePolicy>) restClient.listEntity(ENDPOINT_LIST_AUTOSCALING_POLICIES,
+            List<AutoscalePolicyBean> list = (List<AutoscalePolicyBean>) restClient.listEntity(ENDPOINT_LIST_AUTOSCALING_POLICIES,
                     listType, "autoscaling policies");
 
             if ((list == null) || (list == null) || (list.size() == 0)) {
@@ -698,9 +698,9 @@ public class RestCommandLineService {
                 return;
             }
 
-            RowMapper<AutoscalePolicy> rowMapper = new RowMapper<AutoscalePolicy>() {
+            RowMapper<AutoscalePolicyBean> rowMapper = new RowMapper<AutoscalePolicyBean>() {
 
-                public String[] getData(AutoscalePolicy policy) {
+                public String[] getData(AutoscalePolicyBean policy) {
                     String[] data = new String[2];
                     data[0] = policy.getId();
                     data[1] = policy.getIsPublic() ? "Public" : "Private";
@@ -708,7 +708,7 @@ public class RestCommandLineService {
                 }
             };
 
-            AutoscalePolicy[] array = new AutoscalePolicy[list.size()];
+            AutoscalePolicyBean[] array = new AutoscalePolicyBean[list.size()];
             array = list.toArray(array);
 
             System.out.println("Autoscaling policies found:");
@@ -721,8 +721,8 @@ public class RestCommandLineService {
 
     public void describeDeploymentPolicy(String applicationId) throws CommandException {
         try {
-            DeploymentPolicy policy = (DeploymentPolicy) restClient.getEntity(ENDPOINT_GET_DEPLOYMENT_POLICY,
-                    DeploymentPolicy.class, "{applicationId}", applicationId, "deployment policy");
+            DeploymentPolicyBean policy = (DeploymentPolicyBean) restClient.getEntity(ENDPOINT_GET_DEPLOYMENT_POLICY,
+                    DeploymentPolicyBean.class, "{applicationId}", applicationId, "deployment policy");
 
 	        if (policy == null) {
 	            System.out.println("Deployment policy not found: " + applicationId);
@@ -739,8 +739,8 @@ public class RestCommandLineService {
 
     public void describeAutoScalingPolicy(String id) throws CommandException {
         try {
-            AutoscalePolicy policy = (AutoscalePolicy) restClient.getEntity(ENDPOINT_GET_AUTOSCALING_POLICY,
-                    AutoscalePolicy.class, "{id}", id, "autoscaling policy");
+            AutoscalePolicyBean policy = (AutoscalePolicyBean) restClient.getEntity(ENDPOINT_GET_AUTOSCALING_POLICY,
+                    AutoscalePolicyBean.class, "{id}", id, "autoscaling policy");
 
             if (policy == null) {
                 System.out.println("Autoscaling policy not found: " + id);
@@ -761,13 +761,13 @@ public class RestCommandLineService {
 
     public void listKubernetesClusters() {
         try {
-            Type listType = new TypeToken<ArrayList<KubernetesHost>>() {
+            Type listType = new TypeToken<ArrayList<KubernetesHostBean>>() {
             }.getType();
-            List<KubernetesCluster> list = (List<KubernetesCluster>) restClient.
+            List<KubernetesClusterBean> list = (List<KubernetesClusterBean>) restClient.
                     listEntity(ENDPOINT_LIST_KUBERNETES_CLUSTERS, listType, "kubernetes cluster");
             if ((list != null) && (list.size() > 0)) {
-                RowMapper<KubernetesCluster> partitionMapper = new RowMapper<KubernetesCluster>() {
-                    public String[] getData(KubernetesCluster kubernetesCluster) {
+                RowMapper<KubernetesClusterBean> partitionMapper = new RowMapper<KubernetesClusterBean>() {
+                    public String[] getData(KubernetesClusterBean kubernetesCluster) {
                         String[] data = new String[2];
                         data[0] = kubernetesCluster.getClusterId();
                         data[1] = kubernetesCluster.getDescription();
@@ -775,7 +775,7 @@ public class RestCommandLineService {
                     }
                 };
 
-                KubernetesCluster[] array = new KubernetesCluster[list.size()];
+                KubernetesClusterBean[] array = new KubernetesClusterBean[list.size()];
                 array = list.toArray(array);
                 System.out.println("Kubernetes clusters found:");
                 CliUtils.printTable(array, partitionMapper, "Group ID", "Description");
@@ -823,13 +823,13 @@ public class RestCommandLineService {
 
     public void listKubernetesHosts(String clusterId) {
         try {
-            Type listType = new TypeToken<ArrayList<KubernetesHost>>() {
+            Type listType = new TypeToken<ArrayList<KubernetesHostBean>>() {
             }.getType();
-            List<KubernetesHost> list = (List<KubernetesHost>) restClient.listEntity(ENDPOINT_LIST_KUBERNETES_HOSTS.replace("{kubernetesClusterId}", clusterId),
+            List<KubernetesHostBean> list = (List<KubernetesHostBean>) restClient.listEntity(ENDPOINT_LIST_KUBERNETES_HOSTS.replace("{kubernetesClusterId}", clusterId),
                     listType, "kubernetes host");
             if ((list != null) && (list.size() > 0)) {
-                RowMapper<KubernetesHost> partitionMapper = new RowMapper<KubernetesHost>() {
-                    public String[] getData(KubernetesHost kubernetesHost) {
+                RowMapper<KubernetesHostBean> partitionMapper = new RowMapper<KubernetesHostBean>() {
+                    public String[] getData(KubernetesHostBean kubernetesHost) {
                         String[] data = new String[3];
                         data[0] = kubernetesHost.getHostId();
                         data[1] = kubernetesHost.getHostname();
@@ -838,7 +838,7 @@ public class RestCommandLineService {
                     }
                 };
 
-                KubernetesHost[] array = new KubernetesHost[list.size()];
+                KubernetesHostBean[] array = new KubernetesHostBean[list.size()];
                 array = list.toArray(array);
                 System.out.println("Kubernetes hosts found:");
                 CliUtils.printTable(array, partitionMapper, "Host ID", "Hostname", "IP Address");
@@ -934,10 +934,10 @@ public class RestCommandLineService {
     // This method helps to describe applications
     public void describeApplication (String applicationID) {
         try {
-            Type listType = new TypeToken<ApplicationDefinition>() {
+            Type listType = new TypeToken<ApplicationBean>() {
             }.getType();
-            ApplicationDefinition application = (ApplicationDefinition) restClient
-                    .getEntity(ENDPOINT_GET_APPLICATION, ApplicationDefinition.class, "{appId}", applicationID,
+            ApplicationBean application = (ApplicationBean) restClient
+                    .getEntity(ENDPOINT_GET_APPLICATION, ApplicationBean.class, "{appId}", applicationID,
                             "application");
 
             if (application == null) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/MemberContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/MemberContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/MemberContext.java
index d7acbe2..aad71de 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/MemberContext.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/MemberContext.java
@@ -20,7 +20,7 @@ package org.apache.stratos.cloud.controller.domain;
 
 import org.apache.stratos.common.Properties;
 import org.apache.stratos.common.Property;
-import org.apache.stratos.common.beans.NameValuePair;
+import org.apache.stratos.common.domain.NameValuePair;
 
 import java.io.Serializable;
 import java.util.Arrays;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
index 556888a..463442f 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java
@@ -32,7 +32,7 @@ import org.apache.stratos.cloud.controller.iaases.PartitionValidator;
 import org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil;
 import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
 import org.apache.stratos.common.Property;
-import org.apache.stratos.common.beans.NameValuePair;
+import org.apache.stratos.common.domain.NameValuePair;
 import org.apache.stratos.common.constants.StratosConstants;
 import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesCluster;
 import org.apache.stratos.cloud.controller.domain.kubernetes.PortRange;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaasUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaasUtil.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaasUtil.java
index 0a6b8cc..f10cb16 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaasUtil.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaasUtil.java
@@ -25,10 +25,9 @@ import org.apache.stratos.cloud.controller.domain.Cartridge;
 import org.apache.stratos.cloud.controller.domain.ClusterContext;
 import org.apache.stratos.cloud.controller.domain.MemberContext;
 import org.apache.stratos.cloud.controller.domain.PortMapping;
-import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
 import org.apache.stratos.common.Properties;
 import org.apache.stratos.common.Property;
-import org.apache.stratos.common.beans.NameValuePair;
+import org.apache.stratos.common.domain.NameValuePair;
 import org.apache.stratos.common.constants.StratosConstants;
 import org.apache.stratos.kubernetes.client.model.EnvironmentVariable;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApiResponseBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApiResponseBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApiResponseBean.java
new file mode 100644
index 0000000..730b06d
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApiResponseBean.java
@@ -0,0 +1,36 @@
+/*
+ * 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;
+
+@XmlRootElement
+public class ApiResponseBean {
+
+    private String message;
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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
deleted file mode 100644
index fc569a6..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationDefinition.java
+++ /dev/null
@@ -1,104 +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.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 boolean multiTenant;
-    private String name;
-    private String description;
-    private String alias;
-    private String status;
-    private ComponentDefinition components;
-    private List<PropertyBean> property;
-
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-
-    public boolean isMultiTenant() {
-        return multiTenant;
-    }
-
-    public void setMultiTenant(boolean multiTenant) {
-        this.multiTenant = multiTenant;
-    }
-
-    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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationSignUpBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationSignUpBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationSignUpBean.java
deleted file mode 100644
index 0577e09..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationSignUpBean.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.common.beans;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * Application signup definition.
- */
-@XmlRootElement(name="applicationSignUp")
-public class ApplicationSignUpBean implements Serializable {
-
-    private static final long serialVersionUID = -3055522170914869018L;
-
-    private String applicationId;
-    private List<ArtifactRepositoryBean> artifactRepositories;
-
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-
-    public List<ArtifactRepositoryBean> getArtifactRepositories() {
-        return artifactRepositories;
-    }
-
-    public void setArtifactRepositories(List<ArtifactRepositoryBean> artifactRepositories) {
-        this.artifactRepositories = artifactRepositories;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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
deleted file mode 100644
index 989b004..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ApplicationSubscription.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.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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ArtifactRepositoryBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ArtifactRepositoryBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ArtifactRepositoryBean.java
deleted file mode 100644
index 21be3cf..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ArtifactRepositoryBean.java
+++ /dev/null
@@ -1,72 +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.common.beans;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name="artifactRepository")
-public class ArtifactRepositoryBean {
-
-    private String alias;
-    private boolean privateRepo;
-    private String repoUrl;
-    private String repoUsername;
-    private String repoPassword;
-
-    public String getAlias() {
-        return alias;
-    }
-
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    public boolean isPrivateRepo() {
-        return privateRepo;
-    }
-
-    public void setPrivateRepo(boolean privateRepo) {
-        this.privateRepo = privateRepo;
-    }
-
-    public String getRepoUrl() {
-        return repoUrl;
-    }
-
-    public void setRepoUrl(String repoUrl) {
-        this.repoUrl = repoUrl;
-    }
-
-    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;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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
deleted file mode 100644
index a48f943..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Cartridge.java
+++ /dev/null
@@ -1,329 +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.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/8bf5f947/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
deleted file mode 100644
index a540111..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/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.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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/CartridgeInfoBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/CartridgeInfoBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/CartridgeInfoBean.java
deleted file mode 100644
index 8dd78e9..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/CartridgeInfoBean.java
+++ /dev/null
@@ -1,164 +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.common.beans;
-
-import org.apache.stratos.common.beans.cartridge.definition.PersistenceBean;
-import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.List;
-
-@XmlRootElement
-public class CartridgeInfoBean {
-
-    private String cartridgeType;
-    private String alias;
-    private String autoscalePolicy;
-    private String deploymentPolicy;
-    private String repoURL;
-    private boolean privateRepo;
-    private String repoUsername;
-    private String repoPassword;
-    private String dataCartridgeType;
-    private String dataCartridgeAlias;
-    private boolean commitsEnabled;
-    private String serviceGroup;
-    private PersistenceBean persistence;
-    private List<PropertyBean> property;
-    private List<String> domains;
-
-    public CartridgeInfoBean() {
-        this.domains = new ArrayList<String>();
-    }
-
-    public String getCartridgeType() {
-        return cartridgeType;
-    }
-
-    public void setCartridgeType(String cartridgeType) {
-        this.cartridgeType = cartridgeType;
-    }
-
-    public String getAlias() {
-        return alias;
-    }
-
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    public String getAutoscalePolicy() {
-        return autoscalePolicy;
-    }
-
-    public void setAutoscalePolicy(String autoscalePolicy) {
-        this.autoscalePolicy = autoscalePolicy;
-    }
-
-    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 getDataCartridgeType() {
-        return dataCartridgeType;
-    }
-
-    public void setDataCartridgeType(String dataCartridgeType) {
-        this.dataCartridgeType = dataCartridgeType;
-    }
-
-    public String getDataCartridgeAlias() {
-        return dataCartridgeAlias;
-    }
-
-    public void setDataCartridgeAlias(String dataCartridgeAlias) {
-        this.dataCartridgeAlias = dataCartridgeAlias;
-    }
-
-    public String getDeploymentPolicy() {
-        return deploymentPolicy;
-    }
-
-    public void setDeploymentPolicy(String deploymentPolicy) {
-        this.deploymentPolicy = deploymentPolicy;
-    }
-
-    public boolean isCommitsEnabled() {
-		return commitsEnabled;
-	}
-
-	public void setCommitsEnabled(boolean commitsEnabled) {
-		this.commitsEnabled = commitsEnabled;
-	}
-
-	public String getServiceGroup() {
-		return serviceGroup;
-	}
-
-	public void setServiceGroup(String serviceGroup) {
-		this.serviceGroup = serviceGroup;
-	}
-
-    public PersistenceBean getPersistence() {
-        return persistence;
-    }
-
-    public void setPersistence(PersistenceBean persistence) {
-        this.persistence = persistence;
-    }
-
-    public List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-    public List<String> getDomains() { return domains; }
-
-    public void setDomains(List<String> domains) { this.domains = domains; }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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
deleted file mode 100644
index d7b3a74..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ComponentDefinition.java
+++ /dev/null
@@ -1,40 +0,0 @@
-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/8bf5f947/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
deleted file mode 100644
index ad3826b..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/DependencyDefinitions.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.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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Error.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Error.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Error.java
deleted file mode 100644
index 2447f03..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Error.java
+++ /dev/null
@@ -1,46 +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.common.beans;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "error")
-public class Error {
-
-    private int errorCode;
-    private String errorMessage;
-
-    public int getErrorCode() {
-        return errorCode;
-    }
-
-    public void setErrorCode(int errorCode) {
-        this.errorCode = errorCode;
-    }
-
-    public String getErrorMessage() {
-        return errorMessage;
-    }
-
-    public void setErrorMessage(String errorMessage) {
-        this.errorMessage = errorMessage;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/GroupBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/GroupBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/GroupBean.java
deleted file mode 100644
index b4c372d..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/GroupBean.java
+++ /dev/null
@@ -1,100 +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.common.beans;
-
-import org.apache.stratos.common.beans.topology.Cluster;
-import org.apache.stratos.common.beans.topology.Instance;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@XmlRootElement(name="groups")
-public class GroupBean {
-
-    private List<GroupBean> subGroups = null;
-    private List<Cluster> clusters = null;
-    private String alias;
-    private String deploymentPolicy;
-    private String autoScalingPolicy;
-    private List<Instance> instances; 
-
-    public GroupBean(){
-        this.setClusters(new ArrayList<Cluster>());
-        this.setSubGroups(new ArrayList<GroupBean>());
-    }
-
-    public void addGroup(GroupBean groupBean){
-        getSubGroups().add(groupBean);
-    }
-    public void addCluster(Cluster cluster){
-        getClusters().add(cluster);
-    }
-
-    public List<GroupBean> getSubGroups() {
-        return subGroups;
-    }
-
-    public void setSubGroups(List<GroupBean> subGroups) {
-        this.subGroups = subGroups;
-    }
-
-    public List<Cluster> getClusters() {
-        return clusters;
-    }
-
-    public void setClusters(List<Cluster> clusters) {
-        this.clusters = clusters;
-    }
-
-    public void setAlias(String alias) {
-        this.alias = alias;
-    }
-
-    public void setDeploymentPolicy(String deploymentPolicy) {
-        this.deploymentPolicy = deploymentPolicy;
-    }
-
-    public void setAutoScalingPolicy(String autoScalingPolicy) {
-        this.autoScalingPolicy = autoScalingPolicy;
-    }
-
-    public String getAlias() {
-        return alias;
-    }
-
-    public String getDeploymentPolicy() {
-        return deploymentPolicy;
-    }
-
-    public String getAutoScalingPolicy() {
-        return autoScalingPolicy;
-    }
-
-	public List<Instance> getInstances() {
-		return instances;
-	}
-
-	public void setInstances(List<Instance> instances) {
-		this.instances = instances;
-	}
-    
-    
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/NameValuePair.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/NameValuePair.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/NameValuePair.java
deleted file mode 100644
index d21cc55..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/NameValuePair.java
+++ /dev/null
@@ -1,50 +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.common.beans;
-
-import java.io.Serializable;
-
-/**
- * Name value pair.
- */
-public class NameValuePair implements Serializable {
-
-    private static final long serialVersionUID = 6783497955930623020L;
-
-    private final String name;
-    private String value;
-
-    public NameValuePair(String name, String value) {
-        this.name = name;
-        this.value = value;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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
deleted file mode 100644
index b7b334b..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Persistence.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.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/8bf5f947/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
deleted file mode 100644
index 9b21aeb..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/PortMapping.java
+++ /dev/null
@@ -1,69 +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.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/8bf5f947/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
deleted file mode 100644
index 9dfdd10..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/ServiceGroupDefinition.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/StratosApiResponse.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/StratosApiResponse.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/StratosApiResponse.java
deleted file mode 100644
index 38fabb6..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/StratosApiResponse.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.common.beans;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class StratosApiResponse {
-
-    private String message;
-
-    public String getMessage() {
-        return message;
-    }
-
-    public void setMessage(String message) {
-        this.message = message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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
deleted file mode 100644
index f93ca07..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/SubscribableInfo.java
+++ /dev/null
@@ -1,104 +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.common.beans;
-
-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 int maxMembers;
-    private int minMembers;
-    private String[] dependencyAliases;
-    private ArtifactRepositoryBean artifactRepository;
-    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[] 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;
-    }
-
-    public ArtifactRepositoryBean getArtifactRepository() {
-        return artifactRepository;
-    }
-
-    public void setArtifactRepository(ArtifactRepositoryBean artifactRepository) {
-        this.artifactRepository = artifactRepository;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/SubscriptionDomainRequest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/SubscriptionDomainRequest.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/SubscriptionDomainRequest.java
deleted file mode 100644
index 6949d97..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/SubscriptionDomainRequest.java
+++ /dev/null
@@ -1,43 +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.common.beans;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.stratos.common.beans.subscription.domain.SubscriptionDomainBean;
-
-/**
- * Defines subscription domain post request.
- */
-@XmlRootElement
-public class SubscriptionDomainRequest {
-
-    private List<SubscriptionDomainBean> domains;
-
-    public List<SubscriptionDomainBean> getDomains() {
-        return domains;
-    }
-
-    public void setDomains(List<SubscriptionDomainBean> domains) {
-        this.domains = domains;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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
deleted file mode 100644
index 7add8b5..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/Volume.java
+++ /dev/null
@@ -1,126 +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.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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ApplicationAliasesBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ApplicationAliasesBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ApplicationAliasesBean.java
new file mode 100644
index 0000000..2f61d22
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/application/ApplicationAliasesBean.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.application;
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+public class ApplicationAliasesBean implements Serializable {
+
+    private static final long serialVersionUID = 3380699449827682550L;
+
+    private String applicationId;
+    private Set<String> cartridgeAliases;
+    private Set<String> groupAliases;
+
+    public ApplicationAliasesBean(String applicationId) {
+
+        this.applicationId = applicationId;
+        this.cartridgeAliases = new HashSet<String>();
+        this.groupAliases = new HashSet<String>();
+    }
+
+    public Set<String> getGroupAliases() {
+        return groupAliases;
+    }
+
+    public void addCartridgeAlias(String cartridgeSubscriptionAlias) {
+        cartridgeAliases.add(cartridgeSubscriptionAlias);
+    }
+
+    public void addCartridgeAliases(Set<String> cartridgeSubscriptionAliases) {
+        cartridgeSubscriptionAliases.addAll(cartridgeSubscriptionAliases);
+    }
+
+    public void addGroupAlias(String groupSubscriptionAlias) {
+        groupAliases.add(groupSubscriptionAlias);
+    }
+
+    public void addGroupAliases(Set<String> groupSubscriptionAliases) {
+        groupSubscriptionAliases.addAll(groupSubscriptionAliases);
+    }
+
+    public String getApplicationId() {
+        return applicationId;
+    }
+}


[6/8] stratos git commit: Cleaning rest api bean classes

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PropertyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PropertyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PropertyBean.java
new file mode 100644
index 0000000..cf104c8
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/PropertyBean.java
@@ -0,0 +1,45 @@
+/*
+ * 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.cartridge;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "property")
+public class PropertyBean {
+
+    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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/VolumeBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/VolumeBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/VolumeBean.java
new file mode 100644
index 0000000..314b69f
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/VolumeBean.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.cartridge;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class VolumeBean {
+
+    private String id;
+    private String size;
+    private String device;
+    private boolean removeOnTermination;
+    private String mappingPath;
+    private String snapshotId;
+    private String volumeId;
+
+    public String toString () {
+        return " [ Persistence Required : " + ", Size: " + getSize() + ", device: " +
+                getDevice() + " remove on termination " + isRemoveOnTermination() +
+                ", mappingPath : " + getMappingPath() + "] ";
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getSize() {
+        return size;
+    }
+
+    public void setSize(String 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 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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/CartridgeDefinitionBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/CartridgeDefinitionBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/CartridgeDefinitionBean.java
deleted file mode 100644
index 4fe0ede..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/CartridgeDefinitionBean.java
+++ /dev/null
@@ -1,253 +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.common.beans.cartridge.definition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement(name = "cartridgeDefinitionBean")
-public class CartridgeDefinitionBean {
-
-	private String type;
-	private String host;
-	private String provider;
-    /**
-     * Category: Application|Framework|Data|LoadBalancer
-     */
-    private String category;
-	private String displayName;
-	private String description;
-	private String version;
-	private boolean multiTenant;
-	private boolean isPublic;
-    private DeploymentBean deployment;
-    private List<PortMappingBean> portMapping;
-    private PersistenceBean persistence;
-    private List<IaasProviderBean> iaasProvider;
-    private String defaultAutoscalingPolicy;
-    private String defaultDeploymentPolicy;
-    private String serviceGroup;
-    private ContainerBean container;
-    private List<PropertyBean> property;
-    private List<String> exportingProperties;
-
-    public String toString () {
-
-        return "Type: " + getType() + ", Provider: " + getProvider() + ", Category: " + getCategory() + ", Host: " + getHost() + ", Display Name: " + getDisplayName() +
-                ", Description: " + getDescription() +  ", Version: " + getVersion() + ", Multitenant " + isMultiTenant() +", Public " + isPublic() + "\n" +
-                getDeploymentDetails() + "\n PortMapping: " + getPortMappings() + "\n IaaS: " + getIaasProviders() +
-                "\n Properties: " + getProperties() +"\n VolumeBean mappings "+ getPersistence().toString()
-                + "\n Exports " + getExportingProperties().toString();
-    }
-
-	private String getDeploymentDetails () {
-
-        if(getDeployment() != null) {
-            return getDeployment().toString();
-        }
-        return null;
-    }
-
-    private String getPortMappings () {
-
-        StringBuilder portMappingBuilder = new StringBuilder();
-        if(getPortMapping() != null && !getPortMapping().isEmpty()) {
-            for(PortMappingBean portMappingBean : getPortMapping()) {
-                portMappingBuilder.append(portMappingBean.toString());
-            }
-        }
-        return portMappingBuilder.toString();
-    }
-
-    private String getIaasProviders () {
-
-        StringBuilder iaasBuilder = new StringBuilder();
-        if(getIaasProvider() != null && !getIaasProvider().isEmpty()) {
-            for(IaasProviderBean iaasProviderBean : getIaasProvider()) {
-                iaasBuilder.append(iaasProviderBean.toString());
-            }
-        }
-        return iaasBuilder.toString();
-    }
-
-    private String getProperties () {
-
-        StringBuilder propertyBuilder = new StringBuilder();
-        if(getProperty() != null) {
-            for(PropertyBean propertyBean : getProperty()) {
-                propertyBuilder.append(propertyBean.getName() + " : " + propertyBean.getValue() + " | ");
-            }
-        }
-        return propertyBuilder.toString();
-    }
-
-    public List<String> getExportingProperties() {
-        return exportingProperties;
-    }
-
-    public void setExportingProperties(List<String> exportingProperties) {
-        this.exportingProperties = exportingProperties;
-    }
-
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getHost() {
-        return host;
-    }
-
-    public void setHost(String host) {
-        this.host = host;
-    }
-
-    public String getProvider() {
-        return provider;
-    }
-
-    public void setProvider(String provider) {
-        this.provider = provider;
-    }
-
-    public String getCategory() {
-        return category;
-    }
-
-    public void setCategory(String category) {
-        this.category = category;
-    }
-
-    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 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 boolean isPublic() {
-        return isPublic;
-    }
-
-    public void setPublic(boolean isPublic) {
-        this.isPublic = isPublic;
-    }
-
-    public DeploymentBean getDeployment() {
-        return deployment;
-    }
-
-    public void setDeployment(DeploymentBean deployment) {
-        this.deployment = deployment;
-    }
-
-    public List<PortMappingBean> getPortMapping() {
-        return portMapping;
-    }
-
-    public void setPortMapping(List<PortMappingBean> portMapping) {
-        this.portMapping = portMapping;
-    }
-
-    public PersistenceBean getPersistence() {
-        return persistence;
-    }
-
-    public void setPersistence(PersistenceBean persistence) {
-        this.persistence = persistence;
-    }
-
-    public List<IaasProviderBean> getIaasProvider() {
-        return iaasProvider;
-    }
-
-    public void setIaasProvider(List<IaasProviderBean> iaasProvider) {
-        this.iaasProvider = iaasProvider;
-    }
-
-    public List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-
-    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 String getServiceGroup() {
-        return serviceGroup;
-    }
-
-    public void setServiceGroup(String serviceGroup) {
-        this.serviceGroup = serviceGroup;
-    }
-
-    public ContainerBean getContainer() {
-        return container;
-    }
-
-    public void setContainer(ContainerBean container) {
-        this.container = container;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/ContainerBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/ContainerBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/ContainerBean.java
deleted file mode 100644
index ff27b87..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/ContainerBean.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.apache.stratos.common.beans.cartridge.definition;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-
-@XmlRootElement(name = "container")
-public class ContainerBean {
-
-	private String imageName;
-	private String dockerfileRepo;
-	private List<PropertyBean> property;
-
-	public String getImageName() {
-		return imageName;
-	}
-
-	public void setImageName(String imageName) {
-		this.imageName = imageName;
-	}
-
-	public String getDockerfileRepo() {
-		return dockerfileRepo;
-	}
-
-	public void setDockerfileRepo(String dockerfileRepo) {
-		this.dockerfileRepo = dockerfileRepo;
-	}
-
-	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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/DeploymentBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/DeploymentBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/DeploymentBean.java
deleted file mode 100644
index 5b92470..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/DeploymentBean.java
+++ /dev/null
@@ -1,61 +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.common.beans.cartridge.definition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement(name = "deployment")
-public class DeploymentBean {
-
-    private String baseDir;
-    private List<String> dir;
-
-    private String getDirectories () {
-
-        StringBuilder directoryBuilder = new StringBuilder();
-        if(getDir() != null) {
-            for(String directory : getDir()) {
-                directoryBuilder.append(directory + " | ");
-            }
-        }
-        return directoryBuilder.toString();
-    }
-
-    public String getBaseDir() {
-        return baseDir;
-    }
-
-    public void setBaseDir(String baseDir) {
-        this.baseDir = baseDir;
-    }
-
-    public List<String> getDir() {
-        return dir;
-    }
-
-    public void setDir(List<String> dir) {
-        this.dir = dir;
-    }
-
-    public String toString () {
-        return " Base Directory: " + getBaseDir() + " Directories: " + getDirectories();
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/FloatingNetworkBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/FloatingNetworkBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/FloatingNetworkBean.java
deleted file mode 100644
index fc8ed71..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/FloatingNetworkBean.java
+++ /dev/null
@@ -1,73 +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.common.beans.cartridge.definition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement (name = "floatingNetworks")
-public class FloatingNetworkBean {
-
-	private String name;
-	private String networkUuid;
-	private String floatingIP;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getNetworkUuid() {
-		return networkUuid;
-	}
-
-	public void setNetworkUuid(String networkUuid) {
-		this.networkUuid = networkUuid;
-	}
-
-	public String getFloatingIP() {
-		return floatingIP;
-	}
-
-	public void setFloatingIP(String floatingIP) {
-		this.floatingIP = floatingIP;
-	}
-
-	public String toString () {
-		StringBuilder sb = new StringBuilder('{');
-		String delimeter = "";
-		if (getName() != null) {
-			sb.append(delimeter).append("name : ").append(getName());
-			delimeter = ", ";
-		}
-		if (getNetworkUuid() != null) {
-			sb.append(delimeter).append("networkUuid : ").append(getNetworkUuid());
-			delimeter = ", ";
-		}
-		if (getFloatingIP() != null) {
-			sb.append(delimeter).append("floatingIP : ").append(getFloatingIP());
-			delimeter = ", ";
-		}
-		sb.append('}');
-		return sb.toString();
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/IaasProviderBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/IaasProviderBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/IaasProviderBean.java
deleted file mode 100644
index e4f3583..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/IaasProviderBean.java
+++ /dev/null
@@ -1,140 +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.common.beans.cartridge.definition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement (name = "iaasProvider")
-public class IaasProviderBean {
-
-    private String type;
-    private String name;
-    private String className;
-    private String imageId;
-    private String provider;
-    private String identity;
-    private String credential;
-    private List<PropertyBean> property;
-    private List<NetworkInterfaceBean> networkInterfaces;
-
-    public List<NetworkInterfaceBean> getNetworkInterfaces() {
-        return networkInterfaces;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getClassName() {
-        return className;
-    }
-
-    public void setClassName(String className) {
-        this.className = className;
-    }
-
-    public String getImageId() {
-        return imageId;
-    }
-
-    public void setImageId(String imageId) {
-        this.imageId = imageId;
-    }
-
-    public String getProvider() {
-        return provider;
-    }
-
-    public void setProvider(String provider) {
-        this.provider = provider;
-    }
-
-    public String getIdentity() {
-        return identity;
-    }
-
-    public void setIdentity(String identity) {
-        this.identity = identity;
-    }
-
-    public String getCredential() {
-        return credential;
-    }
-
-    public void setCredential(String credential) {
-        this.credential = credential;
-    }
-
-    public List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-
-    public void setNetworkInterfaces(List<NetworkInterfaceBean> networkInterfaces) {
-        this.networkInterfaces = networkInterfaces;
-    }
-
-    private String getIaasPropertiesString () {
-        StringBuilder iaasPropertyBuilder = new StringBuilder();
-        if(getProperty() != null) {
-            for (PropertyBean propertyBean : getProperty()) {
-                iaasPropertyBuilder.append(propertyBean.getName() + " : " + propertyBean.getValue() + " | ");
-            }
-        }
-        return iaasPropertyBuilder.toString();
-    }
-
-    private String getNetworkInterfacesString() {
-        StringBuilder sb = new StringBuilder();
-        if (getNetworkInterfaces() != null) {
-            sb.append('[');
-            String delimeter = "";
-            for (NetworkInterfaceBean nib: getNetworkInterfaces()) {
-                sb.append(delimeter).append(nib);
-                delimeter = ", ";
-            }
-            sb.append(']');
-        }
-        return sb.toString();
-    }
-
-    public String toString () {
-        return " [ Type: " + getType() + ", Name: " + getName() + ", Class Name: " + getClassName() + ", Image Id: " + getImageId() +
-                ", Provider: " + getProvider() + ", Identity: " + getIdentity() +
-                ", Credentials: " + getCredential() + ", Properties: " + getIaasPropertiesString() + ", Network Interfaces: " +
-                getNetworkInterfacesString() + " ] ";
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/LoadBalancerBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/LoadBalancerBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/LoadBalancerBean.java
deleted file mode 100644
index e8ccdc6..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/LoadBalancerBean.java
+++ /dev/null
@@ -1,77 +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.common.beans.cartridge.definition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement(name = "loadBalancer")
-public class LoadBalancerBean {
-
-    private String type;
-    private String deploymentPolicy;
-    private String autoscalingPolicy;
-    private List<PropertyBean> property;
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    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 List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-
-    public String toString () {
-
-        StringBuilder lbBuilder = new StringBuilder();
-        lbBuilder.append(" Type: " + getType());
-        if(getProperty() != null && !getProperty().isEmpty()) {
-            lbBuilder.append(" Properties: ");
-            for(PropertyBean propertyBean : getProperty()) {
-                lbBuilder.append(propertyBean.getName() + " : " + propertyBean.getValue() + " | ");
-            }
-        }
-        return lbBuilder.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/NetworkInterfaceBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/NetworkInterfaceBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/NetworkInterfaceBean.java
deleted file mode 100644
index 13d1564..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/NetworkInterfaceBean.java
+++ /dev/null
@@ -1,102 +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.common.beans.cartridge.definition;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement (name = "networkInterfaces")
-public class NetworkInterfaceBean {
-
-	private String networkUuid;
-	private String fixedIp;
-	private String portUuid;
-	private List<FloatingNetworkBean> floatingNetworks;
-    
-    private String getFloatingNetworksString() {
-    	StringBuilder sb = new StringBuilder();
-    	if (floatingNetworks != null) {
-    		sb.append('[');
-    		String delimeter = "";
-    		for (FloatingNetworkBean floatingNetworkBean:floatingNetworks) {
-    			sb.append(delimeter).append(floatingNetworkBean);
-    			delimeter = ", ";
-    		}
-    		sb.append(']');
-    	}
-    	return sb.toString();
-    }
-
-	public String getNetworkUuid() {
-		return networkUuid;
-	}
-
-	public void setNetworkUuid(String networkUuid) {
-		this.networkUuid = networkUuid;
-	}
-
-	public String getFixedIp() {
-		return fixedIp;
-	}
-
-	public void setFixedIp(String fixedIp) {
-		this.fixedIp = fixedIp;
-	}
-
-	public String getPortUuid() {
-		return portUuid;
-	}
-
-	public void setPortUuid(String portUuid) {
-		this.portUuid = portUuid;
-	}
-
-	public void setFloatingNetworks(List<FloatingNetworkBean> floatingNetworks) {
-		this.floatingNetworks = floatingNetworks;
-	}
-
-	public List<FloatingNetworkBean> getFloatingNetworks() {
-		return floatingNetworks;
-	}
-
-	public String toString () {
-		StringBuilder sb = new StringBuilder('{');
-		String delimeter = "";
-		if (getNetworkUuid() != null) {
-			sb.append(delimeter).append("networkUuid : ").append(getNetworkUuid());
-			delimeter = ", ";
-		}
-		if (getFixedIp() != null) {
-			sb.append(delimeter).append("fixedIp : ").append(getFixedIp());
-			delimeter = ", ";
-		}
-		if (getPortUuid() != null) {
-			sb.append(delimeter).append("portUuid : ").append(getPortUuid());
-			delimeter = ", ";
-		}
-		if (getFloatingNetworks() != null) {
-			sb.append(delimeter).append("floatingNetworks : ").append(getFloatingNetworks());
-			delimeter = ", ";
-		}
-		sb.append('}');
-		return sb.toString();
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PersistenceBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PersistenceBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PersistenceBean.java
deleted file mode 100644
index 3639ba4..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PersistenceBean.java
+++ /dev/null
@@ -1,61 +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.common.beans.cartridge.definition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class PersistenceBean {
-
-    private boolean isRequired;
-    private List<VolumeBean> volume;
-
-    public String toString () {
-        return " [ Persistence Required : " + isRequired() + "\n" +
-                "volume: " + getVolumes() + "] ";
-    }
-
-    private String getVolumes() {
-        StringBuilder volumeBuilder = new StringBuilder();
-        if(getVolume() != null && !getVolume().isEmpty()) {
-            for(VolumeBean volumeBean : getVolume()) {
-                volumeBuilder.append(volumeBean.toString());
-            }
-        }
-        return volumeBuilder.toString();
-    }
-
-    public boolean isRequired() {
-        return isRequired;
-    }
-
-    public void setRequired(boolean isRequired) {
-        this.isRequired = isRequired;
-    }
-
-    public List<VolumeBean> getVolume() {
-        return volume;
-    }
-
-    public void setVolume(List<VolumeBean> volume) {
-        this.volume = volume;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PortMappingBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PortMappingBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PortMappingBean.java
deleted file mode 100644
index 51baf7b..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PortMappingBean.java
+++ /dev/null
@@ -1,58 +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.common.beans.cartridge.definition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "portMapping")
-public class PortMappingBean {
-
-    private String protocol;
-    private int port;
-    private int proxyPort;
-
-    public String toString () {
-        return " [ Protocol: " + getProtocol() + ", Port: " + getPort() + ", Proxy port: " + getProxyPort() + "] ";
-    }
-
-    public String getProtocol() {
-        return protocol;
-    }
-
-    public void setProtocol(String protocol) {
-        this.protocol = protocol;
-    }
-
-    public int getPort() {
-        return port;
-    }
-
-    public void setPort(int port) {
-        this.port = port;
-    }
-
-    public int getProxyPort() {
-        return proxyPort;
-    }
-
-    public void setProxyPort(int proxyPort) {
-        this.proxyPort = proxyPort;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PropertyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PropertyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PropertyBean.java
deleted file mode 100644
index 2903ae1..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/PropertyBean.java
+++ /dev/null
@@ -1,45 +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.common.beans.cartridge.definition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "property")
-public class PropertyBean {
-
-    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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/ServiceDefinitionBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/ServiceDefinitionBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/ServiceDefinitionBean.java
deleted file mode 100644
index 3c89d51..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/ServiceDefinitionBean.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.common.beans.cartridge.definition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "serviceDefinitionBean")
-public class ServiceDefinitionBean {
-
-	private String serviceName;
-	private String cartridgeType;
-	private String deploymentPolicyName;
-	private String autoscalingPolicyName;
-	private String clusterDomain;
-	private String clusterSubDomain;
-	private String tenantRange;
-	private boolean isPublic;
-	
-	public String getServiceName() {
-		return serviceName;
-	}
-	public void setServiceName(String serviceName) {
-		this.serviceName = serviceName;
-	}
-	public String getCartridgeType() {
-		return cartridgeType;
-	}
-	public void setCartridgeType(String cartridgeType) {
-		this.cartridgeType = cartridgeType;
-	}
-	public String getDeploymentPolicyName() {
-		return deploymentPolicyName;
-	}
-	public void setDeploymentPolicyName(String deploymentPolicyName) {
-		this.deploymentPolicyName = deploymentPolicyName;
-	}
-	public String getAutoscalingPolicyName() {
-		return autoscalingPolicyName;
-	}
-	public void setAutoscalingPolicyName(String autoscalingPolicyName) {
-		this.autoscalingPolicyName = autoscalingPolicyName;
-	}
-	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 getTenantRange() {
-		return tenantRange;
-	}
-	public void setTenantRange(String tenantRange) {
-		this.tenantRange = tenantRange;
-	}
-	public boolean getIsPublic() {
-		return isPublic;
-	}
-	public void setIsPublic(boolean isPublic) {
-		this.isPublic = isPublic;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/VolumeBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/VolumeBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/VolumeBean.java
deleted file mode 100644
index 44dee99..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/cartridge/definition/VolumeBean.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.common.beans.cartridge.definition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class VolumeBean {
-
-    private String id;
-    private String size;
-    private String device;
-    private boolean removeOnTermination;
-    private String mappingPath;
-    private String snapshotId;
-    private String volumeId;
-
-    public String toString () {
-        return " [ Persistence Required : " + ", Size: " + getSize() + ", device: " +
-                getDevice() + " remove on termination " + isRemoveOnTermination() +
-                ", mappingPath : " + getMappingPath() + "] ";
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getSize() {
-        return size;
-    }
-
-    public void setSize(String 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 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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesCluster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesCluster.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesCluster.java
deleted file mode 100644
index d0ca181..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesCluster.java
+++ /dev/null
@@ -1,84 +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.common.beans.kubernetes;
-
-import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class KubernetesCluster {
-
-    private String clusterId;
-    private String description;
-    private List<KubernetesHost> kubernetesHosts;
-    private KubernetesMaster kubernetesMaster;
-    private PortRange portRange;
-    private List<PropertyBean> property;
-
-    public String getClusterId() {
-        return clusterId;
-    }
-
-    public void setClusterId(String clusterId) {
-        this.clusterId = clusterId;
-    }
-
-    public List<KubernetesHost> getKubernetesHosts() {
-        return kubernetesHosts;
-    }
-
-    public void setKubernetesHosts(List<KubernetesHost> kubernetesHosts) {
-        this.kubernetesHosts = kubernetesHosts;
-    }
-
-    public KubernetesMaster getKubernetesMaster() {
-        return kubernetesMaster;
-    }
-
-    public void setKubernetesMaster(KubernetesMaster kubernetesMaster) {
-        this.kubernetesMaster = kubernetesMaster;
-    }
-
-    public PortRange getPortRange() {
-        return portRange;
-    }
-
-    public void setPortRange(PortRange portRange) {
-        this.portRange = portRange;
-    }
-
-    public List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesClusterBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesClusterBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesClusterBean.java
new file mode 100644
index 0000000..80f832c
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesClusterBean.java
@@ -0,0 +1,84 @@
+/*
+ * 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.kubernetes;
+
+import org.apache.stratos.common.beans.cartridge.PropertyBean;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class KubernetesClusterBean {
+
+    private String clusterId;
+    private String description;
+    private List<KubernetesHostBean> kubernetesHosts;
+    private KubernetesMasterBean kubernetesMaster;
+    private PortRangeBean portRange;
+    private List<PropertyBean> property;
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public void setClusterId(String clusterId) {
+        this.clusterId = clusterId;
+    }
+
+    public List<KubernetesHostBean> getKubernetesHosts() {
+        return kubernetesHosts;
+    }
+
+    public void setKubernetesHosts(List<KubernetesHostBean> kubernetesHosts) {
+        this.kubernetesHosts = kubernetesHosts;
+    }
+
+    public KubernetesMasterBean getKubernetesMaster() {
+        return kubernetesMaster;
+    }
+
+    public void setKubernetesMaster(KubernetesMasterBean kubernetesMaster) {
+        this.kubernetesMaster = kubernetesMaster;
+    }
+
+    public PortRangeBean getPortRange() {
+        return portRange;
+    }
+
+    public void setPortRange(PortRangeBean portRange) {
+        this.portRange = portRange;
+    }
+
+    public List<PropertyBean> getProperty() {
+        return property;
+    }
+
+    public void setProperty(List<PropertyBean> property) {
+        this.property = property;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesHost.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesHost.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesHost.java
deleted file mode 100644
index b85e987..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesHost.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.common.beans.kubernetes;
-
-import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class KubernetesHost {
-
-    private String hostId;
-    private String hostname;
-    private String hostIpAddress;
-    private List<PropertyBean> property;
-
-    public String getHostId() {
-        return hostId;
-    }
-
-    public void setHostId(String hostId) {
-        this.hostId = hostId;
-    }
-
-    public String getHostname() {
-        return hostname;
-    }
-
-    public void setHostname(String hostname) {
-        this.hostname = hostname;
-    }
-
-    public String getHostIpAddress() {
-        return hostIpAddress;
-    }
-
-    public void setHostIpAddress(String hostIpAddress) {
-        this.hostIpAddress = hostIpAddress;
-    }
-
-    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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesHostBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesHostBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesHostBean.java
new file mode 100644
index 0000000..fbff118
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesHostBean.java
@@ -0,0 +1,68 @@
+/*
+ *
+ * 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.kubernetes;
+
+import org.apache.stratos.common.beans.cartridge.PropertyBean;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class KubernetesHostBean {
+
+    private String hostId;
+    private String hostname;
+    private String hostIpAddress;
+    private List<PropertyBean> property;
+
+    public String getHostId() {
+        return hostId;
+    }
+
+    public void setHostId(String hostId) {
+        this.hostId = hostId;
+    }
+
+    public String getHostname() {
+        return hostname;
+    }
+
+    public void setHostname(String hostname) {
+        this.hostname = hostname;
+    }
+
+    public String getHostIpAddress() {
+        return hostIpAddress;
+    }
+
+    public void setHostIpAddress(String hostIpAddress) {
+        this.hostIpAddress = hostIpAddress;
+    }
+
+    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/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesMaster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesMaster.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesMaster.java
deleted file mode 100644
index e5426e6..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesMaster.java
+++ /dev/null
@@ -1,77 +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.common.beans.kubernetes;
-
-import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class KubernetesMaster {
-
-    private String hostId;
-    private String hostname;
-    private String hostIpAddress;
-    private List<PropertyBean> property;
-    private String endpoint;
-
-    public String getHostId() {
-        return hostId;
-    }
-
-    public void setHostId(String hostId) {
-        this.hostId = hostId;
-    }
-
-    public String getHostname() {
-        return hostname;
-    }
-
-    public void setHostname(String hostname) {
-        this.hostname = hostname;
-    }
-
-    public String getHostIpAddress() {
-        return hostIpAddress;
-    }
-
-    public void setHostIpAddress(String hostIpAddress) {
-        this.hostIpAddress = hostIpAddress;
-    }
-
-    public List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-
-    public String getEndpoint() {
-        return endpoint;
-    }
-
-    public void setEndpoint(String endpoint) {
-        this.endpoint = endpoint;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesMasterBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesMasterBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesMasterBean.java
new file mode 100644
index 0000000..d9215ca
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesMasterBean.java
@@ -0,0 +1,77 @@
+/*
+ *
+ * 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.kubernetes;
+
+import org.apache.stratos.common.beans.cartridge.PropertyBean;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class KubernetesMasterBean {
+
+    private String hostId;
+    private String hostname;
+    private String hostIpAddress;
+    private List<PropertyBean> property;
+    private String endpoint;
+
+    public String getHostId() {
+        return hostId;
+    }
+
+    public void setHostId(String hostId) {
+        this.hostId = hostId;
+    }
+
+    public String getHostname() {
+        return hostname;
+    }
+
+    public void setHostname(String hostname) {
+        this.hostname = hostname;
+    }
+
+    public String getHostIpAddress() {
+        return hostIpAddress;
+    }
+
+    public void setHostIpAddress(String hostIpAddress) {
+        this.hostIpAddress = hostIpAddress;
+    }
+
+    public List<PropertyBean> getProperty() {
+        return property;
+    }
+
+    public void setProperty(List<PropertyBean> property) {
+        this.property = property;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public void setEndpoint(String endpoint) {
+        this.endpoint = endpoint;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PortRange.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PortRange.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PortRange.java
deleted file mode 100644
index 31d64e8..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PortRange.java
+++ /dev/null
@@ -1,45 +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.common.beans.kubernetes;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class PortRange {
-
-    private int upper;
-    private int lower;
-
-    public int getUpper() {
-        return upper;
-    }
-
-    public void setUpper(int upper) {
-        this.upper = upper;
-    }
-
-    public int getLower() {
-        return lower;
-    }
-
-    public void setLower(int lower) {
-        this.lower = lower;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PortRangeBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PortRangeBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PortRangeBean.java
new file mode 100644
index 0000000..3c330a7
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PortRangeBean.java
@@ -0,0 +1,45 @@
+/*
+ * 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.kubernetes;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class PortRangeBean {
+
+    private int upper;
+    private int lower;
+
+    public int getUpper() {
+        return upper;
+    }
+
+    public void setUpper(int upper) {
+        this.upper = upper;
+    }
+
+    public int getLower() {
+        return lower;
+    }
+
+    public void setLower(int lower) {
+        this.lower = lower;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/Properties.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/Properties.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/Properties.java
deleted file mode 100644
index c4c4f67..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/Properties.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.common.beans.kubernetes;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Had to wrap {@link Property} array using a class, since there's a bug in current
- * stub generation.
- */
-@XmlRootElement
-public class Properties implements Serializable{
-
-    private static final long serialVersionUID = 1986895299288322592L;
-    private List<Property> properties;
-
-    public List<Property> getProperties() {
-        return properties;
-    }
-
-    public void setProperties(List<Property> properties) {
-        this.properties = properties;
-    }
-
-    @Override
-    public String toString() {
-        return "Properties [properties=" + properties + "]";
-    }
-    
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PropertiesBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PropertiesBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PropertiesBean.java
new file mode 100644
index 0000000..1add9b7
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PropertiesBean.java
@@ -0,0 +1,48 @@
+/*
+ * 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.kubernetes;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * Had to wrap {@link PropertyBean} array using a class, since there's a bug in current
+ * stub generation.
+ */
+@XmlRootElement
+public class PropertiesBean implements Serializable{
+
+    private static final long serialVersionUID = 1986895299288322592L;
+    private List<PropertyBean> properties;
+
+    public List<PropertyBean> getProperties() {
+        return properties;
+    }
+
+    public void setProperties(List<PropertyBean> properties) {
+        this.properties = properties;
+    }
+
+    @Override
+    public String toString() {
+        return "Properties [properties=" + properties + "]";
+    }
+    
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/Property.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/Property.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/Property.java
deleted file mode 100644
index d433dcf..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/Property.java
+++ /dev/null
@@ -1,65 +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.common.beans.kubernetes;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-
-/**
- * Holds a property 
- */
-@XmlRootElement
-public class Property implements Serializable {
-    
-    private static final long serialVersionUID = -2191782657999410197L;
-
-    private String name;
-    private String value;
-    
-    public Property(){
-        
-    }
-    
-    public Property(String name, String value){
-        this.setName(name);
-        this.setValue(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;
-    }
-
-    @Override
-    public String toString() {
-        return "Property [name=" + name + ", value=" + value + "]";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PropertyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PropertyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PropertyBean.java
new file mode 100644
index 0000000..b15aaf4
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PropertyBean.java
@@ -0,0 +1,65 @@
+/*
+ * 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.kubernetes;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+
+/**
+ * Holds a property 
+ */
+@XmlRootElement
+public class PropertyBean implements Serializable {
+    
+    private static final long serialVersionUID = -2191782657999410197L;
+
+    private String name;
+    private String value;
+    
+    public PropertyBean(){
+        
+    }
+    
+    public PropertyBean(String name, String value){
+        this.setName(name);
+        this.setValue(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;
+    }
+
+    @Override
+    public String toString() {
+        return "Property [name=" + name + ", value=" + value + "]";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ApplicationLevelNetworkPartitionBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ApplicationLevelNetworkPartitionBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ApplicationLevelNetworkPartitionBean.java
new file mode 100644
index 0000000..5d3054f
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ApplicationLevelNetworkPartitionBean.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.partition;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class ApplicationLevelNetworkPartitionBean {
+
+    private String id;
+    private String kubernetesClusterId;
+    private boolean activeByDefault;
+    private List<PartitionBean> partitions;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getKubernetesClusterId() {
+        return kubernetesClusterId;
+    }
+
+    public void setKubernetesClusterId(String kubernetesClusterId) {
+        this.kubernetesClusterId = kubernetesClusterId;
+    }
+
+    public boolean isActiveByDefault() {
+        return activeByDefault;
+    }
+
+    public void setActiveByDefault(boolean activeByDefault) {
+        this.activeByDefault = activeByDefault;
+    }
+
+    public List<PartitionBean> getPartitions() {
+        return partitions;
+    }
+
+    public void setPartitions(List<PartitionBean> partitions) {
+        this.partitions = partitions;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ChildLevelNetworkPartitionBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ChildLevelNetworkPartitionBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ChildLevelNetworkPartitionBean.java
new file mode 100644
index 0000000..3a995a9
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ChildLevelNetworkPartitionBean.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.partition;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class ChildLevelNetworkPartitionBean {
+
+    private String id;
+    private String partitionAlgo;
+    private List<ChildLevelPartitionBean> partitions;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getPartitionAlgo() {
+        return partitionAlgo;
+    }
+
+    public void setPartitionAlgo(String partitionAlgo) {
+        this.partitionAlgo = partitionAlgo;
+    }
+
+    public List<ChildLevelPartitionBean> getPartitions() {
+        return partitions;
+    }
+
+    public void setPartitions(List<ChildLevelPartitionBean> partitions) {
+        this.partitions = partitions;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ChildLevelPartitionBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ChildLevelPartitionBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ChildLevelPartitionBean.java
new file mode 100644
index 0000000..1572a2a
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/ChildLevelPartitionBean.java
@@ -0,0 +1,44 @@
+/*
+ * 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.partition;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ChildLevelPartitionBean {
+
+    private String id;
+    private int max;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public int getMax() {
+        return max;
+    }
+
+    public void setMax(int max) {
+        this.max = max;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/PartitionBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/PartitionBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/PartitionBean.java
new file mode 100644
index 0000000..c9648c8
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/partition/PartitionBean.java
@@ -0,0 +1,88 @@
+/*
+ * 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.partition;
+
+import org.apache.stratos.common.beans.cartridge.PropertyBean;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class PartitionBean {
+
+    private String id;
+    private String description;
+    private boolean isPublic;
+    private String provider;
+    private String kubernetesClusterId;
+    private List<PropertyBean> property;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getProvider() {
+        return provider;
+    }
+
+    public void setProvider(String provider) {
+        this.provider = provider;
+    }
+
+    public boolean getIsPublic() {
+        return isPublic();
+    }
+
+    public boolean isPublic() {
+        return isPublic;
+    }
+
+    public void setPublic(boolean isPublic) {
+        this.isPublic = isPublic;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public List<PropertyBean> getProperty() {
+        return property;
+    }
+
+    public void setProperty(List<PropertyBean> property) {
+        this.property = property;
+    }
+
+    public String getKubernetesClusterId() {
+        return kubernetesClusterId;
+    }
+
+    public void setKubernetesClusterId(String kubernetesClusterId) {
+        this.kubernetesClusterId = kubernetesClusterId;
+    }
+}


[3/8] stratos git commit: Cleaning rest api bean classes

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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 5ff962f..d18d518 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
@@ -18,44 +18,38 @@
  */
 package org.apache.stratos.rest.endpoint.mock;
 
+import org.apache.stratos.common.beans.ApiResponseBean;
 import org.apache.stratos.common.beans.TenantInfoBean;
-import org.apache.stratos.common.beans.Cartridge;
 import org.apache.stratos.common.beans.UserInfoBean;
-import org.apache.stratos.common.beans.StratosApiResponse;
-import org.apache.stratos.common.beans.SubscriptionDomainRequest;
-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.AutoscalePolicy;
-import org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.common.beans.cartridge.definition.CartridgeDefinitionBean;
-import org.apache.stratos.common.beans.cartridge.definition.ServiceDefinitionBean;
-import org.apache.stratos.common.beans.subscription.domain.SubscriptionDomainBean;
-import org.apache.stratos.common.beans.topology.Cluster;
+import org.apache.stratos.common.beans.cartridge.CartridgeBean;
+import org.apache.stratos.common.beans.partition.ApplicationLevelNetworkPartitionBean;
+import org.apache.stratos.common.beans.partition.PartitionBean;
+import org.apache.stratos.common.beans.policy.autoscale.AutoscalePolicyBean;
+import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
+import org.apache.stratos.common.beans.topology.ClusterBean;
 import org.apache.stratos.messaging.domain.tenant.SubscriptionDomain;
-import org.apache.stratos.rest.endpoint.util.converter.ObjectConverter;
 import org.apache.stratos.rest.endpoint.exception.RestAPIException;
 import org.wso2.carbon.context.CarbonContext;
-import java.util.*;
 
 import javax.ws.rs.core.Response.Status;
+import java.util.*;
 
 public class MockContext {
     private static MockContext mockContext = new MockContext(); // singleton
 
     private Map<String, List<SubscriptionDomain>> subscriptionAliasToDomainMap = new HashMap<String, List<SubscriptionDomain>>();
     private Map<Integer, List<String>> tenantIdToAliasesMap = new HashMap<Integer, List<String>>();
-    private Map<Integer, List<CartridgeDefinitionBean>> cartridgeDefinitionBeanList = new HashMap<Integer, List<CartridgeDefinitionBean>>();
-    private Map<Integer, Map<String,Cartridge>> availableSingleTenantCartridges = new HashMap<Integer, Map<String,Cartridge>>();
-    private Map<Integer, Map<String,Cartridge>> availableMultiTenantCartridges = new HashMap<Integer, Map<String,Cartridge>>();
-    private Map<Integer, Map<String,Cartridge>> subscribedCartridges = new HashMap<Integer, Map<String,Cartridge>>();
+    private Map<Integer, List<CartridgeBean>> cartridgeDefinitionBeanList = new HashMap<Integer, List<CartridgeBean>>();
+    private Map<Integer, Map<String,CartridgeBean>> availableSingleTenantCartridges = new HashMap<Integer, Map<String,CartridgeBean>>();
+    private Map<Integer, Map<String,CartridgeBean>> availableMultiTenantCartridges = new HashMap<Integer, Map<String,CartridgeBean>>();
+    private Map<Integer, Map<String,CartridgeBean>> subscribedCartridges = new HashMap<Integer, Map<String,CartridgeBean>>();
     private Map<String,TenantInfoBean> tenantMap = new HashMap<String, TenantInfoBean>();
     private Map<Integer, Map<String, UserInfoBean>> tenantUserMap= new HashMap<Integer, Map<String, UserInfoBean>>();
     private Map<String, Integer> tenantIdMap = new HashMap<String, Integer>();
-    private Map<Integer, Map<String,Partition>> partitionMap = new HashMap<Integer, Map<String, Partition>>();
-    private Map<Integer, Map<String,AutoscalePolicy>> autoscalePolicyMap = new HashMap<Integer, Map<String, AutoscalePolicy>>();
-    private Map<Integer, Map<String,DeploymentPolicy>> deploymentPolicyMap = new HashMap<Integer, Map<String, DeploymentPolicy>>();
-    private Map<Integer, Map<String,ServiceDefinitionBean>> serviceDefinitionMap = new HashMap<Integer, Map<String, ServiceDefinitionBean>>();
-    private Map<String,Cluster> clusterMap = new HashMap<String, Cluster>();
+    private Map<Integer, Map<String,PartitionBean>> partitionMap = new HashMap<Integer, Map<String, PartitionBean>>();
+    private Map<Integer, Map<String,AutoscalePolicyBean>> autoscalePolicyMap = new HashMap<Integer, Map<String, AutoscalePolicyBean>>();
+    private Map<Integer, Map<String,DeploymentPolicyBean>> deploymentPolicyMap = new HashMap<Integer, Map<String, DeploymentPolicyBean>>();
+    private Map<String,ClusterBean> clusterMap = new HashMap<String, ClusterBean>();
     
     private int tenantIdCount=1;
     public static final int PUBLIC_DEFINITION = 0;
@@ -66,16 +60,16 @@ public class MockContext {
         return mockContext;
     }
 
-    public StratosApiResponse addCartirdgeDefinition(CartridgeDefinitionBean cartridgeDefinitionBean){
+    public ApiResponseBean addCartirdgeDefinition(CartridgeBean cartridgeDefinitionBean){
     	int tenantId = getTenantId();
-    	List<CartridgeDefinitionBean> tenantCartridges;
+    	List<CartridgeBean> tenantCartridges;
     	
     	if(!cartridgeDefinitionBean.isPublic()){
     		if(this.cartridgeDefinitionBeanList.containsKey(tenantId)){
         		tenantCartridges = this.cartridgeDefinitionBeanList.get(tenantId);
         	}
         	else{
-        		tenantCartridges = new LinkedList<CartridgeDefinitionBean>();
+        		tenantCartridges = new LinkedList<CartridgeBean>();
         		this.cartridgeDefinitionBeanList.put(tenantId, tenantCartridges);
         	}
     	}
@@ -84,30 +78,30 @@ public class MockContext {
         		tenantCartridges = this.cartridgeDefinitionBeanList.get(PUBLIC_DEFINITION);
         	}
         	else{
-        		tenantCartridges = new LinkedList<CartridgeDefinitionBean>();
+        		tenantCartridges = new LinkedList<CartridgeBean>();
         		this.cartridgeDefinitionBeanList.put(PUBLIC_DEFINITION, tenantCartridges);
         	}
     	}
     	
     	tenantCartridges.add(cartridgeDefinitionBean);
         
-    	Cartridge cartridge = new Cartridge();
-        cartridge.setCartridgeType(cartridgeDefinitionBean.getType());
+    	CartridgeBean cartridge = new CartridgeBean();
+        cartridge.setType(cartridgeDefinitionBean.getType());
         cartridge.setDescription(cartridgeDefinitionBean.getDescription());
         cartridge.setDisplayName(cartridgeDefinitionBean.getDisplayName());
         cartridge.setMultiTenant(cartridgeDefinitionBean.isMultiTenant());
         cartridge.setProvider(cartridgeDefinitionBean.getProvider());
         cartridge.setVersion(cartridgeDefinitionBean.getVersion());
-        cartridge.setIsPublic(cartridgeDefinitionBean.isPublic());
+        //cartridge.setIsPublic(cartridgeDefinitionBean.isPublic());
 
-        Map<String,Cartridge> cartridges;
+        Map<String,CartridgeBean> cartridges;
         if(cartridge.isMultiTenant()){
-        	if(!cartridge.getIsPublic()){
+        	if(!cartridge.isPublic()){
         		if(this.availableMultiTenantCartridges.containsKey(tenantId)){
             		cartridges = availableMultiTenantCartridges.get(tenantId);
             	}
             	else{
-            		cartridges = new HashMap<String,Cartridge>();
+            		cartridges = new HashMap<String,CartridgeBean>();
             		this.availableMultiTenantCartridges.put(tenantId, cartridges);
             	}
         	}else{
@@ -115,20 +109,20 @@ public class MockContext {
             		cartridges = availableMultiTenantCartridges.get(PUBLIC_DEFINITION);
             	}
             	else{
-            		cartridges = new HashMap<String,Cartridge>();
+            		cartridges = new HashMap<String,CartridgeBean>();
             		this.availableMultiTenantCartridges.put(PUBLIC_DEFINITION, cartridges);
             	}
         	}
         	
-            cartridges.put(cartridge.getCartridgeType(), cartridge);
+            cartridges.put(cartridge.getType(), cartridge);
             System.out.println(cartridges.size());
         }else{
-        	if(!cartridge.getIsPublic()){
+        	if(!cartridge.isPublic()){
         		if(this.availableSingleTenantCartridges.containsKey(tenantId)){
             		cartridges = availableSingleTenantCartridges.get(tenantId);
             	}
             	else{
-            		cartridges = new HashMap<String,Cartridge>();
+            		cartridges = new HashMap<String,CartridgeBean>();
             		this.availableSingleTenantCartridges.put(tenantId, cartridges);
             	}
         	}else{
@@ -136,27 +130,27 @@ public class MockContext {
             		cartridges = availableSingleTenantCartridges.get(PUBLIC_DEFINITION);
             	}
             	else{
-            		cartridges = new HashMap<String,Cartridge>();
+            		cartridges = new HashMap<String,CartridgeBean>();
             		this.availableSingleTenantCartridges.put(PUBLIC_DEFINITION, cartridges);
             	}
         	}
         	
-        	cartridges.put(cartridge.getCartridgeType(), cartridge);
+        	cartridges.put(cartridge.getType(), cartridge);
             System.out.println(cartridges.size());
         }
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully deployed cartridge definition with type ");
         return stratosApiResponse;
     }
 
-    public Cartridge[] getAvailableMultiTenantCartridges() throws RestAPIException{
+    public CartridgeBean[] getAvailableMultiTenantCartridges() throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!availableMultiTenantCartridges.containsKey(tenantId) && !availableMultiTenantCartridges.containsKey(PUBLIC_DEFINITION)){
-    		return new HashMap<String, Cartridge>().values().toArray(new Cartridge[0]);
+    		return new HashMap<String, CartridgeBean>().values().toArray(new CartridgeBean[0]);
     	}    	
     	
-    	List<Cartridge> p = new ArrayList<Cartridge>();
+    	List<CartridgeBean> p = new ArrayList<CartridgeBean>();
     	
 		if(availableMultiTenantCartridges.get(tenantId) != null)
     		p.addAll(availableMultiTenantCartridges.get(tenantId).values());
@@ -164,17 +158,17 @@ public class MockContext {
 		if(availableMultiTenantCartridges.get(PUBLIC_DEFINITION) != null)
 			p.addAll(availableMultiTenantCartridges.get(PUBLIC_DEFINITION).values());
     	
-    	return p.toArray(new Cartridge[0]);
+    	return p.toArray(new CartridgeBean[0]);
     }
 
 
-    public Cartridge[] getAvailableSingleTenantCartridges() throws RestAPIException{
+    public CartridgeBean[] getAvailableSingleTenantCartridges() throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!availableSingleTenantCartridges.containsKey(tenantId) && !availableSingleTenantCartridges.containsKey(PUBLIC_DEFINITION)){
-    		return new HashMap<String, Cartridge>().values().toArray(new Cartridge[0]);
+    		return new HashMap<String, CartridgeBean>().values().toArray(new CartridgeBean[0]);
     	}    	
     	
-    	List<Cartridge> p = new ArrayList<Cartridge>();
+    	List<CartridgeBean> p = new ArrayList<CartridgeBean>();
     	
 		if(availableSingleTenantCartridges.get(tenantId) != null)
     		p.addAll(availableSingleTenantCartridges.get(tenantId).values());
@@ -182,10 +176,10 @@ public class MockContext {
 		if(availableSingleTenantCartridges.get(PUBLIC_DEFINITION) != null)
 			p.addAll(availableSingleTenantCartridges.get(PUBLIC_DEFINITION).values());
     	
-    	return p.toArray(new Cartridge[0]);
+    	return p.toArray(new CartridgeBean[0]);
     }
 
-    public Cartridge[] getAvailableLbCartridges() throws RestAPIException{
+    public CartridgeBean[] getAvailableLbCartridges() throws RestAPIException{
         /*Map<String,Cartridge> availableLbCartridges = new HashMap<String,Cartridge>();
         Iterator it = availableSingleTenantCartridges.entrySet().iterator();
         while(it.hasNext()){
@@ -211,7 +205,7 @@ public class MockContext {
         return getAvailableSingleTenantCartridges();
     }
 
-    public Cartridge[] getAvailableCartridges() throws RestAPIException{
+    public CartridgeBean[] getAvailableCartridges() throws RestAPIException{
         /*Map<String, Cartridge> availableCartridges = new HashMap<String,Cartridge>();
         Iterator it = availableSingleTenantCartridges.entrySet().iterator();
         while(it.hasNext()){
@@ -239,12 +233,12 @@ public class MockContext {
     }
 
 
-    public Cartridge[] getSubscribedCartridges() throws RestAPIException{
+    public CartridgeBean[] getSubscribedCartridges() throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!subscribedCartridges.containsKey(tenantId) && !subscribedCartridges.containsKey(PUBLIC_DEFINITION)){
-    		return new HashMap<String, Cartridge>().values().toArray(new Cartridge[0]);
+    		return new HashMap<String, CartridgeBean>().values().toArray(new CartridgeBean[0]);
     	}
-        List<Cartridge> p = new ArrayList<Cartridge>();
+        List<CartridgeBean> p = new ArrayList<CartridgeBean>();
     	
 		if(subscribedCartridges.get(tenantId) != null)
     		p.addAll(subscribedCartridges.get(tenantId).values());
@@ -252,10 +246,10 @@ public class MockContext {
 		if(subscribedCartridges.get(PUBLIC_DEFINITION) != null)
 			p.addAll(subscribedCartridges.get(PUBLIC_DEFINITION).values());
     	
-    	return p.toArray(new Cartridge[0]);
+    	return p.toArray(new CartridgeBean[0]);
     }
 
-    public StratosApiResponse unsubscribe(String alias) throws RestAPIException{
+    public ApiResponseBean unsubscribe(String alias) throws RestAPIException{
     	int tenantId = getTenantId();
     	if(subscribedCartridges.containsKey(tenantId)){
         	if((subscribedCartridges.get(tenantId)).containsKey(alias)){
@@ -264,12 +258,12 @@ public class MockContext {
         }else{
             throw new RestAPIException(Status.NO_CONTENT,"Unable to un-subscribe");
         }
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully un-subscribed");
         return stratosApiResponse;
     }
 
-    public Cartridge getCartridgeInfo(String alias) throws RestAPIException{
+    public CartridgeBean getCartridgeInfo(String alias) throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!subscribedCartridges.containsKey(tenantId))
     		throw new RestAPIException(Status.NO_CONTENT, "No cartridges subscribed for current tenant.");
@@ -280,7 +274,7 @@ public class MockContext {
         return (subscribedCartridges.get(tenantId)).get(alias);
     }
 
-    public Cartridge getAvailableSingleTenantCartridgeInfo(String cartridgeType) throws RestAPIException{
+    public CartridgeBean getAvailableSingleTenantCartridgeInfo(String cartridgeType) throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!availableSingleTenantCartridges.containsKey(tenantId)){
         	if(!availableSingleTenantCartridges.containsKey(PUBLIC_DEFINITION)){
@@ -297,7 +291,7 @@ public class MockContext {
         return (availableSingleTenantCartridges.get(tenantId)).get(cartridgeType);
     }
     
-    public Cartridge getAvailableMultiTenantCartridgeInfo(String cartridgeType) throws RestAPIException{
+    public CartridgeBean getAvailableMultiTenantCartridgeInfo(String cartridgeType) throws RestAPIException{
     	int tenantId = getTenantId();
         if(!availableMultiTenantCartridges.containsKey(tenantId)){
         	if(!availableMultiTenantCartridges.containsKey(PUBLIC_DEFINITION)){
@@ -314,11 +308,11 @@ public class MockContext {
         return (availableMultiTenantCartridges.get(tenantId)).get(cartridgeType);
     }
     
-    public StratosApiResponse deleteCartridgeDefinition(String cartridgeType) throws RestAPIException{
+    public ApiResponseBean deleteCartridgeDefinition(String cartridgeType) throws RestAPIException{
     	if(!deleteFromAvailableSingleTenantCartridgeDefinitions(cartridgeType) && !deleteFromAvailableMultiTenantCartridgeDefinitions(cartridgeType)){
     		throw new RestAPIException(Status.NO_CONTENT,"No cartridges defined for tenant");
     	}
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully delete cartridge definition");
         return stratosApiResponse;
     }
@@ -361,7 +355,7 @@ public class MockContext {
         return true;
     }
 
-    public StratosApiResponse addTenant(TenantInfoBean tenantInfoBean) throws RestAPIException{
+    public ApiResponseBean addTenant(TenantInfoBean tenantInfoBean) throws RestAPIException{
     	try{
             tenantMap.put(tenantInfoBean.getTenantDomain(),tenantInfoBean);
             tenantInfoBean.setTenantId(tenantIdCount);
@@ -369,7 +363,7 @@ public class MockContext {
         }catch (Exception e){
             throw new RestAPIException(Status.INTERNAL_SERVER_ERROR,e.getMessage());
         }
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully added new Tenant");
         return stratosApiResponse;
     }
@@ -381,14 +375,14 @@ public class MockContext {
         return tenantMap.get(tenantDomain);
     }
     
-    public StratosApiResponse deleteTenant(String tenantDomain) {
+    public ApiResponseBean deleteTenant(String tenantDomain) {
         if(tenantMap.containsKey(tenantDomain)){
         	TenantInfoBean tenant=tenantMap.get(tenantDomain);
         	tenantMap.remove(tenantDomain);
         	tenantIdMap.remove(tenant.getTenantId());
         }
     	        
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully deleted tenant");
         return stratosApiResponse;
     }
@@ -407,38 +401,38 @@ public class MockContext {
         return searchResult.toArray(new TenantInfoBean[0]);
     }
 
-    public StratosApiResponse activateTenant(String tenantDomain) throws RestAPIException{
+    public ApiResponseBean activateTenant(String tenantDomain) throws RestAPIException{
         if(tenantMap.containsKey(tenantDomain)){
             tenantMap.get(tenantDomain).setActive(true);
         } else{
             throw new RestAPIException(Status.BAD_REQUEST,"Invalid tenant domain");
         }
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully activated Tenant");
         return stratosApiResponse;
     }
 
-    public StratosApiResponse deactivateTenant(String tenantDomain) throws RestAPIException{
+    public ApiResponseBean deactivateTenant(String tenantDomain) throws RestAPIException{
         if(tenantMap.containsKey(tenantDomain)){
             tenantMap.get(tenantDomain).setActive(false);
         } else{
             throw new RestAPIException(Status.BAD_REQUEST,"Invalid tenant domain");
         }
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully deactivated Tenant");
         return stratosApiResponse;
     }
 
-    public StratosApiResponse addPartition(Partition partition) {
+    public ApiResponseBean addPartition(PartitionBean partition) {
     	int tenantId = getTenantId();
-    	Map<String,Partition> partitions;
+    	Map<String,PartitionBean> partitions;
     	
     	if(!partition.isPublic()){
     		if (partitionMap.containsKey(tenantId)){
         		partitions = partitionMap.get(tenantId);
         	}
         	else{
-        		partitions = new HashMap<String, Partition>();
+        		partitions = new HashMap<String, PartitionBean>();
         		partitionMap.put(tenantId, partitions);
         	}
     	}
@@ -447,27 +441,27 @@ public class MockContext {
     			partitions = partitionMap.get(PUBLIC_DEFINITION);
     		}
     		else{
-    			partitions = new HashMap<String, Partition>();
+    			partitions = new HashMap<String, PartitionBean>();
         		partitionMap.put(PUBLIC_DEFINITION, partitions);
     		}
     	} 	
     	
     	partitions.put(partition.getId(), partition);
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully deployed partition");
         return stratosApiResponse;
     }
 
-    public StratosApiResponse addAutoScalingPolicyDefinition(AutoscalePolicy autoscalePolicy) {
+    public ApiResponseBean addAutoScalingPolicyDefinition(AutoscalePolicyBean autoscalePolicy) {
     	int tenantId = getTenantId();
-    	Map<String,AutoscalePolicy> policies;
+    	Map<String,AutoscalePolicyBean> policies;
     	
     	if(!autoscalePolicy.getIsPublic()){
     		if (autoscalePolicyMap.containsKey(tenantId)){
         		policies = autoscalePolicyMap.get(tenantId);
         	}
         	else{
-        		policies = new HashMap<String, AutoscalePolicy>();
+        		policies = new HashMap<String, AutoscalePolicyBean>();
         		autoscalePolicyMap.put(tenantId, policies);
         	}
     	}
@@ -476,27 +470,27 @@ public class MockContext {
     			policies = autoscalePolicyMap.get(PUBLIC_DEFINITION);
     		}
     		else{
-    			policies = new HashMap<String, AutoscalePolicy>();
+    			policies = new HashMap<String, AutoscalePolicyBean>();
     			autoscalePolicyMap.put(PUBLIC_DEFINITION, policies);
     		}
     	}
     	
     	policies.put(autoscalePolicy.getId(), autoscalePolicy);
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully deployed auto scaling policy definition");
         return stratosApiResponse;
     }
 
-    public StratosApiResponse addDeploymentPolicyDefinition(DeploymentPolicy deploymentPolicy) {
+    public ApiResponseBean addDeploymentPolicyDefinition(DeploymentPolicyBean deploymentPolicy) {
     	int tenantId = getTenantId();
-    	Map<String,DeploymentPolicy> policies;
+    	Map<String,DeploymentPolicyBean> policies;
     	
     	if(!deploymentPolicy.isPublic()){
     		if (deploymentPolicyMap.containsKey(tenantId)){
         		policies = deploymentPolicyMap.get(tenantId);
         	}
         	else{
-        		policies = new HashMap<String, DeploymentPolicy>();
+        		policies = new HashMap<String, DeploymentPolicyBean>();
         		deploymentPolicyMap.put(tenantId, policies);
         	}
     	}
@@ -505,24 +499,24 @@ public class MockContext {
     			policies = deploymentPolicyMap.get(PUBLIC_DEFINITION);
     		}
     		else{
-    			policies = new HashMap<String, DeploymentPolicy>();
+    			policies = new HashMap<String, DeploymentPolicyBean>();
     			deploymentPolicyMap.put(PUBLIC_DEFINITION, policies);
     		}
     	}
     	
     	policies.put(deploymentPolicy.getApplicationId() +UUID.randomUUID().getLeastSignificantBits(),deploymentPolicy);
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully deployed deployment policy definition");
         return stratosApiResponse;
     }
 
-    public Partition[] getPartitions() throws RestAPIException{
+    public PartitionBean[] getPartitions() throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!partitionMap.containsKey(tenantId) && !partitionMap.containsKey(PUBLIC_DEFINITION)){
-        	return new HashMap<String,Partition>().values().toArray(new Partition[0]);
+        	return new HashMap<String,PartitionBean>().values().toArray(new PartitionBean[0]);
     	}
     	
-    	List<Partition> p = new ArrayList<Partition>();
+    	List<PartitionBean> p = new ArrayList<PartitionBean>();
     	
 		if(partitionMap.get(tenantId) != null)
     		p.addAll(partitionMap.get(tenantId).values());
@@ -530,10 +524,10 @@ public class MockContext {
 		if(partitionMap.get(PUBLIC_DEFINITION) != null)
 			p.addAll(partitionMap.get(PUBLIC_DEFINITION).values());
     	
-    	return p.toArray(new Partition[0]);
+    	return p.toArray(new PartitionBean[0]);
     }
 
-    public Partition getPartition(String partitionId) throws RestAPIException{
+    public PartitionBean getPartition(String partitionId) throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!partitionMap.containsKey(tenantId)){
         	if(!partitionMap.containsKey(PUBLIC_DEFINITION)){
@@ -552,7 +546,7 @@ public class MockContext {
         }
     }
 
-    public Partition[] getPartitionsOfPolicy(String deploymentPolicyId) throws RestAPIException{
+    public PartitionBean[] getPartitionsOfPolicy(String deploymentPolicyId) throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!deploymentPolicyMap.containsKey(tenantId)){
     		if(!deploymentPolicyMap.containsKey(PUBLIC_DEFINITION)){
@@ -562,7 +556,7 @@ public class MockContext {
     			if(!(deploymentPolicyMap.get(PUBLIC_DEFINITION)).containsKey(deploymentPolicyId)){
         			throw new RestAPIException(Status.NO_CONTENT,"There is no deployment policy with id: " + deploymentPolicyId);
         		}
-        		return (deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).getApplicationPolicy().getNetworkPartition().get(0).getPartitions().toArray(new Partition[0]);
+        		return (deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).getApplicationPolicy().getNetworkPartition().get(0).getPartitions().toArray(new PartitionBean[0]);
     		}
     	}
         	
@@ -571,10 +565,10 @@ public class MockContext {
         }
         //FIXME to parse thr all the NW partitions
     	return (deploymentPolicyMap.get(tenantId)).
-                get(deploymentPolicyId).getApplicationPolicy().getNetworkPartition().get(0).getPartitions().toArray(new Partition[0]);
+                get(deploymentPolicyId).getApplicationPolicy().getNetworkPartition().get(0).getPartitions().toArray(new PartitionBean[0]);
     }
 
-    public ApplicationLevelNetworkPartition[] getPartitionGroups(String deploymentPolicyId)  throws RestAPIException{
+    public ApplicationLevelNetworkPartitionBean[] getPartitionGroups(String deploymentPolicyId)  throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!deploymentPolicyMap.containsKey(tenantId)){
     		if(!deploymentPolicyMap.containsKey(PUBLIC_DEFINITION)){
@@ -584,23 +578,23 @@ public class MockContext {
     			if(!(deploymentPolicyMap.get(PUBLIC_DEFINITION)).containsKey(deploymentPolicyId)){
         			throw new RestAPIException(Status.NO_CONTENT,"There is no deployment policy with id: " + deploymentPolicyId);
         		}
-        		return (deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).getApplicationPolicy().getNetworkPartition().toArray(new ApplicationLevelNetworkPartition[0]);
+        		return (deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).getApplicationPolicy().getNetworkPartition().toArray(new ApplicationLevelNetworkPartitionBean[0]);
     		}
     	}
         	
     	if(!(deploymentPolicyMap.get(tenantId)).containsKey(deploymentPolicyId)){
     		throw new RestAPIException(Status.NO_CONTENT,"There is no deployment policy with id: " + deploymentPolicyId);
         }
-    	return (deploymentPolicyMap.get(tenantId)).get(deploymentPolicyId).getApplicationPolicy().getNetworkPartition().toArray(new ApplicationLevelNetworkPartition[0]);
+    	return (deploymentPolicyMap.get(tenantId)).get(deploymentPolicyId).getApplicationPolicy().getNetworkPartition().toArray(new ApplicationLevelNetworkPartitionBean[0]);
     }
 
-    public AutoscalePolicy[] getAutoscalePolicies()  throws RestAPIException{
+    public AutoscalePolicyBean[] getAutoscalePolicies()  throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!autoscalePolicyMap.containsKey(tenantId) && !autoscalePolicyMap.containsKey(PUBLIC_DEFINITION)){
-    			return new HashMap<String,AutoscalePolicy>().values().toArray(new AutoscalePolicy[0]);
+    			return new HashMap<String,AutoscalePolicyBean>().values().toArray(new AutoscalePolicyBean[0]);
     	}
     	
-    	List<AutoscalePolicy> p = new ArrayList<AutoscalePolicy>();
+    	List<AutoscalePolicyBean> p = new ArrayList<AutoscalePolicyBean>();
     	
 		if(autoscalePolicyMap.get(tenantId) != null)
     		p.addAll(autoscalePolicyMap.get(tenantId).values());
@@ -608,10 +602,10 @@ public class MockContext {
 		if(autoscalePolicyMap.get(PUBLIC_DEFINITION) != null)
 			p.addAll(autoscalePolicyMap.get(PUBLIC_DEFINITION).values());
     	
-    	return p.toArray(new AutoscalePolicy[0]);
+    	return p.toArray(new AutoscalePolicyBean[0]);
     }
 
-    public AutoscalePolicy getAutoscalePolicies(String autoscalePolicyId) throws  RestAPIException{
+    public AutoscalePolicyBean getAutoscalePolicies(String autoscalePolicyId) throws  RestAPIException{
     	int tenantId = getTenantId();
     	if(!autoscalePolicyMap.containsKey(tenantId)){
     		if(!autoscalePolicyMap.containsKey(PUBLIC_DEFINITION)){
@@ -630,13 +624,13 @@ public class MockContext {
     	}
     }
 
-    public DeploymentPolicy[] getDeploymentPolicies() throws RestAPIException{
+    public DeploymentPolicyBean[] getDeploymentPolicies() throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!deploymentPolicyMap.containsKey(tenantId) && !deploymentPolicyMap.containsKey(PUBLIC_DEFINITION)){
-			return new HashMap<String,DeploymentPolicy>().values().toArray(new DeploymentPolicy[0]);
+			return new HashMap<String,DeploymentPolicyBean>().values().toArray(new DeploymentPolicyBean[0]);
     	}
 	
-    	List<DeploymentPolicy> p = new ArrayList<DeploymentPolicy>();
+    	List<DeploymentPolicyBean> p = new ArrayList<DeploymentPolicyBean>();
     	
     	if(deploymentPolicyMap.get(tenantId) != null)
     		p.addAll(deploymentPolicyMap.get(tenantId).values());
@@ -644,10 +638,10 @@ public class MockContext {
     	if(deploymentPolicyMap.get(PUBLIC_DEFINITION) != null)
     		p.addAll(deploymentPolicyMap.get(PUBLIC_DEFINITION).values());
     	
-    	return p.toArray(new DeploymentPolicy[0]);
+    	return p.toArray(new DeploymentPolicyBean[0]);
     }
 
-    public DeploymentPolicy getDeploymentPolicies(String deploymentPolicyId) throws RestAPIException{
+    public DeploymentPolicyBean getDeploymentPolicies(String deploymentPolicyId) throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!deploymentPolicyMap.containsKey(tenantId)){
     		if(!deploymentPolicyMap.containsKey(PUBLIC_DEFINITION)){
@@ -668,67 +662,39 @@ public class MockContext {
     	}
     }
     
-    public StratosApiResponse deployService(ServiceDefinitionBean serviceDefinitionBean) {
-    	int tenantId = getTenantId();
-    	Map<String,ServiceDefinitionBean> serviceDefinitions;
-    	
-    	if(!serviceDefinitionBean.getIsPublic()){
-        	if(!serviceDefinitionMap.containsKey(tenantId)){
-        		serviceDefinitions = new HashMap<String,ServiceDefinitionBean>();
-        		serviceDefinitionMap.put(tenantId, serviceDefinitions);
-        	}
-        	else{
-        		serviceDefinitions = serviceDefinitionMap.get(tenantId);
-        	}
-    	}
-    	else{
-    		if(!serviceDefinitionMap.containsKey(PUBLIC_DEFINITION)){
-        		serviceDefinitions = new HashMap<String,ServiceDefinitionBean>();
-        		serviceDefinitionMap.put(PUBLIC_DEFINITION, serviceDefinitions);
-        	}
-        	else{
-        		serviceDefinitions = serviceDefinitionMap.get(PUBLIC_DEFINITION);
-        	}
-    	}
-    	
-    	serviceDefinitions.put(serviceDefinitionBean.getCartridgeType(),serviceDefinitionBean);
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+    public ApiResponseBean deployService(Object serviceDefinitionBean) {
+//    	int tenantId = getTenantId();
+//    	Map<String,ServiceDefinitionBean> serviceDefinitions;
+//
+//    	if(!serviceDefinitionBean.getIsPublic()){
+//        	if(!serviceDefinitionMap.containsKey(tenantId)){
+//        		serviceDefinitions = new HashMap<String,ServiceDefinitionBean>();
+//        		serviceDefinitionMap.put(tenantId, serviceDefinitions);
+//        	}
+//        	else{
+//        		serviceDefinitions = serviceDefinitionMap.get(tenantId);
+//        	}
+//    	}
+//    	else{
+//    		if(!serviceDefinitionMap.containsKey(PUBLIC_DEFINITION)){
+//        		serviceDefinitions = new HashMap<String,ServiceDefinitionBean>();
+//        		serviceDefinitionMap.put(PUBLIC_DEFINITION, serviceDefinitions);
+//        	}
+//        	else{
+//        		serviceDefinitions = serviceDefinitionMap.get(PUBLIC_DEFINITION);
+//        	}
+//    	}
+//
+//    	serviceDefinitions.put(serviceDefinitionBean.getCartridgeType(),serviceDefinitionBean);
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully deployed service");
         return stratosApiResponse;
 
     }
-       
-    public ServiceDefinitionBean[] getServices() throws RestAPIException{
-    	int tenantId = getTenantId();
-    	if(!serviceDefinitionMap.containsKey(tenantId) && !serviceDefinitionMap.containsKey(PUBLIC_DEFINITION)){
-    			return new HashMap<String,ServiceDefinitionBean>().values().toArray(new ServiceDefinitionBean[0]);
-    	}
-    	   	
-    	List<ServiceDefinitionBean> p = new ArrayList<ServiceDefinitionBean>();
-    	
-    	if(serviceDefinitionMap.get(tenantId) != null)
-    		p.addAll(serviceDefinitionMap.get(tenantId).values());
-    	
-    	if(serviceDefinitionMap.get(PUBLIC_DEFINITION) != null)
-    		p.addAll(serviceDefinitionMap.get(PUBLIC_DEFINITION).values());
-    	
-    	return p.toArray(new ServiceDefinitionBean[0]);
-    }
-
-    public ServiceDefinitionBean getServiceType(String serviceType) throws RestAPIException{
-    	int tenantId = getTenantId();
-    	if(!serviceDefinitionMap.containsKey(tenantId)){
-        	if(!serviceDefinitionMap.containsKey(PUBLIC_DEFINITION)){
-        		throw new RestAPIException(Status.NO_CONTENT,"No services have been defined for tenant");
-        	}
-        	return (serviceDefinitionMap.get(PUBLIC_DEFINITION)).get(serviceType);
-        }
-        return (serviceDefinitionMap.get(tenantId)).get(serviceType);
-    }
 
-    public Partition[] getPartitions(String deploymentPolicyId, String partitionGroupId) throws RestAPIException{
+    public PartitionBean[] getPartitions(String deploymentPolicyId, String partitionGroupId) throws RestAPIException{
     	int tenantId = getTenantId();
-    	DeploymentPolicy deploymentPolicy;
+    	DeploymentPolicyBean deploymentPolicy;
     	
     	if(!deploymentPolicyMap.containsKey(tenantId)){
     		if(!deploymentPolicyMap.containsKey(PUBLIC_DEFINITION)){
@@ -752,10 +718,10 @@ public class MockContext {
     		}
     	}
         	  	
-        Partition[] partitions = null;
-         for(ApplicationLevelNetworkPartition networkPartition : deploymentPolicy.getApplicationPolicy().getNetworkPartition()){
+        PartitionBean[] partitions = null;
+         for(ApplicationLevelNetworkPartitionBean networkPartition : deploymentPolicy.getApplicationPolicy().getNetworkPartition()){
              if(networkPartition.getId().equals(partitionGroupId)){
-                 partitions =  networkPartition.getPartitions().toArray(new Partition[0]);
+                 partitions =  networkPartition.getPartitions().toArray(new PartitionBean[0]);
              }
          }
         if(partitions == null){
@@ -764,86 +730,28 @@ public class MockContext {
         return partitions;
     }
     
-    public Cluster[] getClusters() throws RestAPIException{
-        return clusterMap.values().toArray(new Cluster[0]);
+    public ClusterBean[] getClusters() throws RestAPIException{
+        return clusterMap.values().toArray(new ClusterBean[0]);
     }
     
-    public DeploymentPolicy[] getDeploymentPoliciesForCartridgeType(String cartridgeType) throws RestAPIException{
+    public DeploymentPolicyBean[] getDeploymentPoliciesForCartridgeType(String cartridgeType) throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!deploymentPolicyMap.containsKey(tenantId)){
         	if(!deploymentPolicyMap.containsKey(PUBLIC_DEFINITION)){
-        		return new HashMap<String,DeploymentPolicy>().values().toArray(new DeploymentPolicy[0]);
+        		return new HashMap<String,DeploymentPolicyBean>().values().toArray(new DeploymentPolicyBean[0]);
         	}
         	else{
-        		return (deploymentPolicyMap.get(PUBLIC_DEFINITION)).values().toArray(new DeploymentPolicy[0]);
+        		return (deploymentPolicyMap.get(PUBLIC_DEFINITION)).values().toArray(new DeploymentPolicyBean[0]);
         	}
         }
         else{
-        	return (deploymentPolicyMap.get(tenantId)).values().toArray(new DeploymentPolicy[0]);
+        	return (deploymentPolicyMap.get(tenantId)).values().toArray(new DeploymentPolicyBean[0]);
         }
     }
 
-	public StratosApiResponse addSubscriptionDomains(int tenantId, String alias, SubscriptionDomainRequest request) {
-		// populate new alias
-		List<String> aliasList;
-		if(tenantIdToAliasesMap.containsKey(tenantId)) {
-			aliasList = tenantIdToAliasesMap.get(tenantId);
-		} else {
-			aliasList = new ArrayList<String>();
-		}
-		aliasList.add(alias);
-		tenantIdToAliasesMap.put(tenantId, aliasList);
-		
-		// populate domains
-		List<SubscriptionDomain> list;
-		if(subscriptionAliasToDomainMap.containsKey(alias)) {
-			list = subscriptionAliasToDomainMap.get(alias);
-		} else {
-			list = new ArrayList<SubscriptionDomain>();
-		}
-		for (org.apache.stratos.common.beans.subscription.domain.SubscriptionDomainBean bean : request.getDomains()) {
-			
-			SubscriptionDomain subscriptionDomain = new SubscriptionDomain(bean.getDomainName(), bean.getApplicationContext());
-			list.add(subscriptionDomain);
-		}
-		
-		subscriptionAliasToDomainMap.put(alias, list);
-		
-		StratosApiResponse stratosApiResponse = new StratosApiResponse();
-        stratosApiResponse.setMessage("Successfully added subscription domain/s.");
-        return stratosApiResponse;
-	}
-
-	public List<SubscriptionDomainBean> getSubscriptionDomains(int tenantId, String alias) {
-		List<String> tenantAliases = tenantIdToAliasesMap.get(tenantId);
-		if(tenantAliases != null && tenantAliases.contains(alias)) {
-			
-			return ObjectConverter.populateSubscriptionDomainPojos(subscriptionAliasToDomainMap.get(alias));
-		}
-        return new ArrayList<SubscriptionDomainBean>();
-	}
-
-	public SubscriptionDomainBean getSubscriptionDomain(int tenantId, String cartridgeType,
-			String subscriptionAlias, String domainName) throws RestAPIException {
-		List<String> tenantAliases = tenantIdToAliasesMap.get(tenantId);
-		if(tenantAliases != null && tenantAliases.contains(subscriptionAlias)) {
-			for (SubscriptionDomain subscriptionDomain : subscriptionAliasToDomainMap.get(subscriptionAlias)) {
-				if(subscriptionDomain.getDomainName().equals(domainName)) {
-					
-					return ObjectConverter.populateSubscriptionDomainPojo(subscriptionDomain);
-				}
-			}
-		}
-
-		String message = "Could not find a subscription [domain] " + domainName
-				+ " for Cartridge [type] " + cartridgeType + " and [alias] "
-				+ subscriptionAlias;
-		throw new RestAPIException(Status.NOT_FOUND, message);
-	}
-
-	public StratosApiResponse removeSubscriptionDomain(int tenantId,
+	public ApiResponseBean removeSubscriptionDomain(int tenantId,
 			String subscriptionAlias, String domainName) {
-		StratosApiResponse stratosApiResponse = new StratosApiResponse();
+		ApiResponseBean stratosApiResponse = new ApiResponseBean();
 		
 		List<String> tenantAliases = tenantIdToAliasesMap.get(tenantId);
 		if(tenantAliases != null && tenantAliases.contains(subscriptionAlias)) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/8bf5f947/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 3ae9082..21b2ecb 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
@@ -19,32 +19,21 @@
 package org.apache.stratos.rest.endpoint.mock;
 
 
-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.common.beans.Cartridge;
+import org.apache.stratos.common.beans.*;
+import org.apache.stratos.common.beans.cartridge.CartridgeBean;
+import org.apache.stratos.common.beans.partition.ApplicationLevelNetworkPartitionBean;
+import org.apache.stratos.common.beans.partition.PartitionBean;
+import org.apache.stratos.common.beans.policy.autoscale.AutoscalePolicyBean;
+import org.apache.stratos.common.beans.policy.deployment.DeploymentPolicyBean;
+import org.apache.stratos.common.beans.topology.ClusterBean;
 import org.apache.stratos.manager.exception.StratosManagerException;
-import org.apache.stratos.common.beans.UserInfoBean;
 import org.apache.stratos.rest.endpoint.Utils;
 import org.apache.stratos.rest.endpoint.annotation.AuthorizationAction;
 import org.apache.stratos.rest.endpoint.annotation.SuperTenantService;
-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;
-import org.apache.stratos.common.beans.autoscaler.partition.Partition;
-import org.apache.stratos.common.beans.autoscaler.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.common.beans.cartridge.definition.CartridgeDefinitionBean;
-import org.apache.stratos.common.beans.cartridge.definition.ServiceDefinitionBean;
-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 java.util.List;
-
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 import javax.ws.rs.*;
@@ -52,6 +41,8 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
+import java.net.URI;
+import java.util.List;
 
 @Path("/")
 public class StratosApiV40Mock {
@@ -64,10 +55,10 @@ public class StratosApiV40Mock {
     @POST
     @Path("/init")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public StratosApiResponse initialize ()
+    public ApiResponseBean initialize ()
             throws RestAPIException {
 
-        StratosApiResponse stratosApiResponse = new StratosApiResponse();
+        ApiResponseBean stratosApiResponse = new ApiResponseBean();
         stratosApiResponse.setMessage("Successfully logged in");
         return stratosApiResponse;
     }
@@ -90,7 +81,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableMultiTenantCartridges() throws RestAPIException {
+    public CartridgeBean[] getAvailableMultiTenantCartridges() throws RestAPIException {
           return MockContext.getInstance().getAvailableMultiTenantCartridges();
     }
 
@@ -99,7 +90,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableSingleTenantCartridges() throws RestAPIException {
+    public CartridgeBean[] getAvailableSingleTenantCartridges() throws RestAPIException {
          return MockContext.getInstance().getAvailableSingleTenantCartridges();
     }
 
@@ -108,7 +99,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableCartridges() throws RestAPIException {
+    public CartridgeBean[] getAvailableCartridges() throws RestAPIException {
          return MockContext.getInstance().getAvailableCartridges();
     }
 
@@ -117,7 +108,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getSubscribedCartridges() throws RestAPIException {
+    public CartridgeBean[] getSubscribedCartridges() throws RestAPIException {
          return MockContext.getInstance().getSubscribedCartridges();
     }
 
@@ -126,7 +117,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Response subscribe(CartridgeInfoBean cartridgeInfoBean) throws RestAPIException{
+    public Response subscribe(Object cartridgeInfoBean) throws RestAPIException{
           throw new RuntimeException("Not implemented");
     }
 
@@ -136,7 +127,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge getCartridgeInfo(@PathParam("subscriptionAlias") String subscriptionAlias) throws RestAPIException {
+    public CartridgeBean getCartridgeInfo(@PathParam("subscriptionAlias") String subscriptionAlias) throws RestAPIException {
         return MockContext.getInstance().getCartridgeInfo(subscriptionAlias);
     }
 
@@ -145,7 +136,7 @@ public class StratosApiV40Mock {
     @Path("/cartridge/unsubscribe")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public StratosApiResponse unsubscribe(String alias) throws RestAPIException{
+    public ApiResponseBean unsubscribe(String alias) throws RestAPIException{
           return MockContext.getInstance().unsubscribe(alias);
     }
 
@@ -155,7 +146,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse addTenant(TenantInfoBean tenantInfoBean) throws RestAPIException {
+    public ApiResponseBean addTenant(TenantInfoBean tenantInfoBean) throws RestAPIException {
     	return MockContext.getInstance().addTenant(tenantInfoBean);
     }
 
@@ -165,7 +156,7 @@ public class StratosApiV40Mock {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse updateTenant(TenantInfoBean tenantInfoBean) throws RestAPIException {
+    public ApiResponseBean updateTenant(TenantInfoBean tenantInfoBean) throws RestAPIException {
         return MockContext.getInstance().addTenant(tenantInfoBean);
     }
 
@@ -185,7 +176,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deleteTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
+    public ApiResponseBean deleteTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
          return  MockContext.getInstance().deleteTenant(tenantDomain);
     }
 
@@ -224,7 +215,7 @@ public class StratosApiV40Mock {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deactivateTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
+    public ApiResponseBean deactivateTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
         return  MockContext.getInstance().deactivateTenant(tenantDomain);
     }
 
@@ -234,31 +225,10 @@ public class StratosApiV40Mock {
    @Consumes("application/json")
    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
    @SuperTenantService(true)
-   public StratosApiResponse deployService(ServiceDefinitionBean serviceDefinitionBean)
+   public ApiResponseBean deployService(Object serviceDefinitionBean)
            throws RestAPIException {
-
-       log.info("Service definition request.. : " + serviceDefinitionBean.getServiceName());
-       return MockContext.getInstance().deployService(serviceDefinitionBean);
+       throw new RestAPIException("Not implemented");
    }
-    @GET
-    @Path("/service")
-    @Produces("application/json")
-    @Consumes("application/json")
-    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public ServiceDefinitionBean[] getServices () throws RestAPIException {
-        return MockContext.getInstance().getServices();
-
-    }
-
-    @GET
-    @Path("/service/{serviceType}")
-    @Produces("application/json")
-    @Consumes("application/json")
-    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public ServiceDefinitionBean getService(@PathParam("serviceType") String serviceType)throws RestAPIException {
-
-        return MockContext.getInstance().getServiceType(serviceType);
-    }
 
     @POST
     @Path("/cartridge/definition/")
@@ -266,7 +236,7 @@ public class StratosApiV40Mock {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deployCartridgeDefinition (CartridgeDefinitionBean cartridgeDefinitionBean)
+    public ApiResponseBean deployCartridgeDefinition (CartridgeBean cartridgeDefinitionBean)
             throws RestAPIException {
         return MockContext.getInstance().addCartirdgeDefinition(cartridgeDefinitionBean);
     }
@@ -286,7 +256,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge getAvailableSingleTenantCartridgeInfo(@PathParam("cartridgeType") String cartridgeType)
+    public CartridgeBean getAvailableSingleTenantCartridgeInfo(@PathParam("cartridgeType") String cartridgeType)
             throws StratosManagerException, RestAPIException {
         return MockContext.getInstance().getAvailableSingleTenantCartridgeInfo(cartridgeType);
     }
@@ -296,7 +266,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableLbCartridges() throws RestAPIException {
+    public CartridgeBean[] getAvailableLbCartridges() throws RestAPIException {
         return MockContext.getInstance().getAvailableLbCartridges();
     }
 
@@ -308,7 +278,7 @@ public class StratosApiV40Mock {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deployPartition (Partition partition)
+    public ApiResponseBean deployPartition (PartitionBean partition)
             throws RestAPIException {
         return MockContext.getInstance().addPartition(partition);
     }
@@ -319,7 +289,7 @@ public class StratosApiV40Mock {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deployAutoscalingPolicyDefintion (AutoscalePolicy autoscalePolicy)
+    public ApiResponseBean deployAutoscalingPolicyDefintion (AutoscalePolicyBean autoscalePolicy)
             throws RestAPIException {
           return MockContext.getInstance().addAutoScalingPolicyDefinition(autoscalePolicy);
 
@@ -331,7 +301,7 @@ public class StratosApiV40Mock {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public StratosApiResponse deployDeploymentPolicyDefinition (DeploymentPolicy deploymentPolicy)
+    public ApiResponseBean deployDeploymentPolicyDefinition (DeploymentPolicyBean deploymentPolicy)
             throws RestAPIException {
            return MockContext.getInstance().addDeploymentPolicyDefinition(deploymentPolicy);
 
@@ -342,7 +312,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Partition[] getPartitions () throws RestAPIException {
+    public PartitionBean[] getPartitions () throws RestAPIException {
             return MockContext.getInstance().getPartitions();
 
     }
@@ -352,7 +322,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Partition getPartition (@PathParam("partitionId") String partitionId) throws RestAPIException {
+    public PartitionBean getPartition (@PathParam("partitionId") String partitionId) throws RestAPIException {
             return MockContext.getInstance().getPartition(partitionId);
 
     }
@@ -362,7 +332,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public ApplicationLevelNetworkPartition[] getPartitionGroups (@PathParam("deploymentPolicyId") String deploymentPolicyId)
+    public ApplicationLevelNetworkPartitionBean[] getPartitionGroups (@PathParam("deploymentPolicyId") String deploymentPolicyId)
             throws RestAPIException {
           return MockContext.getInstance().getPartitionGroups(deploymentPolicyId);
 
@@ -373,7 +343,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Partition[] getPartitions (@PathParam("deploymentPolicyId") String deploymentPolicyId,
+    public PartitionBean[] getPartitions (@PathParam("deploymentPolicyId") String deploymentPolicyId,
                                        @PathParam("partitionGroupId") String partitionGroupId) throws RestAPIException {
            return MockContext.getInstance().getPartitions(deploymentPolicyId, partitionGroupId);
 
@@ -384,7 +354,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Partition [] getPartitionsOfPolicy (@PathParam("deploymentPolicyId") String deploymentPolicyId)
+    public PartitionBean[] getPartitionsOfPolicy (@PathParam("deploymentPolicyId") String deploymentPolicyId)
             throws RestAPIException {
              return MockContext.getInstance().getPartitionsOfPolicy(deploymentPolicyId);
 
@@ -395,7 +365,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public AutoscalePolicy[] getAutoscalePolicies () throws RestAPIException {
+    public AutoscalePolicyBean[] getAutoscalePolicies () throws RestAPIException {
             return MockContext.getInstance().getAutoscalePolicies();
 
     }
@@ -405,7 +375,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public AutoscalePolicy getAutoscalePolicies (@PathParam("autoscalePolicyId") String autoscalePolicyId)
+    public AutoscalePolicyBean getAutoscalePolicies (@PathParam("autoscalePolicyId") String autoscalePolicyId)
             throws RestAPIException {
         return MockContext.getInstance().getAutoscalePolicies(autoscalePolicyId);
 
@@ -416,7 +386,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public DeploymentPolicy[] getDeploymentPolicies () throws RestAPIException {
+    public DeploymentPolicyBean[] getDeploymentPolicies () throws RestAPIException {
           return MockContext.getInstance().getDeploymentPolicies();
 
     }
@@ -426,7 +396,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public DeploymentPolicy getDeploymentPolicies (@PathParam("deploymentPolicyId") String deploymentPolicyId)
+    public DeploymentPolicyBean getDeploymentPolicies (@PathParam("deploymentPolicyId") String deploymentPolicyId)
             throws RestAPIException {
         return MockContext.getInstance().getDeploymentPolicies(deploymentPolicyId);
 
@@ -437,7 +407,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cluster[] getClustersForTenant() throws RestAPIException {
+    public ClusterBean[] getClustersForTenant() throws RestAPIException {
 
         return MockContext.getInstance().getClusters();
     }
@@ -447,7 +417,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cluster[] getClusters(@PathParam("cartridgeType") String cartridgeType) throws RestAPIException {
+    public ClusterBean[] getClusters(@PathParam("cartridgeType") String cartridgeType) throws RestAPIException {
 
         return MockContext.getInstance().getClusters();
     }
@@ -457,7 +427,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cluster[] getCluster(@PathParam("cartridgeType") String cartridgeType,
+    public ClusterBean[] getCluster(@PathParam("cartridgeType") String cartridgeType,
                               @PathParam("subscriptionAlias") String subscriptionAlias) throws RestAPIException, RestAPIException {
 
         return MockContext.getInstance().getClusters();
@@ -468,7 +438,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cluster[] getCluster(@PathParam("clusterId") String clusterId) throws RestAPIException {
+    public ClusterBean[] getCluster(@PathParam("clusterId") String clusterId) throws RestAPIException {
         return MockContext.getInstance().getClusters();
     }
 
@@ -477,52 +447,11 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public DeploymentPolicy[] getValidDeploymentPolicies (@PathParam("cartridgeType") String cartridgeType)
+    public DeploymentPolicyBean[] getValidDeploymentPolicies (@PathParam("cartridgeType") String cartridgeType)
             throws RestAPIException {
 
         return MockContext.getInstance().getDeploymentPoliciesForCartridgeType(cartridgeType);
     }
-
-    @POST
-    @Path("/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domains")
-    @Consumes("application/json")
-    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public StratosApiResponse addSubscriptionDomains(@PathParam("cartridgeType") String cartridgeType,
-                                                      @PathParam("subscriptionAlias") String subscriptionAlias,
-                                                      SubscriptionDomainRequest request) throws RestAPIException {
-
-        return MockContext.getInstance().addSubscriptionDomains(2, subscriptionAlias, request);
-    }
-
-    @GET
-    @Path("/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domains")
-    @Consumes("application/json")
-    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public SubscriptionDomainBean[] getSubscriptionDomains(@PathParam("cartridgeType") String cartridgeType,
-                                           @PathParam("subscriptionAlias") String subscriptionAlias) throws RestAPIException {
-
-        return MockContext.getInstance().getSubscriptionDomains(2, subscriptionAlias).toArray(new SubscriptionDomainBean[0]);
-    }
-
-    @Path("/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domains/{domainName}")
-    @Consumes("application/json")
-    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public SubscriptionDomainBean getSubscriptionDomain(@PathParam("cartridgeType") String cartridgeType,
-            @PathParam("subscriptionAlias") String subscriptionAlias, @PathParam("domainName") String domainName) throws RestAPIException {
-
-        return MockContext.getInstance().getSubscriptionDomain(2, cartridgeType, subscriptionAlias, domainName);
-    }
-
-    @DELETE
-    @Path("/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domains/{domainName}")
-    @Consumes("application/json")
-    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public StratosApiResponse removeSubscriptionDomain(@PathParam("cartridgeType") String cartridgeType,
-                                                         @PathParam("subscriptionAlias") String subscriptionAlias,
-                                                         @PathParam("domainName") String domainName) throws RestAPIException {
-
-        return MockContext.getInstance().removeSubscriptionDomain(2, subscriptionAlias, domainName);
-    }
     
     @POST
 	@Path("/cartridge/sync")