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 2014/12/14 06:45:08 UTC
[4/7] stratos git commit: Moving rest api domain model to stratos
common component to be reused by the cli
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/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
new file mode 100644
index 0000000..68cbd96
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/PortRange.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.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/df2d6e6c/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
new file mode 100644
index 0000000..dbacc17
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/Properties.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.beans.kubernetes;
+
+import java.io.Serializable;
+import java.util.Arrays;
+
+/**
+ * Had to wrap {@link Property} array using a class, since there's a bug in current
+ * stub generation.
+ */
+public class Properties implements Serializable{
+
+ private static final long serialVersionUID = 1986895299288322592L;
+ private Property[] properties;
+
+ public Property[] getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Property[] properties) {
+ if(properties == null) {
+ this.properties = new Property[0];
+ } else {
+ this.properties = Arrays.copyOf(properties, properties.length);
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "Properties [properties=" + Arrays.toString(properties) + "]";
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/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
new file mode 100644
index 0000000..14ea390
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/Property.java
@@ -0,0 +1,62 @@
+/*
+ * 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 java.io.Serializable;
+
+/**
+ * Holds a property
+ */
+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/df2d6e6c/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
new file mode 100644
index 0000000..bc9475b
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/repositoryNotificationInfoBean/Payload.java
@@ -0,0 +1,34 @@
+/**
+ * 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/df2d6e6c/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
new file mode 100644
index 0000000..2d9b822
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/repositoryNotificationInfoBean/Repository.java
@@ -0,0 +1,43 @@
+/**
+ * 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/df2d6e6c/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
new file mode 100644
index 0000000..ee16cc2
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/subscription/domain/SubscriptionDomainBean.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.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/df2d6e6c/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
new file mode 100644
index 0000000..0af5718
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Cluster.java
@@ -0,0 +1,126 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.common.beans.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/df2d6e6c/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
new file mode 100644
index 0000000..59e311c
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Instance.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.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/df2d6e6c/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
new file mode 100644
index 0000000..0bba360
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/topology/Member.java
@@ -0,0 +1,127 @@
+/**
+ * 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 networkPartitionId;
+ private String partitionId;
+ private String memberId;
+
+ private String status;
+ private String memberIp;
+ private String lbClusterId;
+ private String memberPublicIp;
+ private List<PropertyBean> property;
+
+ @Override
+ public String toString() {
+ return "Member [serviceName=" + getServiceName() + ", clusterId=" + getClusterId() + ", networkPartitionId="
+ + getNetworkPartitionId() + ", partitionId=" + getPartitionId() + ", memberId=" + getMemberId() + ", status=" + getStatus()
+ + ", memberIp=" + getMemberIp() + ", lbClusterId=" + getLbClusterId() + ", memberPublicIp=" + getMemberPublicIp()
+ + ", property=" + getProperty() + "]";
+ }
+
+
+ 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 String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getMemberIp() {
+ return memberIp;
+ }
+
+ public void setMemberIp(String memberIp) {
+ this.memberIp = memberIp;
+ }
+
+ public String getLbClusterId() {
+ return lbClusterId;
+ }
+
+ public void setLbClusterId(String lbClusterId) {
+ this.lbClusterId = lbClusterId;
+ }
+
+ public String getMemberPublicIp() {
+ return memberPublicIp;
+ }
+
+ public void setMemberPublicIp(String memberPublicIp) {
+ this.memberPublicIp = memberPublicIp;
+ }
+
+ 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/df2d6e6c/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/user/mgt/StratosUserManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/user/mgt/StratosUserManager.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/user/mgt/StratosUserManager.java
index 57588ab..3178141 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/user/mgt/StratosUserManager.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/user/mgt/StratosUserManager.java
@@ -22,7 +22,7 @@ package org.apache.stratos.manager.user.mgt;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.manager.user.mgt.beans.UserInfoBean;
+import org.apache.stratos.common.beans.UserInfoBean;
import org.apache.stratos.manager.user.mgt.exception.UserManagerException;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.api.UserStoreManager;
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/user/mgt/beans/UserInfoBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/user/mgt/beans/UserInfoBean.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/user/mgt/beans/UserInfoBean.java
deleted file mode 100644
index 5cf0b44..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/user/mgt/beans/UserInfoBean.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.user.mgt.beans;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class UserInfoBean {
-
- private String userName;
- private String credential;
- private String role;
- private String firstName;
- private String lastName;
- private String email;
- private String profileName;
-
- public UserInfoBean(){}
-
- public UserInfoBean(UserInfoBean userInfoBean) {
- this.userName = userInfoBean.getUserName();
- this.credential = userInfoBean.getCredential();
- this.role = userInfoBean.getRole();
- this.firstName = userInfoBean.getFirstName();
- this.lastName = userInfoBean.getLastName();
- this.email = userInfoBean.getEmail();
- this.profileName = userInfoBean.getProfileName();
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getCredential() {
- return credential;
- }
-
- public void setCredential(String credential) {
- this.credential = credential;
- }
-
- public String getRole() {
- return role;
- }
-
- public void setRole(String role) {
- this.role = role;
- }
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- public String getProfileName() {
- return profileName;
- }
-
- public void setProfileName(String profileName) {
- this.profileName = profileName;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/definition/PropertyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/definition/PropertyBean.java b/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/definition/PropertyBean.java
index 0ecc8d9..1ff9586 100644
--- a/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/definition/PropertyBean.java
+++ b/components/org.apache.stratos.metadataservice/src/main/java/org/apache/stratos/metadataservice/definition/PropertyBean.java
@@ -24,14 +24,38 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "properties")
public class PropertyBean {
- public String hostname;
+ private String hostname;
- public String username;
- public String password;
+ private String username;
+ private String password;
+
+ public String getHostname() {
+ return hostname;
+ }
+
+ public void setHostname(String hostname) {
+ this.hostname = hostname;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
@Override
public String toString() {
- return " [ hostname: " + hostname + ", username: " + username + ", password: " + password +
- "] ";
+ return " [hostname: " + getHostname() + ", username: " + getUsername() + ", password: " + getPassword() +
+ "]";
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/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 674fa28..5032698 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
@@ -31,18 +31,18 @@ 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.rest.endpoint.bean.CartridgeInfoBean;
-import org.apache.stratos.rest.endpoint.bean.StratosApiResponse;
-import org.apache.stratos.rest.endpoint.bean.SubscriptionDomainRequest;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.Partition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.ServiceDefinitionBean;
-import org.apache.stratos.rest.endpoint.bean.repositoryNotificationInfoBean.Payload;
-import org.apache.stratos.rest.endpoint.bean.subscription.domain.SubscriptionDomainBean;
-import org.apache.stratos.rest.endpoint.bean.topology.Cluster;
+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.common.beans.subscription.domain.SubscriptionDomainBean;
+import org.apache.stratos.common.beans.topology.Cluster;
import org.apache.stratos.rest.endpoint.exception.RestAPIException;
import org.apache.stratos.tenant.mgt.core.TenantPersistor;
import org.apache.stratos.tenant.mgt.util.TenantMgtUtil;
@@ -437,7 +437,7 @@ public class StratosApiV40 extends AbstractApi {
}
}
for (Cluster clusterObj : clusters) {
- if (clusterObj.clusterId.equals(clusterId)){
+ if (clusterObj.getClusterId().equals(clusterId)){
cluster = clusterObj;
break;
}
@@ -1075,7 +1075,7 @@ public class StratosApiV40 extends AbstractApi {
public Response getSubscriptionDomain(@PathParam("cartridgeType") String cartridgeType,
@PathParam("subscriptionAlias") String subscriptionAlias, @PathParam("domainName") String domainName) throws RestAPIException {
SubscriptionDomainBean subscriptionDomainBean = StratosApiV40Utils.getSubscriptionDomain(getConfigContext(), cartridgeType, subscriptionAlias, domainName);
- if(subscriptionDomainBean.domainName == null){
+ if(subscriptionDomainBean.getDomainName() == null){
return Response.status(Response.Status.NOT_FOUND).build();
}else{
return Response.ok().entity(subscriptionDomainBean).build();
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/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 c8655a9..1ab2c33 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
@@ -47,16 +47,16 @@ import org.apache.stratos.messaging.domain.topology.Cluster;
import org.apache.stratos.messaging.domain.topology.Member;
import org.apache.stratos.messaging.domain.topology.MemberStatus;
import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
-import org.apache.stratos.rest.endpoint.bean.StratosApiResponse;
-import org.apache.stratos.rest.endpoint.bean.SubscriptionDomainRequest;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.Partition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.ServiceDefinitionBean;
-import org.apache.stratos.rest.endpoint.bean.repositoryNotificationInfoBean.Payload;
-import org.apache.stratos.rest.endpoint.bean.subscription.domain.SubscriptionDomainBean;
-import org.apache.stratos.rest.endpoint.bean.util.converter.PojoConverter;
+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.cartridge.definition.ServiceDefinitionBean;
+import org.apache.stratos.common.beans.repositoryNotificationInfoBean.Payload;
+import org.apache.stratos.common.beans.subscription.domain.SubscriptionDomainBean;
+import org.apache.stratos.rest.endpoint.util.converter.PojoConverter;
import org.apache.stratos.rest.endpoint.exception.RestAPIException;
import javax.ws.rs.core.Response;
@@ -191,7 +191,7 @@ public class StratosApiV40Utils {
}
StratosApiResponse stratosApiResponse = new StratosApiResponse();
- stratosApiResponse.setMessage("Successfully deployed partition definition with id " + partitionBean.id);
+ stratosApiResponse.setMessage("Successfully deployed partition definition with id " + partitionBean.getId());
return stratosApiResponse;
}
@@ -226,7 +226,7 @@ public class StratosApiV40Utils {
}
public static StratosApiResponse deployDeploymentPolicy(
- org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy deploymentPolicyBean)
+ org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy deploymentPolicyBean)
throws RestAPIException {
String policyId = null;
@@ -394,7 +394,7 @@ public class StratosApiV40Utils {
return PojoConverter.populateAutoscalePojo(autoscalePolicy);
}
- public static org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy[]
+ public static org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy[]
getDeploymentPolicies () throws RestAPIException {
DeploymentPolicy [] deploymentPolicies = null;
@@ -414,7 +414,7 @@ public class StratosApiV40Utils {
return PojoConverter.populateDeploymentPolicyPojos(deploymentPolicies);
}
- public static org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy[]
+ public static org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy[]
getDeploymentPolicies (String cartridgeType) throws RestAPIException {
DeploymentPolicy [] deploymentPolicies = null;
@@ -440,7 +440,7 @@ public class StratosApiV40Utils {
return PojoConverter.populateDeploymentPolicyPojos(deploymentPolicies);
}
- public static org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy
+ public static org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy
getDeploymentPolicy(String deploymentPolicyId) throws RestAPIException {
DeploymentPolicy deploymentPolicy = null;
@@ -969,7 +969,7 @@ public class StratosApiV40Utils {
return cartridgeSubsciptionManager.getCartridgeSubscription(ApplicationManagementUtil.getTenantId(configurationContext), alias);
}
- public static org.apache.stratos.rest.endpoint.bean.topology.Cluster getCluster (String cartridgeType, String subscriptionAlias, ConfigurationContext configurationContext) throws RestAPIException {
+ public static org.apache.stratos.common.beans.topology.Cluster getCluster (String cartridgeType, String subscriptionAlias, ConfigurationContext configurationContext) throws RestAPIException {
Cluster cluster = TopologyClusterInformationModel.getInstance().getCluster(ApplicationManagementUtil.getTenantId(configurationContext),
subscriptionAlias);
@@ -980,49 +980,49 @@ public class StratosApiV40Utils {
}
}
- public static org.apache.stratos.rest.endpoint.bean.topology.Cluster[] getClustersForTenant (ConfigurationContext configurationContext) {
+ public static org.apache.stratos.common.beans.topology.Cluster[] getClustersForTenant (ConfigurationContext configurationContext) {
Set<Cluster> clusterSet = TopologyClusterInformationModel.getInstance().getClusters(ApplicationManagementUtil.
getTenantId(configurationContext), null);
- ArrayList<org.apache.stratos.rest.endpoint.bean.topology.Cluster> clusters =
- new ArrayList<org.apache.stratos.rest.endpoint.bean.topology.Cluster>();
+ ArrayList<org.apache.stratos.common.beans.topology.Cluster> clusters =
+ new ArrayList<org.apache.stratos.common.beans.topology.Cluster>();
for(Cluster cluster : clusterSet) {
clusters.add(PojoConverter.populateClusterPojos(cluster, null));
}
- org.apache.stratos.rest.endpoint.bean.topology.Cluster[] arrCluster =
- new org.apache.stratos.rest.endpoint.bean.topology.Cluster[clusters.size()];
+ org.apache.stratos.common.beans.topology.Cluster[] arrCluster =
+ new org.apache.stratos.common.beans.topology.Cluster[clusters.size()];
arrCluster = clusters.toArray(arrCluster);
return arrCluster;
}
- public static org.apache.stratos.rest.endpoint.bean.topology.Cluster[] getClustersForTenantAndCartridgeType (ConfigurationContext configurationContext,
+ public static org.apache.stratos.common.beans.topology.Cluster[] getClustersForTenantAndCartridgeType (ConfigurationContext configurationContext,
String cartridgeType) {
Set<Cluster> clusterSet = TopologyClusterInformationModel.getInstance().getClusters(ApplicationManagementUtil.
getTenantId(configurationContext), cartridgeType);
- List<org.apache.stratos.rest.endpoint.bean.topology.Cluster> clusters =
- new ArrayList<org.apache.stratos.rest.endpoint.bean.topology.Cluster>();
+ List<org.apache.stratos.common.beans.topology.Cluster> clusters =
+ new ArrayList<org.apache.stratos.common.beans.topology.Cluster>();
for(Cluster cluster : clusterSet) {
clusters.add(PojoConverter.populateClusterPojos(cluster, null));
}
- org.apache.stratos.rest.endpoint.bean.topology.Cluster[] arrCluster =
- new org.apache.stratos.rest.endpoint.bean.topology.Cluster[clusters.size()];
+ org.apache.stratos.common.beans.topology.Cluster[] arrCluster =
+ new org.apache.stratos.common.beans.topology.Cluster[clusters.size()];
arrCluster = clusters.toArray(arrCluster);
return arrCluster;
}
- public static org.apache.stratos.rest.endpoint.bean.topology.Cluster[] getClustersForCartridgeType(String cartridgeType) {
+ public static org.apache.stratos.common.beans.topology.Cluster[] getClustersForCartridgeType(String cartridgeType) {
Set<Cluster> clusterSet = TopologyClusterInformationModel
.getInstance()
.getClusters(cartridgeType);
- List<org.apache.stratos.rest.endpoint.bean.topology.Cluster> clusters = new ArrayList<org.apache.stratos.rest.endpoint.bean.topology.Cluster>();
+ List<org.apache.stratos.common.beans.topology.Cluster> clusters = new ArrayList<org.apache.stratos.common.beans.topology.Cluster>();
for (Cluster cluster : clusterSet) {
clusters.add(PojoConverter.populateClusterPojos(cluster, null));
}
- org.apache.stratos.rest.endpoint.bean.topology.Cluster[] arrCluster = new org.apache.stratos.rest.endpoint.bean.topology.Cluster[clusters
+ org.apache.stratos.common.beans.topology.Cluster[] arrCluster = new org.apache.stratos.common.beans.topology.Cluster[clusters
.size()];
arrCluster = clusters.toArray(arrCluster);
return arrCluster;
@@ -1166,17 +1166,17 @@ public class StratosApiV40Utils {
try {
int tenantId = ApplicationManagementUtil.getTenantId(configurationContext);
- for (org.apache.stratos.rest.endpoint.bean.subscription.domain.SubscriptionDomainBean subscriptionDomain : request.domains) {
- boolean isDomainExists = isSubscriptionDomainExists(configurationContext, cartridgeType, subscriptionAlias, subscriptionDomain.domainName);
+ 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.domainName + " exists";
+ String message = "Subscription domain " + subscriptionDomain.getDomainName() + " exists";
throw new RestAPIException(Status.INTERNAL_SERVER_ERROR, message);
}
}
- for (org.apache.stratos.rest.endpoint.bean.subscription.domain.SubscriptionDomainBean subscriptionDomain : request.domains) {
+ for (org.apache.stratos.common.beans.subscription.domain.SubscriptionDomainBean subscriptionDomain : request.getDomains()) {
cartridgeSubsciptionManager.addSubscriptionDomain(tenantId, subscriptionAlias,
- subscriptionDomain.domainName, subscriptionDomain.applicationContext);
+ subscriptionDomain.getDomainName(), subscriptionDomain.getApplicationContext());
}
} catch (Exception e) {
log.error(e.getMessage(), e);
@@ -1195,7 +1195,7 @@ public class StratosApiV40Utils {
SubscriptionDomainBean subscriptionDomain = PojoConverter.populateSubscriptionDomainPojo(cartridgeSubsciptionManager.getSubscriptionDomain(tenantId,
subscriptionAlias, domain));
- if (subscriptionDomain.domainName != null) {
+ if (subscriptionDomain.getDomainName() != null) {
return true;
} else {
return false;
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/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 b23901d..3972211 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -30,20 +30,20 @@ import org.apache.stratos.manager.grouping.definitions.ServiceGroupDefinition;
import org.apache.stratos.manager.subscription.ApplicationSubscription;
import org.apache.stratos.manager.subscription.CartridgeSubscription;
import org.apache.stratos.manager.user.mgt.StratosUserManager;
-import org.apache.stratos.manager.user.mgt.beans.UserInfoBean;
+import org.apache.stratos.common.beans.UserInfoBean;
import org.apache.stratos.manager.user.mgt.exception.UserManagerException;
import org.apache.stratos.rest.endpoint.annotation.AuthorizationAction;
import org.apache.stratos.rest.endpoint.annotation.SuperTenantService;
-import org.apache.stratos.rest.endpoint.bean.ApplicationBean;
-import org.apache.stratos.rest.endpoint.bean.StratosApiResponse;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
-import org.apache.stratos.rest.endpoint.bean.kubernetes.KubernetesGroup;
-import org.apache.stratos.rest.endpoint.bean.kubernetes.KubernetesHost;
-import org.apache.stratos.rest.endpoint.bean.kubernetes.KubernetesMaster;
-import org.apache.stratos.rest.endpoint.bean.repositoryNotificationInfoBean.Payload;
-import org.apache.stratos.rest.endpoint.bean.topology.Cluster;
+import org.apache.stratos.common.beans.ApplicationBean;
+import org.apache.stratos.common.beans.StratosApiResponse;
+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.KubernetesGroup;
+import org.apache.stratos.common.beans.kubernetes.KubernetesHost;
+import org.apache.stratos.common.beans.kubernetes.KubernetesMaster;
+import org.apache.stratos.common.beans.repositoryNotificationInfoBean.Payload;
+import org.apache.stratos.common.beans.topology.Cluster;
import org.apache.stratos.rest.endpoint.exception.RestAPIException;
import org.apache.stratos.rest.endpoint.exception.TenantNotFoundException;
import org.apache.stratos.rest.endpoint.ServiceHolder;
@@ -675,7 +675,7 @@ public class StratosApiV41 extends AbstractApi {
}
}
for (Cluster clusterObj : clusters) {
- if (clusterObj.clusterId.equals(clusterId)) {
+ if (clusterObj.getClusterId().equals(clusterId)) {
cluster = clusterObj;
break;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/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 e1fc650..a213d90 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
@@ -56,19 +56,19 @@ import org.apache.stratos.messaging.domain.topology.Cluster;
import org.apache.stratos.messaging.domain.topology.Member;
import org.apache.stratos.messaging.message.receiver.applications.ApplicationManager;
import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
-import org.apache.stratos.rest.endpoint.bean.ApplicationBean;
-import org.apache.stratos.rest.endpoint.bean.GroupBean;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.PersistenceBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.PropertyBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.VolumeBean;
-import org.apache.stratos.rest.endpoint.bean.kubernetes.KubernetesGroup;
-import org.apache.stratos.rest.endpoint.bean.kubernetes.KubernetesHost;
-import org.apache.stratos.rest.endpoint.bean.kubernetes.KubernetesMaster;
-import org.apache.stratos.rest.endpoint.bean.repositoryNotificationInfoBean.Payload;
-import org.apache.stratos.rest.endpoint.bean.util.converter.PojoConverter;
+import org.apache.stratos.common.beans.ApplicationBean;
+import org.apache.stratos.common.beans.GroupBean;
+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.PropertyBean;
+import org.apache.stratos.common.beans.cartridge.definition.VolumeBean;
+import org.apache.stratos.common.beans.kubernetes.KubernetesGroup;
+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.rest.endpoint.util.converter.PojoConverter;
import org.apache.stratos.rest.endpoint.exception.RestAPIException;
import java.rmi.RemoteException;
@@ -613,7 +613,7 @@ public class StratosApiV41Utils {
// Util methods for Deployment policies
- public static org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy[]
+ public static org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy[]
getDeploymentPolicies() throws RestAPIException {
DeploymentPolicy[] deploymentPolicies = null;
@@ -632,7 +632,7 @@ public class StratosApiV41Utils {
return PojoConverter.populateDeploymentPolicyPojos(deploymentPolicies);
}
- public static org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy
+ public static org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy
getDeploymentPolicy(String deploymentPolicyId) throws RestAPIException {
DeploymentPolicy deploymentPolicy = null;
@@ -827,34 +827,34 @@ public class StratosApiV41Utils {
// Util methods for clusters
- public static org.apache.stratos.rest.endpoint.bean.topology.Cluster[] getClustersForTenant(ConfigurationContext configurationContext) {
+ public static org.apache.stratos.common.beans.topology.Cluster[] getClustersForTenant(ConfigurationContext configurationContext) {
Set<Cluster> clusterSet = TopologyClusterInformationModel.getInstance().getClusters(ApplicationManagementUtil.
getTenantId(configurationContext), null);
- ArrayList<org.apache.stratos.rest.endpoint.bean.topology.Cluster> clusters =
- new ArrayList<org.apache.stratos.rest.endpoint.bean.topology.Cluster>();
+ ArrayList<org.apache.stratos.common.beans.topology.Cluster> clusters =
+ new ArrayList<org.apache.stratos.common.beans.topology.Cluster>();
for (Cluster cluster : clusterSet) {
clusters.add(PojoConverter.populateClusterPojos(cluster, null));
}
- org.apache.stratos.rest.endpoint.bean.topology.Cluster[] arrCluster =
- new org.apache.stratos.rest.endpoint.bean.topology.Cluster[clusters.size()];
+ org.apache.stratos.common.beans.topology.Cluster[] arrCluster =
+ new org.apache.stratos.common.beans.topology.Cluster[clusters.size()];
arrCluster = clusters.toArray(arrCluster);
return arrCluster;
}
- public static org.apache.stratos.rest.endpoint.bean.topology.Cluster[] getClustersForTenantAndCartridgeType(ConfigurationContext configurationContext,
+ public static org.apache.stratos.common.beans.topology.Cluster[] getClustersForTenantAndCartridgeType(ConfigurationContext configurationContext,
String cartridgeType) {
Set<Cluster> clusterSet = TopologyClusterInformationModel.getInstance().getClusters(ApplicationManagementUtil.
getTenantId(configurationContext), cartridgeType);
- List<org.apache.stratos.rest.endpoint.bean.topology.Cluster> clusters =
- new ArrayList<org.apache.stratos.rest.endpoint.bean.topology.Cluster>();
+ List<org.apache.stratos.common.beans.topology.Cluster> clusters =
+ new ArrayList<org.apache.stratos.common.beans.topology.Cluster>();
for (Cluster cluster : clusterSet) {
clusters.add(PojoConverter.populateClusterPojos(cluster, null));
}
- org.apache.stratos.rest.endpoint.bean.topology.Cluster[] arrCluster =
- new org.apache.stratos.rest.endpoint.bean.topology.Cluster[clusters.size()];
+ org.apache.stratos.common.beans.topology.Cluster[] arrCluster =
+ new org.apache.stratos.common.beans.topology.Cluster[clusters.size()];
arrCluster = clusters.toArray(arrCluster);
return arrCluster;
@@ -995,12 +995,12 @@ public class StratosApiV41Utils {
* @throws RestAPIException
*/
public static void deployApplication(
- org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy deploymentPolicyBean)
+ org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy deploymentPolicyBean)
throws RestAPIException {
if (log.isInfoEnabled()) {
log.info(String.format("Starting to deploy application: [application-id] %s [deployment-policy-id] %s",
- deploymentPolicyBean.applicationPolicy.applicationId, deploymentPolicyBean.id));
+ deploymentPolicyBean.getApplicationPolicy().getApplicationId(), deploymentPolicyBean.getId()));
}
AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
@@ -1114,7 +1114,7 @@ public class StratosApiV41Utils {
String serviceType = clusterDataHolder.getServiceType();
TopologyManager.acquireReadLockForCluster(serviceType, clusterId);
Cluster topLevelCluster = TopologyManager.getTopology().getService(serviceType).getCluster(clusterId);
- applicationBean.clusters.add(PojoConverter.populateClusterPojos(topLevelCluster, entry.getKey()));
+ applicationBean.getClusters().add(PojoConverter.populateClusterPojos(topLevelCluster, entry.getKey()));
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/ApplicationBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/ApplicationBean.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/ApplicationBean.java
deleted file mode 100644
index 15cb726..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/ApplicationBean.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.apache.stratos.rest.endpoint.bean;
-
-import org.apache.stratos.rest.endpoint.bean.topology.Cluster;
-import org.apache.stratos.rest.endpoint.bean.topology.Instance;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@XmlRootElement(name="applications")
-public class ApplicationBean {
- private String id;
- private String tenantDomain;
- private String tenantAdminUsername;
- public List<GroupBean> groups = null;
- public List<Cluster> clusters = null;
- private List<Instance> instances;
-
-
- public ApplicationBean(){
- this.groups = new ArrayList<GroupBean>();
- this.clusters = new ArrayList<Cluster>();
- }
- public void addGroup(GroupBean groupBean) {
- this.groups.add(groupBean);
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public void setTenantDomain(String tenantDomain) {
- this.tenantDomain = tenantDomain;
- }
-
- public void setTenantAdminUsername(String tenantAdminUsername) {
- this.tenantAdminUsername = tenantAdminUsername;
- }
-
- public String getId() {
- return id;
- }
-
- public String getTenantDomain() {
- return tenantDomain;
- }
-
- public String getTenantAdminUsername() {
- return tenantAdminUsername;
- }
- 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/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/CartridgeInfoBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/CartridgeInfoBean.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/CartridgeInfoBean.java
deleted file mode 100644
index 6d67fe1..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/CartridgeInfoBean.java
+++ /dev/null
@@ -1,167 +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.rest.endpoint.bean;
-
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.PersistenceBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.PropertyBean;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.List;
-
-@XmlRootElement
-public class CartridgeInfoBean {
- String cartridgeType;
- String alias;
- String autoscalePolicy;
- String deploymentPolicy;
- String repoURL;
- boolean privateRepo;
- String repoUsername;
- String repoPassword;
- String dataCartridgeType;
- String dataCartridgeAlias;
- 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/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/Error.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/Error.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/Error.java
deleted file mode 100644
index 2bb4823..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/Error.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.rest.endpoint.bean;
-
-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/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/GroupBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/GroupBean.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/GroupBean.java
deleted file mode 100644
index e5f35e9..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/GroupBean.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.rest.endpoint.bean;
-
-import org.apache.stratos.rest.endpoint.bean.topology.Cluster;
-import org.apache.stratos.rest.endpoint.bean.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/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/StratosApiResponse.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/StratosApiResponse.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/StratosApiResponse.java
deleted file mode 100644
index 6496b6a..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/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.rest.endpoint.bean;
-
-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/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/SubscriptionDomainRequest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/SubscriptionDomainRequest.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/SubscriptionDomainRequest.java
deleted file mode 100644
index 6e0d6ae..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/SubscriptionDomainRequest.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.rest.endpoint.bean;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.stratos.rest.endpoint.bean.subscription.domain.SubscriptionDomainBean;
-
-/**
- * Defines subscription domain post request.
- */
-@XmlRootElement
-public class SubscriptionDomainRequest {
- public List<SubscriptionDomainBean> domains;
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ApplicationLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ApplicationLevelNetworkPartition.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ApplicationLevelNetworkPartition.java
deleted file mode 100644
index 819eec6..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ApplicationLevelNetworkPartition.java
+++ /dev/null
@@ -1,34 +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.rest.endpoint.bean.autoscaler.partition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class ApplicationLevelNetworkPartition {
-
- public String id;
-
- public boolean activeByDefault;
-
- //partition Ids
- public List<Partition> partitions;
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelNetworkPartition.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelNetworkPartition.java
deleted file mode 100644
index 40d3400..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelNetworkPartition.java
+++ /dev/null
@@ -1,31 +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.rest.endpoint.bean.autoscaler.partition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class ChildLevelNetworkPartition {
- public String id;
-
- public String partitionAlgo;
-
- public List<ChildLevelPartition> partitions;
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelPartition.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelPartition.java
deleted file mode 100644
index 9afd69b..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelPartition.java
+++ /dev/null
@@ -1,28 +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.rest.endpoint.bean.autoscaler.partition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class ChildLevelPartition {
- public String id;
-
- public int max;
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/Partition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/Partition.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/Partition.java
deleted file mode 100644
index 98c5141..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/Partition.java
+++ /dev/null
@@ -1,39 +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.rest.endpoint.bean.autoscaler.partition;
-
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.PropertyBean;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class Partition {
-
- public String id;
-
- public String description;
-
- public boolean isPublic;
-
- public String provider;
-
- public List<PropertyBean> property;
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/AutoscalePolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/AutoscalePolicy.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/AutoscalePolicy.java
deleted file mode 100644
index b273aee..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/AutoscalePolicy.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.rest.endpoint.bean.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/df2d6e6c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverageThresholds.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverageThresholds.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverageThresholds.java
deleted file mode 100644
index ebda721..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/autoscale/LoadAverageThresholds.java
+++ /dev/null
@@ -1,30 +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.rest.endpoint.bean.autoscaler.policy.autoscale;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class LoadAverageThresholds {
-
- public float threshold;
-
- public float lowerLimit;
-}