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/04/28 21:26:38 UTC

[2/3] Revert "Introduced new functionality to add domains to cartridge subscriptions"

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b605723a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/SubscriptionDomainsAddedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/SubscriptionDomainsAddedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/SubscriptionDomainsAddedMessageProcessor.java
deleted file mode 100644
index aeea6bf..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/SubscriptionDomainsAddedMessageProcessor.java
+++ /dev/null
@@ -1,96 +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.messaging.message.processor.tenant;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.domain.tenant.Subscription;
-import org.apache.stratos.messaging.domain.tenant.Tenant;
-import org.apache.stratos.messaging.event.tenant.SubscriptionDomainsAddedEvent;
-import org.apache.stratos.messaging.event.tenant.TenantSubscribedEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.message.receiver.tenant.TenantManager;
-import org.apache.stratos.messaging.util.Util;
-
-/**
- * Tenant subscribed message processor for adding domains to tenant subscriptions.
- */
-public class SubscriptionDomainsAddedMessageProcessor extends MessageProcessor {
-
-    private static final Log log = LogFactory.getLog(SubscriptionDomainsAddedMessageProcessor.class);
-
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (SubscriptionDomainsAddedEvent.class.getName().equals(type)) {
-            // Return if tenant manager has not initialized
-            if(!TenantManager.getInstance().isInitialized()) {
-                return false;
-            }
-
-            // Parse complete message and build event
-            SubscriptionDomainsAddedEvent event = (SubscriptionDomainsAddedEvent) Util.jsonToObject(message, TenantSubscribedEvent.class);
-
-            try {
-                TenantManager.acquireWriteLock();
-                Tenant tenant = TenantManager.getInstance().getTenant(event.getTenantId());
-                if(tenant == null) {
-                    if(log.isWarnEnabled()) {
-                        log.warn(String.format("Tenant not found: [tenant-id] %d", event.getTenantId()));
-                    }
-                    return false;
-                }
-                Subscription subscription = tenant.getSubscription(event.getServiceName());
-                if(subscription == null) {
-                    if(log.isWarnEnabled()) {
-                        log.warn(String.format("Subscription not found: [tenant-id] %d", event.getTenantId()));
-                    }
-                    return false;
-                }
-                subscription.addDomains(event.getDomains());
-                if(log.isInfoEnabled()) {
-                    log.info(String.format("Domains added to tenant subscription: [tenant-id] %d [tenant-domain] %s [service] %s [domains] %s",
-                             tenant.getTenantId(), tenant.getTenantDomain(), event.getServiceName(), event.getDomains()));
-                }
-
-                // Notify event listeners
-                notifyEventListeners(event);
-                return true;
-            }
-            finally {
-                TenantManager.releaseWriteLock();
-            }
-        }
-        else {
-            if(nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            }
-            else {
-                throw new RuntimeException(String.format("Failed to process tenant message using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b605723a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/SubscriptionDomainsRemovedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/SubscriptionDomainsRemovedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/SubscriptionDomainsRemovedMessageProcessor.java
deleted file mode 100644
index fc08357..0000000
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/SubscriptionDomainsRemovedMessageProcessor.java
+++ /dev/null
@@ -1,96 +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.messaging.message.processor.tenant;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.domain.tenant.Subscription;
-import org.apache.stratos.messaging.domain.tenant.Tenant;
-import org.apache.stratos.messaging.event.tenant.SubscriptionDomainsAddedEvent;
-import org.apache.stratos.messaging.event.tenant.TenantSubscribedEvent;
-import org.apache.stratos.messaging.message.processor.MessageProcessor;
-import org.apache.stratos.messaging.message.receiver.tenant.TenantManager;
-import org.apache.stratos.messaging.util.Util;
-
-/**
- * Tenant subscribed message processor for removing domains from tenant subscriptions.
- */
-public class SubscriptionDomainsRemovedMessageProcessor extends MessageProcessor {
-
-    private static final Log log = LogFactory.getLog(SubscriptionDomainsRemovedMessageProcessor.class);
-
-    private MessageProcessor nextProcessor;
-
-    @Override
-    public void setNext(MessageProcessor nextProcessor) {
-        this.nextProcessor = nextProcessor;
-    }
-
-    @Override
-    public boolean process(String type, String message, Object object) {
-        if (SubscriptionDomainsAddedEvent.class.getName().equals(type)) {
-            // Return if tenant manager has not initialized
-            if(!TenantManager.getInstance().isInitialized()) {
-                return false;
-            }
-
-            // Parse complete message and build event
-            SubscriptionDomainsAddedEvent event = (SubscriptionDomainsAddedEvent) Util.jsonToObject(message, TenantSubscribedEvent.class);
-
-            try {
-                TenantManager.acquireWriteLock();
-                Tenant tenant = TenantManager.getInstance().getTenant(event.getTenantId());
-                if(tenant == null) {
-                    if(log.isWarnEnabled()) {
-                        log.warn(String.format("Tenant not found: [tenant-id] %d", event.getTenantId()));
-                    }
-                    return false;
-                }
-                Subscription subscription = tenant.getSubscription(event.getServiceName());
-                if(subscription == null) {
-                    if(log.isWarnEnabled()) {
-                        log.warn(String.format("Subscription not found: [tenant-id] %d", event.getTenantId()));
-                    }
-                    return false;
-                }
-                subscription.removeDomains(event.getDomains());
-                if(log.isInfoEnabled()) {
-                    log.info(String.format("Domains removed from tenant subscription: [tenant-id] %d [tenant-domain] %s [service] %s [domains] %s",
-                             tenant.getTenantId(), tenant.getTenantDomain(), event.getServiceName(), event.getDomains()));
-                }
-
-                // Notify event listeners
-                notifyEventListeners(event);
-                return true;
-            }
-            finally {
-                TenantManager.releaseWriteLock();
-            }
-        }
-        else {
-            if(nextProcessor != null) {
-                return nextProcessor.process(type, message, object);
-            }
-            else {
-                throw new RuntimeException(String.format("Failed to process tenant message using available message processors: [type] %s [body] %s", type, message));
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b605723a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantMessageProcessorChain.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantMessageProcessorChain.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantMessageProcessorChain.java
index 725ad0f..d4c008e 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantMessageProcessorChain.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantMessageProcessorChain.java
@@ -37,8 +37,6 @@ public class TenantMessageProcessorChain extends MessageProcessorChain {
     private TenantRemovedMessageProcessor tenantRemovedMessageProcessor;
     private TenantSubscribedMessageProcessor tenantSubscribedMessageProcessor;
     private TenantUnSubscribedMessageProcessor tenantUnSubscribedMessageProcessor;
-    private SubscriptionDomainsAddedMessageProcessor subscriptionDomainsAddedMessageProcessor;
-    private SubscriptionDomainsRemovedMessageProcessor subscriptionDomainsRemovedMessageProcessor;
 
     public void initialize() {
         // Add tenant event processors
@@ -60,12 +58,6 @@ public class TenantMessageProcessorChain extends MessageProcessorChain {
         tenantUnSubscribedMessageProcessor = new TenantUnSubscribedMessageProcessor();
         add(tenantUnSubscribedMessageProcessor);
 
-        subscriptionDomainsAddedMessageProcessor = new SubscriptionDomainsAddedMessageProcessor();
-        add(subscriptionDomainsAddedMessageProcessor);
-
-        subscriptionDomainsRemovedMessageProcessor = new SubscriptionDomainsRemovedMessageProcessor();
-        add(subscriptionDomainsRemovedMessageProcessor);
-
         if (log.isDebugEnabled()) {
             log.debug("Tenant message processor chain initialized");
         }
@@ -84,10 +76,6 @@ public class TenantMessageProcessorChain extends MessageProcessorChain {
             tenantSubscribedMessageProcessor.addEventListener(eventListener);
         } else if (eventListener instanceof TenantUnSubscribedEventListener) {
             tenantUnSubscribedMessageProcessor.addEventListener(eventListener);
-        } else if (eventListener instanceof SubscriptionDomainsAddedEventListener) {
-            subscriptionDomainsAddedMessageProcessor.addEventListener(eventListener);
-        } else if (eventListener instanceof SubscriptionDomainsRemovedEventListener) {
-            subscriptionDomainsRemovedMessageProcessor.addEventListener(eventListener);
         }
         else {
             throw new RuntimeException("Unknown event listener");

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b605723a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantSubscribedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantSubscribedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantSubscribedMessageProcessor.java
index 147ebde..aae074b 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantSubscribedMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantSubscribedMessageProcessor.java
@@ -21,7 +21,6 @@ package org.apache.stratos.messaging.message.processor.tenant;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.domain.tenant.Subscription;
 import org.apache.stratos.messaging.domain.tenant.Tenant;
 import org.apache.stratos.messaging.event.tenant.TenantSubscribedEvent;
 import org.apache.stratos.messaging.message.processor.MessageProcessor;
@@ -63,11 +62,10 @@ public class TenantSubscribedMessageProcessor extends MessageProcessor {
                     }
                     return false;
                 }
-                Subscription subscription = new Subscription(event.getServiceName(), event.getClusterIds(), event.getDomains());
-                tenant.addSubscription(subscription);
+                tenant.addServiceSubscription(event.getServiceName());
                 if(log.isInfoEnabled()) {
-                    log.info(String.format("Tenant subscribed to service: [tenant-id] %d [tenant-domain] %s [service] %s [domains] %s",
-                             tenant.getTenantId(), tenant.getTenantDomain(), event.getServiceName(), event.getDomains()));
+                    log.info(String.format("Tenant subscribed to service: [tenant-id] %d [tenant-domain] %s [service] %s",
+                             tenant.getTenantId(), tenant.getTenantDomain(), event.getServiceName()));
                 }
 
                 // Notify event listeners

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b605723a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantUnSubscribedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantUnSubscribedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantUnSubscribedMessageProcessor.java
index ee929a3..6c4157c 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantUnSubscribedMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantUnSubscribedMessageProcessor.java
@@ -62,7 +62,7 @@ public class TenantUnSubscribedMessageProcessor extends MessageProcessor {
                     }
                     return false;
                 }
-                tenant.removeSubscription(event.getServiceName());
+                tenant.removeServiceSubscription(event.getServiceName());
                 if(log.isInfoEnabled()) {
                     log.info(String.format("Tenant un-subscribed from service: [tenant-id] %d [tenant-domain] %s [service] %s",
                             tenant.getTenantId(), tenant.getTenantDomain(), event.getServiceName()));

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b605723a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/TenantDomainTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/TenantDomainTest.java b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/TenantDomainTest.java
deleted file mode 100644
index adb11e1..0000000
--- a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/TenantDomainTest.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.messaging.test;
-
-import junit.framework.Assert;
-import org.apache.stratos.messaging.domain.tenant.Subscription;
-import org.apache.stratos.messaging.domain.tenant.Tenant;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-import java.util.HashSet;
-
-/**
- * Tenant domain model test.
- */
-@RunWith(JUnit4.class)
-public class TenantDomainTest {
-    @Test
-    public void testSubscriptionModel() {
-        Tenant tenant = new Tenant(1, "domain.org");
-        Subscription subscription = new Subscription("subscription1", new HashSet<String>(), new HashSet<String>());
-        tenant.addSubscription(subscription);
-        Assert.assertTrue("Subscription not added", tenant.isSubscribed("subscription1"));
-        tenant.removeSubscription("subscription1");
-        Assert.assertTrue("Subscription not removed", !tenant.isSubscribed("subscription1"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b605723a/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
index 48fd5ce..e29d028 100644
--- 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
@@ -19,8 +19,6 @@
 package org.apache.stratos.rest.endpoint.bean;
 
 import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.List;
 
 @XmlRootElement
 public class CartridgeInfoBean {
@@ -40,11 +38,6 @@ public class CartridgeInfoBean {
     private String size;
     private boolean removeOnTermination;
     private String serviceGroup;
-    private List<String> domains;
-
-    public CartridgeInfoBean() {
-        this.domains = new ArrayList<String>();
-    }
 
     public String getCartridgeType() {
         return cartridgeType;
@@ -165,8 +158,5 @@ public class CartridgeInfoBean {
 	public void setServiceGroup(String serviceGroup) {
 		this.serviceGroup = serviceGroup;
 	}
-
-    public List<String> getDomains() { return domains; }
-
-    public void setDomains(List<String> domains) { this.domains = domains; }
+    
 }

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b605723a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
index 554accf..44b2c26 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
@@ -52,7 +52,8 @@ 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.messaging.util.Constants;
-import org.apache.stratos.rest.endpoint.bean.*;
+import org.apache.stratos.rest.endpoint.bean.CartridgeInfoBean;
+import org.apache.stratos.rest.endpoint.bean.StratosAdminResponse;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.Partition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.PartitionGroup;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
@@ -991,7 +992,6 @@ public class ServiceUtils {
         subscriptionData.setRepositoryPassword(cartridgeInfoBean.getRepoPassword());
         subscriptionData.setCommitsEnabled(cartridgeInfoBean.isCommitsEnabled());
         subscriptionData.setServiceGroup(cartridgeInfoBean.getServiceGroup());
-        subscriptionData.addDomains(new HashSet<String>(cartridgeInfoBean.getDomains()));
         
         if (cartridgeInfoBean.isPersistanceRequired()) {
             // Add persistence related properties to PersistenceContext
@@ -1187,44 +1187,4 @@ public class ServiceUtils {
         return stratosAdminResponse;
     }
 
-    public static StratosAdminResponse addSubscriptionDomains(ConfigurationContext configurationContext, String cartridgeType,
-                                                              String subscriptionAlias, List<String> domains) throws RestAPIException {
-        try {
-            int tenantId = ApplicationManagementUtil.getTenantId(configurationContext);
-            cartridgeSubsciptionManager.addSubscriptionDomains(tenantId, subscriptionAlias, domains);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-            throw new RestAPIException(e.getMessage(), e);
-        }
-
-        StratosAdminResponse stratosAdminResponse = new StratosAdminResponse();
-        stratosAdminResponse.setMessage("Successfully added domains to cartridge subscription");
-        return stratosAdminResponse;
-    }
-
-    public static List<String> getSubscriptionDomains(ConfigurationContext configurationContext, String cartridgeType,
-                                                      String subscriptionAlias) throws RestAPIException {
-        try {
-            int tenantId = ApplicationManagementUtil.getTenantId(configurationContext);
-            return cartridgeSubsciptionManager.getSubscriptionDomains(tenantId, subscriptionAlias);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-            throw new RestAPIException(e.getMessage(), e);
-        }
-    }
-
-    public static StratosAdminResponse removeSubscriptionDomains(ConfigurationContext configurationContext, String cartridgeType,
-                                                                 String subscriptionAlias, List<String> domains) throws RestAPIException {
-        try {
-            int tenantId = ApplicationManagementUtil.getTenantId(configurationContext);
-            cartridgeSubsciptionManager.removeSubscriptionDomains(tenantId, subscriptionAlias, domains);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-            throw new RestAPIException(e.getMessage(), e);
-        }
-
-        StratosAdminResponse stratosAdminResponse = new StratosAdminResponse();
-        stratosAdminResponse.setMessage("Successfully removed domains from cartridge subscription");
-        return stratosAdminResponse;
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b605723a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/StratosAdmin.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/StratosAdmin.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/StratosAdmin.java
index c5db7ff..7b744a5 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/StratosAdmin.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/StratosAdmin.java
@@ -33,7 +33,6 @@ 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.StratosAdminResponse;
-import org.apache.stratos.rest.endpoint.bean.SubscriptionDomainRequest;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.Partition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.PartitionGroup;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
@@ -41,6 +40,7 @@ import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.Deploy
 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.repositoryNotificationInfoBean.Repository;
 import org.apache.stratos.rest.endpoint.bean.topology.Cluster;
 import org.apache.stratos.rest.endpoint.exception.RestAPIException;
 import org.apache.stratos.tenant.mgt.core.TenantPersistor;
@@ -1018,36 +1018,4 @@ public class StratosAdmin extends AbstractAdmin {
         }
         return tenantList;
     }
-
-    @POST
-    @Path("/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domain/")
-    @Consumes("application/json")
-    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public StratosAdminResponse addSubscriptionDomains(@PathParam("cartridgeType") String cartridgeType,
-                                                       @PathParam("subscriptionAlias") String subscriptionAlias,
-                                                       SubscriptionDomainRequest request) throws RestAPIException {
-
-        return ServiceUtils.addSubscriptionDomains(getConfigContext(), cartridgeType, subscriptionAlias, request.getDomains());
-    }
-
-    @GET
-    @Path("/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domain/")
-    @Consumes("application/json")
-    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public String[] getSubscriptionDomains(@PathParam("cartridgeType") String cartridgeType,
-                                                       @PathParam("subscriptionAlias") String subscriptionAlias) throws RestAPIException {
-
-        return (String[]) ServiceUtils.getSubscriptionDomains(getConfigContext(), cartridgeType, subscriptionAlias).toArray();
-    }
-
-    @DELETE
-    @Path("/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domain/")
-    @Consumes("application/json")
-    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public StratosAdminResponse removeSubscriptionDomains(@PathParam("cartridgeType") String cartridgeType,
-                                                          @PathParam("subscriptionAlias") String subscriptionAlias,
-                                                          SubscriptionDomainRequest request) throws RestAPIException {
-
-        return ServiceUtils.removeSubscriptionDomains(getConfigContext(), cartridgeType, subscriptionAlias, request.getDomains());
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b605723a/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos/WEB-INF/cxf-servlet.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos/WEB-INF/cxf-servlet.xml b/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos/WEB-INF/cxf-servlet.xml
index fac0fb9..fbb8b10 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos/WEB-INF/cxf-servlet.xml
+++ b/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos/WEB-INF/cxf-servlet.xml
@@ -68,7 +68,6 @@
                 <value>hostNames</value>
                 <value>portMappings</value>
                 <value>volumes</value>
-                <value>domains</value>
             </list>
         </property>
     </bean>