You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/01/04 09:06:12 UTC
[4/6] stratos git commit: Moving domain classes in stratos manager
used by rest api to stratos common
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DependencyDefinitions.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DependencyDefinitions.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DependencyDefinitions.java
deleted file mode 100644
index 3311ddb..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/DependencyDefinitions.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-
-@XmlRootElement(name = "dependencies")
-public class DependencyDefinitions implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- private List<String> startupOrders;
-
- private List<String> scalingDependants;
-
- private String terminationBehaviour;
-
- public String getTerminationBehaviour() {
- return terminationBehaviour;
- }
-
- public void setTerminationBehaviour(String terminationBehaviour) {
- this.terminationBehaviour = terminationBehaviour;
- }
-
- public List<String> getStartupOrders() {
- return startupOrders;
- }
-
- public void setStartupOrders(List<String> startupOrders) {
- this.startupOrders = startupOrders;
- }
-
- public List<String> getScalingDependants() {
- return scalingDependants;
- }
-
- public void setScalingDependants(List<String> scalingDependants) {
- this.scalingDependants = scalingDependants;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/GroupDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/GroupDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/GroupDefinition.java
deleted file mode 100644
index 8cca509..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/GroupDefinition.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-
-@XmlRootElement(name = "groups")
-public class GroupDefinition implements Serializable {
-
- private static final long serialVersionUID = 7261380706841894892L;
-
- private String name;
-
- private String alias;
-
- private int groupMinInstances;
-
- private int groupMaxInstances;
-
- public boolean isGroupScalingEnabled;
-
- private List<CartridgeDefinition> cartridges;
-
- private List<GroupDefinition> groups;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getAlias() {
- return alias;
- }
-
- public void setAlias(String alias) {
- this.alias = alias;
- }
-
- public int getGroupMinInstances() {
- return groupMinInstances;
- }
-
- public void setGroupMinInstances(int groupMinInstances) {
- this.groupMinInstances = groupMinInstances;
- }
-
- public int getGroupMaxInstances() {
- return groupMaxInstances;
- }
-
- public void setGroupMaxInstances(int groupMaxInstances) {
- this.groupMaxInstances = groupMaxInstances;
- }
-
- public boolean isGroupScalingEnabled() {
- return isGroupScalingEnabled;
- }
-
- public void setGroupScalingEnabled(boolean isGroupScalingEnabled) {
- this.isGroupScalingEnabled = isGroupScalingEnabled;
- }
-
- public List<CartridgeDefinition> getCartridges() {
- return cartridges;
- }
-
- public void setCartridges(List<CartridgeDefinition> cartridges) {
- this.cartridges = cartridges;
- }
-
- public List<GroupDefinition> getGroups() {
- return groups;
- }
-
- public void setGroups(List<GroupDefinition> groups) {
- this.groups = groups;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Policy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Policy.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Policy.java
deleted file mode 100644
index 39354df..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/Policy.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.domain;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-public class Policy implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private String name;
- private String description;
- private boolean defaultPolicy;
-
- private Integer minAppInstances;
- private Integer maxAppInstances;
- private Integer maxRequestsPerSecond;
- private BigDecimal alarmingUpperRate;
- private BigDecimal alarmingLowerRate;
- private BigDecimal scaleDownFactor;
- private Integer roundsToAverage;
-
- public Policy() {
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public boolean isDefaultPolicy() {
- return defaultPolicy;
- }
-
- public void setDefaultPolicy(boolean defaultPolicy) {
- this.defaultPolicy = defaultPolicy;
- }
-
- public Integer getMinAppInstances() {
- return minAppInstances;
- }
-
- public void setMinAppInstances(Integer minAppInstances) {
- this.minAppInstances = minAppInstances;
- }
-
- public Integer getMaxAppInstances() {
- return maxAppInstances;
- }
-
- public void setMaxAppInstances(Integer maxAppInstances) {
- this.maxAppInstances = maxAppInstances;
- }
-
- public Integer getMaxRequestsPerSecond() {
- return maxRequestsPerSecond;
- }
-
- public void setMaxRequestsPerSecond(Integer maxRequestsPerSecond) {
- this.maxRequestsPerSecond = maxRequestsPerSecond;
- }
-
- public BigDecimal getAlarmingUpperRate() {
- return alarmingUpperRate;
- }
-
- public void setAlarmingUpperRate(BigDecimal alarmingUpperRate) {
- this.alarmingUpperRate = alarmingUpperRate;
- }
-
- public BigDecimal getAlarmingLowerRate() {
- return alarmingLowerRate;
- }
-
- public void setAlarmingLowerRate(BigDecimal alarmingLowerRate) {
- this.alarmingLowerRate = alarmingLowerRate;
- }
-
- public BigDecimal getScaleDownFactor() {
- return scaleDownFactor;
- }
-
- public void setScaleDownFactor(BigDecimal scaleDownFactor) {
- this.scaleDownFactor = scaleDownFactor;
- }
-
- public Integer getRoundsToAverage() {
- return roundsToAverage;
- }
-
- public void setRoundsToAverage(Integer roundsToAverage) {
- this.roundsToAverage = roundsToAverage;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((name == null) ? 0 : name.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof Policy))
- return false;
- Policy other = (Policy) obj;
- if (name == null) {
- if (other.name != null)
- return false;
- } else if (!name.equals(other.name))
- return false;
- return true;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PolicyDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PolicyDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PolicyDefinition.java
deleted file mode 100644
index b87d935..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PolicyDefinition.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.domain;
-
-import java.io.Serializable;
-
-public class PolicyDefinition implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private String name;
- private String description;
- private boolean defaultPolicy;
-
- public PolicyDefinition() {
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public boolean isDefaultPolicy() {
- return defaultPolicy;
- }
-
- public void setDefaultPolicy(boolean defaultPolicy) {
- this.defaultPolicy = defaultPolicy;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((name == null) ? 0 : name.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof PolicyDefinition))
- return false;
- PolicyDefinition other = (PolicyDefinition) obj;
- if (name == null) {
- if (other.name != null)
- return false;
- } else if (!name.equals(other.name))
- return false;
- return true;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PortMapping.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PortMapping.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PortMapping.java
deleted file mode 100644
index 4a1a2a9..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PortMapping.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.domain;
-
-public class PortMapping {
- private int id;
- private String type;
- private String primaryPort;
- private String proxyPort;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getPrimaryPort() {
- return primaryPort;
- }
-
- public void setPrimaryPort(String primaryPort) {
- this.primaryPort = primaryPort;
- }
-
- public String getProxyPort() {
- return proxyPort;
- }
-
- public void setProxyPort(String proxyPort) {
- this.proxyPort = proxyPort;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PropertyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PropertyBean.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PropertyBean.java
deleted file mode 100644
index 4192644..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/PropertyBean.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-
-@XmlRootElement(name = "property")
-public class PropertyBean implements Serializable {
-
- private static final long serialVersionUID = 5756598782384376873L;
-
- private String name;
-
- private String value;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryCredentials.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryCredentials.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryCredentials.java
deleted file mode 100644
index 4a6d323..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryCredentials.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.apache.stratos.manager.domain;
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-
-public class RepositoryCredentials {
-
- private String url;
- private String userName;
- private String password;
- public String getUrl() {
- return url;
- }
- public void setUrl(String url) {
- this.url = url;
- }
- public String getUserName() {
- return userName;
- }
- public void setUserName(String userName) {
- this.userName = userName;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInfoBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInfoBean.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInfoBean.java
deleted file mode 100644
index 3426f18..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInfoBean.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.domain;
-
-import java.util.Arrays;
-
-/**
- *
- */
-public class RepositoryInfoBean {
-
- private String repoURL;
- private String cartridgeAlias;
- private String tenantDomain;
- private String userName;
- private String password;
- private String[] dirArray;
-
- public RepositoryInfoBean(String repoURL, String cartridgeAlias, String tenantDomain,
- String userName, String password, String[] dirArray) {
- this.repoURL = repoURL;
- this.cartridgeAlias = cartridgeAlias;
- this.tenantDomain = tenantDomain;
- this.userName = userName;
- this.setPassword(password);
- setDirArray(dirArray);
- }
- public String getRepoURL() {
- return repoURL;
- }
- public void setRepoURL(String repoURL) {
- this.repoURL = repoURL;
- }
- public String getCartridgeAlias() {
- return cartridgeAlias;
- }
- public void setCartridgeAlias(String cartridgeAlias) {
- this.cartridgeAlias = cartridgeAlias;
- }
- public String getTenantDomain() {
- return tenantDomain;
- }
- public void setTenantDomain(String tenantDomain) {
- this.tenantDomain = tenantDomain;
- }
- public String getUserName() {
- return userName;
- }
- public void setUserName(String userName) {
- this.userName = userName;
- }
- public String[] getDirArray() {
- return dirArray;
- }
- public void setDirArray(String[] dirArray) {
- if(dirArray == null) {
- this.dirArray = new String[0];
- } else {
- this.dirArray = Arrays.copyOf(dirArray, dirArray.length);
- }
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInformation.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInformation.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInformation.java
deleted file mode 100644
index 9fd0f9e..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/RepositoryInformation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.domain;
-
-import java.io.Serializable;
-import java.util.Arrays;
-
-public class RepositoryInformation implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private String repoURL;
- private String[] refName;
-
- public String getRepoURL() {
- return repoURL;
- }
-
- public void setRepoURL(String repoURL) {
- this.repoURL = repoURL;
- }
-
- public String[] getRefName() {
- return refName;
- }
-
- public void setRefName(String[] refName) {
- if(refName == null) {
- this.refName = new String[0];
- } else {
- this.refName = Arrays.copyOf(refName, refName.length);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ServiceGroupDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ServiceGroupDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ServiceGroupDefinition.java
deleted file mode 100644
index a490a8b..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/ServiceGroupDefinition.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-
-@XmlRootElement(name = "groups")
-public class ServiceGroupDefinition implements Serializable {
-
- private String name;
-
- private List<ServiceGroupDefinition> groups;
-
- private List<String> cartridges;
-
- public boolean isGroupScalingEnabled;
-
- private DependencyDefinitions dependencies;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public List<String> getCartridges() {
- return cartridges;
- }
-
- public void setCartridges(List<String> cartridges) {
- this.cartridges = cartridges;
- }
-
- public DependencyDefinitions getDependencies() {
- return dependencies;
- }
-
- public void setDependencies(DependencyDefinitions dependencies) {
- this.dependencies = dependencies;
- }
-
- public List<ServiceGroupDefinition> getGroups() {
- return groups;
- }
-
- public void setGroups(List<ServiceGroupDefinition> groups) {
- this.groups = groups;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscribableInfo.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscribableInfo.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscribableInfo.java
deleted file mode 100644
index cdf404b..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscribableInfo.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.domain;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "subscribableInfo")
-public class SubscribableInfo implements Serializable {
-
- private static final long serialVersionUID = 8097432440778125606L;
-
- private String alias;
- private String deploymentPolicy;
- private String autoscalingPolicy;
- private String repoUrl;
- private boolean privateRepo;
- private String repoUsername;
- private int maxMembers;
- private int minMembers;
- private String repoPassword;
- private String[] dependencyAliases;
- private List<PropertyBean> property;
-
- public String getAlias() {
- return alias;
- }
-
- public void setAlias(String alias) {
- this.alias = alias;
- }
-
- public String getDeploymentPolicy() {
- return deploymentPolicy;
- }
-
- public void setDeploymentPolicy(String deploymentPolicy) {
- this.deploymentPolicy = deploymentPolicy;
- }
-
- public String getAutoscalingPolicy() {
- return autoscalingPolicy;
- }
-
- public void setAutoscalingPolicy(String autoscalingPolicy) {
- this.autoscalingPolicy = autoscalingPolicy;
- }
-
- public String getRepoUrl() {
- return repoUrl;
- }
-
- public void setRepoUrl(String repoUrl) {
- this.repoUrl = repoUrl;
- }
-
- public boolean isPrivateRepo() {
- return privateRepo;
- }
-
- public void setPrivateRepo(boolean privateRepo) {
- this.privateRepo = privateRepo;
- }
-
- public String getRepoUsername() {
- return repoUsername;
- }
-
- public void setRepoUsername(String repoUsername) {
- this.repoUsername = repoUsername;
- }
-
- public String getRepoPassword() {
- return repoPassword;
- }
-
- public void setRepoPassword(String repoPassword) {
- this.repoPassword = repoPassword;
- }
-
- public String[] getDependencyAliases() {
- return dependencyAliases;
- }
-
- public void setDependencyAliases(String[] dependencyAliases) {
- this.dependencyAliases = dependencyAliases;
- }
-
- public List<PropertyBean> getProperty() {
- return property;
- }
-
- public void setProperty(List<PropertyBean> property) {
- this.property = property;
- }
-
- public int getMaxMembers() {
- return maxMembers;
- }
-
- public void setMaxMembers(int maxMembers) {
- this.maxMembers = maxMembers;
- }
-
- public int getMinMembers() {
- return minMembers;
- }
-
- public void setMinMembers(int minMembers) {
- this.minMembers = minMembers;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscriptionInfo.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscriptionInfo.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscriptionInfo.java
deleted file mode 100644
index 0b536b3..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/SubscriptionInfo.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.domain;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-
-@XmlRootElement
-public class SubscriptionInfo implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private String hostname;
- private String repositoryURL;
-
- public String getHostname() {
- return hostname;
- }
-
- public void setHostname(String hostname) {
- this.hostname = hostname;
- }
-
- public String getRepositoryURL() {
- return repositoryURL;
- }
-
- public void setRepositoryURL(String repositoryURL) {
- this.repositoryURL = repositoryURL;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/repository/Repository.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/repository/Repository.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/repository/Repository.java
deleted file mode 100644
index 6231929..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/domain/repository/Repository.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.domain.repository;
-
-import java.io.Serializable;
-
-public class Repository implements Serializable {
-
- private static final long serialVersionUID = 8386330511938705573L;
- private int id;
- private String url;
- private String userName;
- private String password;
- private boolean isPrivateRepository;
- private boolean commitEnabled;
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public boolean isPrivateRepository() {
- return isPrivateRepository;
- }
-
- public void setPrivateRepository(boolean privateRepository) {
- isPrivateRepository = privateRepository;
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- @Override
- public String toString() {
- return "Repository [id=" + id + ", url=" + url + ", userName=" + userName +
- ", isPrivateRepository=" + isPrivateRepository + "]";
- }
-
- public boolean isCommitEnabled() {
- return commitEnabled;
- }
-
- public void setCommitEnabled(boolean commitEnabled) {
- this.commitEnabled = commitEnabled;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ApplicationSubscriptionException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ApplicationSubscriptionException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ApplicationSubscriptionException.java
index 9c3430b..c24ffb7 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ApplicationSubscriptionException.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ApplicationSubscriptionException.java
@@ -21,11 +21,9 @@ package org.apache.stratos.manager.exception;
public class ApplicationSubscriptionException extends Exception {
- /**
- *
- */
private static final long serialVersionUID = 603387881177162687L;
- private String message;
+
+ private String message;
public ApplicationSubscriptionException() {
super();
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationDefinitionException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationDefinitionException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationDefinitionException.java
deleted file mode 100644
index bda75ab..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationDefinitionException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.exception;
-
-public class CompositeApplicationDefinitionException extends Exception {
-
- private String message;
-
- public CompositeApplicationDefinitionException () {
- super();
- }
-
- public CompositeApplicationDefinitionException (String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public CompositeApplicationDefinitionException (String message) {
- super(message);
- this.message = message;
- }
-
- public CompositeApplicationDefinitionException (Throwable cause) {
- super(cause);
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationException.java
deleted file mode 100644
index ea47536..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/CompositeApplicationException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.exception;
-
-public class CompositeApplicationException extends Exception {
-
- private String message;
-
- public CompositeApplicationException () {
- super();
- }
-
- public CompositeApplicationException (String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public CompositeApplicationException (String message) {
- super(message);
- this.message = message;
- }
-
- public CompositeApplicationException (Throwable cause) {
- super(cause);
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java
deleted file mode 100644
index 2e4e366..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DomainSubscriptionDoesNotExist.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.exception;
-
-public class DomainSubscriptionDoesNotExist extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private final String message;
-
- private final String subscriptionDomain;
-
- public DomainSubscriptionDoesNotExist(String message, String subscriptionDomain, Throwable cause) {
- super(message, cause);
- this.message = message;
- this.subscriptionDomain = subscriptionDomain;
- }
-
- public DomainSubscriptionDoesNotExist(String message, String subscriptionDomain) {
- super(message);
- this.message = message;
- this.subscriptionDomain = subscriptionDomain;
- }
-
- public String getMessage() {
- return message;
- }
-
- public String getSubscriptionDomain() {
- return subscriptionDomain;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DuplicateCartridgeAliasException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DuplicateCartridgeAliasException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DuplicateCartridgeAliasException.java
deleted file mode 100644
index 079783d..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/DuplicateCartridgeAliasException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.exception;
-
-public class DuplicateCartridgeAliasException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private final String message;
-
- private final String cartridgeType;
-
- private final String cartridgeAlias;
-
- public DuplicateCartridgeAliasException(String message, String cartridgeType, String cartridgeAlias, Throwable cause) {
- super(message, cause);
- this.message = message;
- this.cartridgeType = cartridgeType;
- this.cartridgeAlias = cartridgeAlias;
- }
-
- public DuplicateCartridgeAliasException(String message, String cartridgeType, String cartridgeAlias) {
- super(message);
- this.message = message;
- this.cartridgeType = cartridgeType;
- this.cartridgeAlias = cartridgeAlias;
- }
-
- public String getMessage() {
- return message;
- }
-
- public String getCartridgeType() {
- return cartridgeType;
- }
-
- public String getCartridgeAlias() {
- return cartridgeAlias;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/GroupSubscriptionException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/GroupSubscriptionException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/GroupSubscriptionException.java
deleted file mode 100644
index de24a45..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/GroupSubscriptionException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.exception;
-
-public class GroupSubscriptionException extends Exception {
-
- private String message;
-
- public GroupSubscriptionException () {
- super();
- }
-
- public GroupSubscriptionException (String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public GroupSubscriptionException (String message) {
- super(message);
- this.message = message;
- }
-
- public GroupSubscriptionException (Throwable cause) {
- super(cause);
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidRepositoryException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidRepositoryException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidRepositoryException.java
deleted file mode 100644
index 4a21afc..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidRepositoryException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.exception;
-
-public class InvalidRepositoryException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private String message;
-
- public InvalidRepositoryException(String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidServiceGroupException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidServiceGroupException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidServiceGroupException.java
deleted file mode 100644
index 063cebb..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/InvalidServiceGroupException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.exception;
-
-public class InvalidServiceGroupException extends Exception {
-
- private String message;
-
- public InvalidServiceGroupException () {
- super();
- }
-
- public InvalidServiceGroupException (String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public InvalidServiceGroupException (String message) {
- super(message);
- this.message = message;
- }
-
- public InvalidServiceGroupException (Throwable cause) {
- super(cause);
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/NotSubscribedException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/NotSubscribedException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/NotSubscribedException.java
deleted file mode 100644
index 1886186..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/NotSubscribedException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.exception;
-
-public class NotSubscribedException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private final String message;
-
- private final String cartridgeAlias;
-
- public NotSubscribedException(String message, String cartridgeAlias, Throwable cause) {
- super(message, cause);
- this.message = message;
- this.cartridgeAlias = cartridgeAlias;
- }
-
- public NotSubscribedException(String message, String cartridgeAlias) {
- super(message);
- this.message = message;
- this.cartridgeAlias = cartridgeAlias;
- }
-
- public String getMessage() {
- return message;
- }
-
- public String getCartridgeAlias() {
- return cartridgeAlias;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PersistenceManagerException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PersistenceManagerException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PersistenceManagerException.java
deleted file mode 100644
index 0491639..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PersistenceManagerException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.exception;
-
-public class PersistenceManagerException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private String message;
-
- public PersistenceManagerException() {
- super();
- }
-
- public PersistenceManagerException(String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public PersistenceManagerException(String message) {
- super(message);
- this.message = message;
- }
-
- public PersistenceManagerException(Throwable cause) {
- super(cause);
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PolicyException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PolicyException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PolicyException.java
deleted file mode 100644
index 068401a..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/PolicyException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.exception;
-
-public class PolicyException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private final String message;
-
- public PolicyException(String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public PolicyException(String message) {
- super(message);
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryCredentialsRequiredException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryCredentialsRequiredException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryCredentialsRequiredException.java
deleted file mode 100644
index 1d0febe..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryCredentialsRequiredException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.exception;
-
-public class RepositoryCredentialsRequiredException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private String message;
-
- public RepositoryCredentialsRequiredException(String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public RepositoryCredentialsRequiredException(String message) {
- super(message);
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryRequiredException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryRequiredException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryRequiredException.java
deleted file mode 100644
index bb19269..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryRequiredException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.exception;
-
-public class RepositoryRequiredException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private String message;
-
- public RepositoryRequiredException(String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public RepositoryRequiredException(String message) {
- super(message);
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryTransportException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryTransportException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryTransportException.java
deleted file mode 100644
index 738a86e..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/RepositoryTransportException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.exception;
-
-public class RepositoryTransportException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private final String message;
-
- public RepositoryTransportException(String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public RepositoryTransportException(String message) {
- super(message);
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceAlreadyDeployedException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceAlreadyDeployedException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceAlreadyDeployedException.java
deleted file mode 100644
index 1e8fcff..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceAlreadyDeployedException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.exception;
-
-public class ServiceAlreadyDeployedException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private final String message;
-
- private final String type;
-
- public ServiceAlreadyDeployedException (String message, String type, Throwable cause) {
- super(message, cause);
- this.message = message;
- this.type = type;
- }
-
- public ServiceAlreadyDeployedException (String message, String type) {
- super(message);
- this.message = message;
- this.type = type;
- }
-
- public String getMessage() {
- return message;
- }
-
- public String getType() {
- return type;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java
deleted file mode 100644
index 9afe460..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceDoesNotExistException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.exception;
-
-public class ServiceDoesNotExistException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private final String message;
-
- private final String serviceType;
-
- public ServiceDoesNotExistException(String message, String serviceType, Throwable cause) {
- super(message, cause);
- this.message = message;
- this.serviceType = serviceType;
- }
-
- public ServiceDoesNotExistException(String message, String serviceType) {
- super(message);
- this.message = message;
- this.serviceType = serviceType;
- }
-
- public String getMessage() {
- return message;
- }
-
- public String getServiceType() {
- return serviceType;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceGroupDefinitioException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceGroupDefinitioException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceGroupDefinitioException.java
deleted file mode 100644
index 5644ddb..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/ServiceGroupDefinitioException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.exception;
-
-public class ServiceGroupDefinitioException extends Exception {
-
- private String message;
-
- public ServiceGroupDefinitioException () {
- super();
- }
-
- public ServiceGroupDefinitioException (String message, Throwable cause) {
- super(message, cause);
- this.message = message;
- }
-
- public ServiceGroupDefinitioException (String message) {
- super(message);
- this.message = message;
- }
-
- public ServiceGroupDefinitioException (Throwable cause) {
- super(cause);
- }
-
- public String getMessage() {
- return message;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/UnregisteredCartridgeException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/UnregisteredCartridgeException.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/UnregisteredCartridgeException.java
deleted file mode 100644
index a53f318..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/exception/UnregisteredCartridgeException.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.manager.exception;
-
-public class UnregisteredCartridgeException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private final String message;
-
- private final String cartridgeType;
-
- public UnregisteredCartridgeException(String message, String cartridgeType, Throwable cause) {
- super(message, cause);
- this.message = message;
- this.cartridgeType = cartridgeType;
- }
-
- public UnregisteredCartridgeException(String message, String cartridgeType) {
- super(message);
- this.message = message;
- this.cartridgeType = cartridgeType;
- }
-
- public UnregisteredCartridgeException(String message, Throwable cause) {
- super(message, cause);
- this.cartridgeType = null;
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-
- public String getCartridgeType() {
- return cartridgeType;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2032c1bc/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/persistence/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/persistence/registry/RegistryManager.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/persistence/registry/RegistryManager.java
deleted file mode 100644
index 007a51f..0000000
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/persistence/registry/RegistryManager.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.persistence.registry;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.manager.internal.ServiceReferenceHolder;
-import org.wso2.carbon.registry.core.Resource;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.wso2.carbon.registry.core.session.UserRegistry;
-
-public class RegistryManager {
-
- private final static Log log = LogFactory.getLog(RegistryManager.class);
-
- private static final String STRATOS_MANAGER_REOSURCE = "/stratos_manager";
-
- private static RegistryService registryService;
- private static volatile RegistryManager registryManager;
-
- public static RegistryManager getInstance() {
-
- if (registryManager == null) {
- synchronized (RegistryManager.class) {
- if (registryManager == null) {
- registryManager = new RegistryManager();
- }
- }
- }
- return registryManager;
- }
-
- private RegistryManager() {
- registryService = ServiceReferenceHolder.getRegistryService();
- }
-
- private UserRegistry initRegistry (int tenantId) throws RegistryException {
-
- UserRegistry tenantGovRegistry = registryService.getGovernanceSystemRegistry(tenantId);
-
- // check if the resource is available, else create it
- if (!tenantGovRegistry.resourceExists(STRATOS_MANAGER_REOSURCE)) {
- synchronized (RegistryManager.class) {
- try {
- if (!tenantGovRegistry.resourceExists(STRATOS_MANAGER_REOSURCE)) {
- tenantGovRegistry.put(STRATOS_MANAGER_REOSURCE, tenantGovRegistry.newCollection());
- }
- } catch (RegistryException e) {
- String errorMsg = "Failed to create the registry resource " + STRATOS_MANAGER_REOSURCE;
- log.error(errorMsg, e);
- throw e;
- }
- }
- }
-
- return tenantGovRegistry;
- }
-
- private UserRegistry initRegistry () throws RegistryException {
-
- UserRegistry govRegistry = registryService.getGovernanceSystemRegistry();
-
- // check if the resource is available, else create it
- if (!govRegistry.resourceExists(STRATOS_MANAGER_REOSURCE)) {
- synchronized (RegistryManager.class) {
- try {
- if (!govRegistry.resourceExists(STRATOS_MANAGER_REOSURCE)) {
- govRegistry.put(STRATOS_MANAGER_REOSURCE, govRegistry.newCollection());
- }
- } catch (RegistryException e) {
- String errorMsg = "Failed to create the registry resource " + STRATOS_MANAGER_REOSURCE;
- log.error(errorMsg, e);
- throw e;
- }
- }
- }
-
- return govRegistry;
- }
-
- public void persist (String path, byte [] resourceBytes, String tag) throws RegistryException {
-
- UserRegistry registry = initRegistry();
-
- try {
- registry.beginTransaction();
- Resource nodeResource = registry.newResource();
- nodeResource.setContent(resourceBytes);
- // store the resource in the registry
- registry.put(path, nodeResource);
- if (tag != null) {
- // apply the tag
- registry.applyTag(path, tag);
- }
- // commit
- registry.commitTransaction();
-
- } catch (RegistryException e) {
- String errorMsg = "Failed to persist the given resource in registry path " + path;
- log.error(errorMsg, e);
- // rollback
- try {
- registry.rollbackTransaction();
-
- } catch (RegistryException e1) {
- errorMsg = "Failed to rollback the transaction in registry path " + path;
- log.error(errorMsg, e1);
- throw e1;
- }
- throw e;
- }
- }
-
- public void move (String sourcePath, String targetPath) throws RegistryException {
-
- UserRegistry registry = initRegistry();
-
- try {
- registry.beginTransaction();
- registry.move(sourcePath, targetPath);
- registry.commitTransaction();
-
- } catch (RegistryException e) {
- String errorMsg = "Could not move the resource at "+ sourcePath + " to " + targetPath;
- log.error(errorMsg, e);
- // rollback
- try {
- registry.rollbackTransaction();
-
- } catch (RegistryException e1) {
- errorMsg = "Failed to rollback moving the resource at " + sourcePath + " to " + targetPath;
- log.error(errorMsg, e1);
- throw e1;
- }
- throw e;
- }
- }
-
- public void delete (String resourcePath) throws RegistryException {
-
- UserRegistry registry = initRegistry();
-
- try {
- registry.beginTransaction();
- registry.delete(resourcePath);
- registry.commitTransaction();
-
- } catch (RegistryException e) {
- String errorMsg = "Could not delete resource at "+ resourcePath;
- log.error(errorMsg, e);
- // rollback
- try {
- registry.rollbackTransaction();
-
- } catch (RegistryException e1) {
- errorMsg = "Failed to rollback the transaction in registry path " + resourcePath;
- log.error(errorMsg, e1);
- throw e1;
- }
- throw e;
- }
- }
-
- public Object retrieve (String resourcePath) throws RegistryException {
-
- UserRegistry registry = initRegistry();
-
- Resource resource;
-
- try {
- resource = registry.get(resourcePath);
-
- } catch (ResourceNotFoundException ignore) {
- // nothing has been persisted in the registry yet
- if(log.isDebugEnabled()) {
- log.debug("No resource found in the registry path " + resourcePath);
- }
- return null;
-
- } catch (RegistryException e) {
- String errorMsg = "Failed to retrieve the Resource at " + resourcePath + " from registry.";
- log.error(errorMsg, e);
- throw e;
- }
-
- return resource.getContent();
- }
-}