Repository: stratos
Updated Branches:
  refs/heads/master 8327716ad -> 9f2a410b4


renaming networkPartition to networkPartitions in deployment policy schema


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

Branch: refs/heads/master
Commit: f5e80d29409ac46459dd850224f01fd8b17b5388
Parents: 8327716
Author: R-Rajkumar <[email protected]>
Authored: Fri Mar 6 23:09:24 2015 +0530
Committer: R-Rajkumar <[email protected]>
Committed: Fri Mar 6 23:09:24 2015 +0530

----------------------------------------------------------------------
 .../org/apache/stratos/cli/RestCommandLineService.java    |  2 +-
 .../beans/policy/deployment/DeploymentPolicyBean.java     | 10 +++++-----
 .../stratos/rest/endpoint/api/StratosApiV41Utils.java     |  2 +-
 .../apache/stratos/rest/endpoint/mock/MockContext.java    | 10 +++++-----
 .../rest/endpoint/util/converter/ObjectConverter.java     |  6 +++---
 5 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/f5e80d29/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 b9b4c64..79b064e 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
@@ -1686,7 +1686,7 @@ public class RestCommandLineService {
                 public String[] getData(DeploymentPolicyBean policy) {
                     String[] data = new String[2];
                     data[0] = policy.getId();
-                    data[1] = 
String.valueOf(policy.getNetworkPartition().size());
+                    data[1] = 
String.valueOf(policy.getNetworkPartitions().size());
                     return data;
                 }
             };

http://git-wip-us.apache.org/repos/asf/stratos/blob/f5e80d29/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
index a0c73da..4de9373 100644
--- 
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
@@ -29,7 +29,7 @@ public class DeploymentPolicyBean {
 
     private String id;
 
-       private List<NetworkPartitionRefBean> networkPartition;
+       private List<NetworkPartitionRefBean> networkPartitions;
 
        public String getId() {
                return id;
@@ -39,11 +39,11 @@ public class DeploymentPolicyBean {
                this.id = id;
        }
 
-       public List<NetworkPartitionRefBean> getNetworkPartition() {
-               return networkPartition;
+       public List<NetworkPartitionRefBean> getNetworkPartitions() {
+               return networkPartitions;
        }
 
-       public void setNetworkPartition(List<NetworkPartitionRefBean> 
networkPartition) {
-               this.networkPartition = networkPartition;
+       public void setNetworkPartitions(List<NetworkPartitionRefBean> 
networkPartitions) {
+               this.networkPartitions = networkPartitions;
        }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/f5e80d29/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 abec533..298404a 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
@@ -1211,7 +1211,7 @@ public class StratosApiV41Utils {
                        log.error(message);
                        throw new RestAPIException(message);
                }
-               if(deploymentPolicy.getNetworkPartition().size()==0){
+               if(deploymentPolicy.getNetworkPartitions().size()==0){
                        String message="No network partitions specify with the 
policy";
                        log.error(message);
                        throw new RestAPIException(message);

http://git-wip-us.apache.org/repos/asf/stratos/blob/f5e80d29/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 b098823..96dc6af 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
@@ -545,7 +545,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).getNetworkPartition().get(0).getPartitions().toArray(new
 PartitionBean[0]);
+                       return 
(deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).getNetworkPartitions().get(0).getPartitions().toArray(new
 PartitionBean[0]);
                }
        }
                
@@ -554,7 +554,7 @@ public class MockContext {
         }
         //FIXME to parse thr all the NW partitions
        return (deploymentPolicyMap.get(tenantId)).
-                
get(deploymentPolicyId).getNetworkPartition().get(0).getPartitions().toArray(new
 PartitionBean[0]);
+                
get(deploymentPolicyId).getNetworkPartitions().get(0).getPartitions().toArray(new
 PartitionBean[0]);
     }
 
     public NetworkPartitionRefBean[] getPartitionGroups(String 
deploymentPolicyId)  throws RestAPIException{
@@ -567,14 +567,14 @@ 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 
(NetworkPartitionRefBean[])(deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).getNetworkPartition().toArray();
+                       return 
(NetworkPartitionRefBean[])(deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).getNetworkPartitions().toArray();
                }
        }
                
        
if(!(deploymentPolicyMap.get(tenantId)).containsKey(deploymentPolicyId)){
                throw new RestAPIException(Status.NO_CONTENT,"There is no 
deployment policy with id: " + deploymentPolicyId);
         }
-       return 
(NetworkPartitionRefBean[])(deploymentPolicyMap.get(tenantId)).get(deploymentPolicyId).getNetworkPartition().toArray();
+       return 
(NetworkPartitionRefBean[])(deploymentPolicyMap.get(tenantId)).get(deploymentPolicyId).getNetworkPartitions().toArray();
     }
 
     public AutoscalePolicyBean[] getAutoscalePolicies()  throws 
RestAPIException{
@@ -708,7 +708,7 @@ public class MockContext {
        }
                        
         PartitionBean[] partitions = null;
-         for(NetworkPartitionRefBean networkPartition : 
deploymentPolicy.getNetworkPartition()){
+         for(NetworkPartitionRefBean networkPartition : 
deploymentPolicy.getNetworkPartitions()){
              if(networkPartition.getId().equals(partitionGroupId)){
                  partitions =  networkPartition.getPartitions().toArray(new 
PartitionBean[0]);
              }

http://git-wip-us.apache.org/repos/asf/stratos/blob/f5e80d29/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 203b2e8..900a1ea 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
@@ -351,9 +351,9 @@ public class ObjectConverter {
 
                
deploymentPolicy.setDeploymentPolicyID(deploymentPolicyBean.getId());
 
-               if (deploymentPolicyBean.getNetworkPartition()!= null) {
+               if (deploymentPolicyBean.getNetworkPartitions()!= null) {
                        
deploymentPolicy.setNetworkPartitionsRef(convertNetworkPartitionRefToStubNetworkPartitionRef(
-                                       
deploymentPolicyBean.getNetworkPartition()));
+                                       
deploymentPolicyBean.getNetworkPartitions()));
                }
 
                return deploymentPolicy;
@@ -1731,7 +1731,7 @@ public class ObjectConverter {
        public static DeploymentPolicyBean 
convetCCStubDeploymentPolicytoDeploymentPolicy(DeploymentPolicy 
deploymentPolicy) {
                DeploymentPolicyBean deploymentPolicyBean = new 
DeploymentPolicyBean();
                
deploymentPolicyBean.setId(deploymentPolicy.getDeploymentPolicyID());
-               
deploymentPolicyBean.setNetworkPartition(convertCCStubNetwotkPartitionRefsToNetworkPartitionRefs(deploymentPolicy.getNetworkPartitionsRef()));
+               
deploymentPolicyBean.setNetworkPartitions(convertCCStubNetwotkPartitionRefsToNetworkPartitionRefs(deploymentPolicy.getNetworkPartitionsRef()));
                return deploymentPolicyBean;
        }
        

Reply via email to