You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/01/08 06:51:31 UTC

[20/46] renamed adc.mgt to manager

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/deploy/service/ServiceDeploymentManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/deploy/service/ServiceDeploymentManager.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/deploy/service/ServiceDeploymentManager.java
deleted file mode 100644
index 4bc25d9..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/deploy/service/ServiceDeploymentManager.java
+++ /dev/null
@@ -1,330 +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.adc.mgt.deploy.service;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.adc.mgt.client.AutoscalerServiceClient;
-import org.apache.stratos.adc.mgt.client.CloudControllerServiceClient;
-import org.apache.stratos.adc.mgt.deploy.service.multitenant.MultiTenantService;
-import org.apache.stratos.adc.mgt.exception.ADCException;
-import org.apache.stratos.adc.mgt.exception.UnregisteredCartridgeException;
-import org.apache.stratos.adc.mgt.manager.CartridgeSubscriptionManager;
-import org.apache.stratos.adc.mgt.payload.BasicPayloadData;
-import org.apache.stratos.adc.mgt.payload.PayloadData;
-import org.apache.stratos.adc.mgt.payload.PayloadFactory;
-import org.apache.stratos.adc.mgt.subscription.CartridgeSubscription;
-import org.apache.stratos.adc.mgt.subscription.utils.CartridgeSubscriptionUtils;
-import org.apache.stratos.adc.mgt.utils.CartridgeConstants;
-import org.apache.stratos.adc.mgt.utils.PersistenceManager;
-import org.apache.stratos.autoscaler.deployment.policy.DeploymentPolicy;
-import org.apache.stratos.cloud.controller.pojo.CartridgeInfo;
-import org.apache.stratos.cloud.controller.pojo.LoadbalancerConfig;
-import org.apache.stratos.cloud.controller.pojo.Properties;
-import org.apache.stratos.cloud.controller.pojo.Property;
-import org.apache.stratos.messaging.util.Constants;
-
-public class ServiceDeploymentManager {
-
-    private static Log log = LogFactory.getLog(ServiceDeploymentManager.class);
-    private CartridgeSubscriptionManager cartridgeSubsciptionManager = new CartridgeSubscriptionManager();
-    
-    public Service deployService (String type, String autoscalingPolicyName, String deploymentPolicyName, int tenantId, String tenantRange,
-    		String tenantDomain, String userName)
-        throws ADCException, UnregisteredCartridgeException {
-
-        //get deployed Cartridge Definition information
-        CartridgeInfo cartridgeInfo;
-        try {
-            cartridgeInfo = CloudControllerServiceClient.getServiceClient().getCartridgeInfo(type);
-
-        } catch (UnregisteredCartridgeException e) {
-            String message = type + " is not a valid cartridgeSubscription type. Please try again with a valid cartridgeSubscription type.";
-            log.error(message);
-            throw e;
-
-        } catch (Exception e) {
-            String message = "Error getting info for " + type;
-            log.error(message, e);
-            throw new ADCException(message, e);
-        }
-
-        if (!cartridgeInfo.getMultiTenant()) {
-            String errorMsg = "Cartridge definition with type " + type + " is not multitenant";
-            log.error(errorMsg);
-            throw new ADCException(errorMsg);
-        }
-
-        
-        // TODO - LB cartridge.... ??
-
-        List<Property> lbRefProp = new ArrayList<Property>();
-
-        // get lb config reference
-        LoadbalancerConfig lbConfig = cartridgeInfo.getLbConfig();
-
-        if (lbConfig == null || lbConfig.getProperties() == null) {
-            if (log.isDebugEnabled()) {
-                log.debug("This Service does not require a load balancer. " + "[Service Name] " +
-                          type);
-            }
-        } else {
-
-            CartridgeInfo lbCartridgeInfo;
-            String lbCartridgeType = lbConfig.getType();
-            try {
-                // retrieve lb Cartridge info
-                lbCartridgeInfo = CloudControllerServiceClient.getServiceClient().getCartridgeInfo(lbCartridgeType);
-            } catch (Exception e) {
-                String msg = "Cannot get cartridge info: " + type;
-                log.error(msg, e);
-                throw new ADCException(msg, e);
-            }
-
-            Properties lbReferenceProperties = lbConfig.getProperties();
-
-            Property property = new Property();
-            property.setName(org.apache.stratos.messaging.util.Constants.LOAD_BALANCER_REF);
-
-            for (org.apache.stratos.cloud.controller.pojo.Property prop : lbReferenceProperties.getProperties()) {
-
-                String name = prop.getName();
-                String value = prop.getValue();
-
-                // TODO make following a chain of responsibility pattern
-                if (Constants.NO_LOAD_BALANCER.equals(name)) {
-                    if ("true".equals(value)) {
-                        if (log.isDebugEnabled()) {
-                            log.debug("This cartridge does not require a load balancer. " +
-                                      "[Type] " + type);
-                        }
-                        property.setValue(name);
-                        lbRefProp.add(property);
-                        break;
-                    }
-                } else if (Constants.EXISTING_LOAD_BALANCERS.equals(name)) {
-                    String clusterIdsVal = value;
-                    if (log.isDebugEnabled()) {
-                        log.debug("This cartridge refers to existing load balancers. " + "[Type] " +
-                                  type + "[Referenced Cluster Ids] " + clusterIdsVal);
-                    }
-
-                    String[] clusterIds = clusterIdsVal.split(",");
-
-                    for (String clusterId : clusterIds) {
-                        
-                            try {
-                            	AutoscalerServiceClient.getServiceClient().checkLBExistenceAgainstPolicy(clusterId,
-                            			deploymentPolicyName);
-                            } catch (Exception ex) {
-                                // we don't need to throw the error here.
-                                log.error(ex.getMessage(), ex);
-                            }
-                        
-                    }
-
-                    property.setValue(name);
-                    lbRefProp.add(property);
-                    break;
-
-                } else if (Constants.DEFAULT_LOAD_BALANCER.equals(name)) {
-                    if ("true".equals(value)) {
-                        property.setValue(name);
-                        if (log.isDebugEnabled()) {
-                            log.debug("This cartridge uses default load balancer. " + "[Type] " +
-                                      type);
-                        }
-                        
-                            try {
-                                // get the valid policies for lb cartridge
-                                DeploymentPolicy[] lbCartridgeDepPolicies =
-                                	AutoscalerServiceClient.getServiceClient().getDeploymentPolicies(lbCartridgeType);
-                                // traverse deployment policies of lb cartridge
-                                for (DeploymentPolicy policy : lbCartridgeDepPolicies) {
-                                    // check existence of the subscribed policy
-                                    if (deploymentPolicyName.equals(policy.getId())) {
-
-                                        if (!AutoscalerServiceClient.getServiceClient().checkDefaultLBExistenceAgainstPolicy(deploymentPolicyName)) {
-
-                                            // if lb cluster doesn't exist
-                                            String lbAlias = "lb" + new Random().nextInt();
-                                            lbCartridgeInfo.addProperties(property);
-                                            subscribeToLb(lbCartridgeType,
-                                                          lbAlias,
-                                                          lbCartridgeInfo.getDefaultAutoscalingPolicy(),
-                                                          deploymentPolicyName, tenantId,
-                                                          userName,
-                                                          tenantDomain,
-                                                          lbCartridgeInfo.getProperties());
-                                        }
-                                    }
-                                }
-
-                            } catch (Exception ex) {
-                                // we don't need to throw the error here.
-                                log.error(ex.getMessage(), ex);
-                            }
-                        
-
-                        lbRefProp.add(property);
-                        break;
-                    } else if (Constants.SERVICE_AWARE_LOAD_BALANCER.equals(name)) {
-                        if ("true".equals(value)) {
-                            property.setValue(name);
-                            if (log.isDebugEnabled()) {
-                                log.debug("This cartridge uses a service aware load balancer. " +
-                                          "[Type] " + type);
-                            }
-                            
-                                try {
-
-                                    // get the valid policies for lb cartridge
-                                    DeploymentPolicy[] lbCartridgeDepPolicies =
-                                    	AutoscalerServiceClient.getServiceClient().getDeploymentPolicies(lbCartridgeType);
-                                    // traverse deployment policies of lb cartridge
-                                    for (DeploymentPolicy policy : lbCartridgeDepPolicies) {
-                                        // check existence of the subscribed policy
-                                        if (deploymentPolicyName.equals(policy.getId())) {
-
-                                            if (!AutoscalerServiceClient.getServiceClient().checkServiceLBExistenceAgainstPolicy(type,
-                                                                                                              deploymentPolicyName)) {
-
-                                                // if lb cluster doesn't exist
-                                                String lbAlias =
-                                                                 "lb" + type +
-                                                                         new Random().nextInt();
-                                                lbCartridgeInfo.addProperties(property);
-                                                subscribeToLb(lbCartridgeType,
-                                                              lbAlias,
-                                                              lbCartridgeInfo.getDefaultAutoscalingPolicy(),
-                                                              deploymentPolicyName,
-                                                              tenantId, 
-                                                              userName,
-                                                              tenantDomain,
-                                                              lbCartridgeInfo.getProperties());
-                                            }
-                                        }
-                                    }
-
-                                } catch (Exception ex) {
-                                    // we don't need to throw the error here.
-                                    log.error(ex.getMessage(), ex);
-                                }
-                           
-
-                            lbRefProp.add(property);
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-        
-        
-        
-        
-        Service service = new MultiTenantService(type, autoscalingPolicyName, deploymentPolicyName, tenantId, cartridgeInfo, tenantRange);
-
-        //generate the cluster ID (domain)for the service
-        service.setClusterId(type + "." + cartridgeInfo.getHostName() + ".domain");
-        //host name is the hostname defined in cartridge definition
-        service.setHostName(cartridgeInfo.getHostName());
-
-        //Create payload
-        BasicPayloadData basicPayloadData = CartridgeSubscriptionUtils.createBasicPayload(service);
-        //populate
-        basicPayloadData.populatePayload();
-        PayloadData payloadData = PayloadFactory.getPayloadDataInstance(cartridgeInfo.getProvider(),
-                cartridgeInfo.getType(), basicPayloadData);
-
-        // get the payload parameters defined in the cartridge definition file for this cartridge type
-        if (cartridgeInfo.getProperties() != null && cartridgeInfo.getProperties().length != 0) {
-
-            for (Property property : cartridgeInfo.getProperties()) {
-                // check if a property is related to the payload. Currently this is done by checking if the
-                // property name starts with 'payload_parameter.' suffix. If so the payload param name will
-                // be taken as the substring from the index of '.' to the end of the property name.
-                if (property.getName()
-                        .startsWith(CartridgeConstants.CUSTOM_PAYLOAD_PARAM_NAME_PREFIX)) {
-                    String payloadParamName = property.getName();
-                    payloadData.add(payloadParamName.substring(payloadParamName.indexOf(".") + 1), property.getValue());
-                }
-            }
-        }
-
-        //set PayloadData instance
-        service.setPayloadData(payloadData);
-
-        //deploy the service
-        service.deploy();
-
-        //persist Service
-        try {
-			PersistenceManager.persistService(service);
-		} catch (Exception e) {
-            String message = "Error getting info for " + type;
-            log.error(message, e);
-            throw new ADCException(message, e);
-        }
-        return service;
-    }
-
-    public void undeployService (String clusterId) {
-
-        //TODO:
-    }
-    
-  private void configureLBDeployment() {
-    	
-    	
-    	
-    }
-    
-    private void subscribeToLb(String cartridgeType, String lbAlias,
-            String defaultAutoscalingPolicy, String deploymentPolicy,
-            int tenantId, String userName, String tenantDomain, Property[] props) throws ADCException {
-            
-            try {
-                if(log.isDebugEnabled()) {
-                    log.debug("Subscribing to a load balancer [cartridge] "+cartridgeType+" [alias] "+lbAlias);
-                }
-                CartridgeSubscription cartridgeSubscription = 
-                        cartridgeSubsciptionManager.subscribeToCartridgeWithProperties(cartridgeType, lbAlias.trim(), defaultAutoscalingPolicy, 
-                                                                         deploymentPolicy,
-                                                                         tenantDomain, 
-                                                                         tenantId,
-                                                                         userName, "git", null, false, null, null, props);
-                
-                cartridgeSubsciptionManager.registerCartridgeSubscription(cartridgeSubscription);
-                
-                if(log.isDebugEnabled()) {
-                    log.debug("Successfully subscribed to a load balancer [cartridge] "+cartridgeType+" [alias] "+lbAlias);
-                }
-            } catch (Exception e) {
-                String msg = "Error while subscribing to load balancer cartridge [type] "+cartridgeType;
-                log.error(msg, e);
-                throw new ADCException(msg, e);
-            }
-        }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/deploy/service/multitenant/MultiTenantService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/deploy/service/multitenant/MultiTenantService.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/deploy/service/multitenant/MultiTenantService.java
deleted file mode 100644
index 3ce5626..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/deploy/service/multitenant/MultiTenantService.java
+++ /dev/null
@@ -1,53 +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.adc.mgt.deploy.service.multitenant;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.adc.mgt.deploy.service.Service;
-import org.apache.stratos.adc.mgt.exception.ADCException;
-import org.apache.stratos.adc.mgt.exception.UnregisteredCartridgeException;
-import org.apache.stratos.adc.mgt.utils.ApplicationManagementUtil;
-import org.apache.stratos.adc.mgt.utils.CartridgeConstants;
-import org.apache.stratos.cloud.controller.pojo.CartridgeInfo;
-
-public class MultiTenantService extends Service {
-
-    private static Log log = LogFactory.getLog(MultiTenantService.class);
-
-    public MultiTenantService (String type, String autoscalingPolicyName, String deploymentPolicyName, int tenantId, CartridgeInfo cartridgeInfo,
-    		String tenantRange) {
-        super(type, autoscalingPolicyName, deploymentPolicyName, tenantId, cartridgeInfo, tenantRange);
-    }
-
-    @Override
-    public void deploy() throws ADCException, UnregisteredCartridgeException {
-
-        //register the service
-        ApplicationManagementUtil.registerService(getType(), getClusterId(), CartridgeConstants.DEFAULT_SUBDOMAIN,
-                getPayloadData().getCompletePayloadData(), getTenantRange(), getHostName(), getAutoscalingPolicyName(),
-                getDeploymentPolicyName(), null);
-    }
-
-    @Override
-    public void undeploy(String clusterId) throws ADCException {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dns/DNSManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dns/DNSManager.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dns/DNSManager.java
deleted file mode 100644
index 25d8b49..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dns/DNSManager.java
+++ /dev/null
@@ -1,89 +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.adc.mgt.dns;
-//
-//import org.apache.commons.logging.Log;
-//import org.apache.commons.logging.LogFactory;
-//import org.apache.stratos.adc.mgt.utils.CartridgeConstants;
-//
-///**
-// * This class is for handling dns entries.
-// */
-//public class DNSManager {
-//	private static final Log log = LogFactory.getLog(DNSManager.class);
-//
-//    /**
-//   	 * This is get called when there is a need of adding new sub domain to
-//   	 * exciting domain.
-//   	 * It will append required text to bind9 zone file and reload bind9 server.
-//   	 * Note: make sure the user who run ADC has got rights to run sudo scripts
-//   	 * without password
-//   	 *
-//   	 * @param subDomain
-//   	 *            will be added in front of domain
-//   	 */
-//   	public void addNewSubDomain(String subDomain, String ip) {
-//   		try {
-//   			Runtime.getRuntime()
-//   			       .exec(CartridgeConstants.SUDO_SH + " " +
-//             // script script file that will be used to edit
-//             // required files
-//             System.getProperty(CartridgeConstants.APPEND_SCRIPT) + " " +
-//             subDomain + " " +
-//             // machineIp ip of the machine DNS bind service
-//             // is running
-//             ip + " " +
-//             // bindFile the file which we edit to append
-//             // the DNS entry
-//             System.getProperty(CartridgeConstants.BIND_FILE_PATH));
-//   			log.info("New sub domain is added to zone file");
-//   		} catch (Exception e) {
-//   			log.error(e.getMessage());
-//   			throw new RuntimeException(e);
-//   		}
-//   	}
-//    /**
-//   	 * This is get called when there is a need of remove a sub domain.
-//   	 * It will remove required text from bind9 zone file and reload bind9 server.
-//   	 * Note: make sure the user who run ADC has got rights to run sudo scripts
-//   	 * without password
-//   	 *
-//   	 * @param subDomain
-//   	 *            will be used to delete the entry related to this
-//   	 */
-//   	public void removeSubDomain(String subDomain) {
-//   		try {
-//   			Runtime.getRuntime()
-//   			       .exec(CartridgeConstants.SUDO_SH + " " +
-//             // script script file that will be used to edit
-//             // required files
-//             System.getProperty(CartridgeConstants.REMOVE_SCRIPT) + " " +
-//             subDomain + " " +
-//             // bindFile the file which we edit to remove
-//             // the DNS entry
-//             System.getProperty(CartridgeConstants.BIND_FILE_PATH));
-//   			log.info("Sub domain is removed from zone file");
-//   		} catch (Exception e) {
-//   			log.error(e.getMessage());
-//   			throw new RuntimeException(e);
-//   		}
-//   	}
-//
-//}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/AppRepo.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/AppRepo.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/AppRepo.java
deleted file mode 100644
index a7094c0..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/AppRepo.java
+++ /dev/null
@@ -1,88 +0,0 @@
-///*
-// * Licensed to the Apache Software Foundation (ASF) under one
-// * or more contributor license agreements.  See the NOTICE file
-// * distributed with this work for additional information
-// * regarding copyright ownership.  The ASF licenses this file
-// * to you under the Apache License, Version 2.0 (the
-// * "License"); you may not use this file except in compliance
-// * with the License.  You may obtain a copy of the License at
-// *
-// *  http://www.apache.org/licenses/LICENSE-2.0
-// *
-// * Unless required by applicable law or agreed to in writing,
-// * software distributed under the License is distributed on an
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// * KIND, either express or implied.  See the License for the
-// * specific language governing permissions and limitations
-// * under the License.
-// */
-//
-//package org.apache.stratos.adc.mgt.dto;
-//
-//public class AppRepo {
-//
-//	private int tenantId;
-//	private String repoName;
-//	private String cartridge;
-//	private String appName;
-//	private boolean isWebRoot;
-//	private String tenantPubKey;
-//	private String tenantCartridgePubKey;
-//
-//	public int getTenantId() {
-//		return tenantId;
-//	}
-//
-//	public void setTenantId(int tenantId) {
-//		this.tenantId = tenantId;
-//	}
-//
-//	public String getRepoName() {
-//		return repoName;
-//	}
-//
-//	public void setRepoName(String repoName) {
-//		this.repoName = repoName;
-//	}
-//
-//	public String getCartridge() {
-//		return cartridge;
-//	}
-//
-//	public void setCartridge(String cartridge) {
-//		this.cartridge = cartridge;
-//	}
-//
-//	public String getAppName() {
-//		return appName;
-//	}
-//
-//	public void setAppName(String appName) {
-//		this.appName = appName;
-//	}
-//
-//	public boolean isWebRoot() {
-//		return isWebRoot;
-//	}
-//
-//	public void setWebRoot(boolean isWebRoot) {
-//		this.isWebRoot = isWebRoot;
-//	}
-//
-//	public String getTenantPubKey() {
-//		return tenantPubKey;
-//	}
-//
-//	public void setTenantPubKey(String tenantPubKey) {
-//		this.tenantPubKey = tenantPubKey;
-//	}
-//
-//	public String getTenantCartridgePubKey() {
-//		return tenantCartridgePubKey;
-//	}
-//
-//	public void setTenantCartridgePubKey(String tenantCartridgePubKey) {
-//		this.tenantCartridgePubKey = tenantCartridgePubKey;
-//	}
-//
-//}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/Cartridge.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/Cartridge.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/Cartridge.java
deleted file mode 100644
index dcd3dbe..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/Cartridge.java
+++ /dev/null
@@ -1,202 +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.adc.mgt.dto;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement
-public class Cartridge implements Comparable<Cartridge> {
-
-    private String displayName;
-    private String description;
-	private String cartridgeAlias;
-	private String cartridgeType;
-	//private int activeInstances;
-	private String status;
-	//private String ip;
-	private String password;
-	private String provider;
-	private String version;
-	private boolean multiTenant;
-	private String hostName;
-	//private String policy;
-	//private String policyDescription;
-	private String repoURL;
-	private String dbUserName;
-	private String mappedDomain;
-
-	private String[] accessURLs;
-
-	public String getDisplayName() {
-		return displayName;
-	}
-
-	public void setDisplayName(String displayName) {
-		this.displayName = displayName;
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	public String getCartridgeAlias() {
-		return cartridgeAlias;
-	}
-
-	public void setCartridgeAlias(String cartridgeAlias) {
-		this.cartridgeAlias = cartridgeAlias;
-	}
-
-	public String getCartridgeType() {
-		return cartridgeType;
-	}
-
-	public void setCartridgeType(String cartridgeType) {
-		this.cartridgeType = cartridgeType;
-	}
-
-	/*public int getActiveInstances() {
-		return activeInstances;
-	}
-
-	public void setActiveInstances(int activeInstances) {
-		this.activeInstances = activeInstances;
-	}*/
-
-	public String getStatus() {
-		return status;
-	}
-
-	public void setStatus(String status) {
-		this.status = status;
-	}
-
-	/*public String getIp() {
-		return ip;
-	}
-
-	public void setIp(String ip) {
-		this.ip = ip;
-	}*/
-
-	public String getPassword() {
-		return password;
-	}
-
-	public void setPassword(String password) {
-		this.password = password;
-	}
-
-	public String getProvider() {
-    	return provider;
-    }
-
-	public void setProvider(String provider) {
-    	this.provider = provider;
-    }
-
-	public String getVersion() {
-    	return version;
-    }
-
-	public void setVersion(String version) {
-    	this.version = version;
-    }
-
-	public boolean isMultiTenant() {
-		return multiTenant;
-	}
-
-	public void setMultiTenant(boolean multiTenant) {
-		this.multiTenant = multiTenant;
-	}
-
-	public String getHostName() {
-    	return hostName;
-    }
-
-	public void setHostName(String hostName) {
-    	this.hostName = hostName;
-    }
-
-	/*public String getPolicy() {
-		return policy;
-	}
-
-	public void setPolicy(String policy) {
-		this.policy = policy;
-	}
-
-	public String getPolicyDescription() {
-		return policyDescription;
-	}
-
-	public void setPolicyDescription(String policyDescription) {
-		this.policyDescription = policyDescription;
-	}*/
-
-	public String getRepoURL() {
-    	return repoURL;
-    }
-
-	public void setRepoURL(String repoURL) {
-    	this.repoURL = repoURL;
-    }
-
-	public String getDbUserName() {
-    	return dbUserName;
-    }
-
-	public String[] getAccessURLs() {
-		return accessURLs;
-	}
-
-	public void setAccessURLs(String[] accessURLs) {
-		this.accessURLs = accessURLs;
-	}
-
-	public void setDbUserName(String dbUserName) {
-    	this.dbUserName = dbUserName;
-    }
-
-	public String getMappedDomain() {
-		return mappedDomain;
-	}
-
-	public void setMappedDomain(String mappedDomain) {
-		this.mappedDomain = mappedDomain;
-	}
-
-	@Override
-	public int compareTo(Cartridge o) {
-		int compare = 0;
-		if (cartridgeAlias != null && o.cartridgeAlias != null) {
-			compare = cartridgeAlias.compareTo(o.cartridgeAlias);
-		}
-		if (compare == 0 && cartridgeType != null && o.cartridgeType != null) {
-			compare = cartridgeType.compareTo(o.cartridgeType);
-		}
-		return compare;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeDetail.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeDetail.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeDetail.java
deleted file mode 100644
index de108a2..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeDetail.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.apache.stratos.adc.mgt.dto;
-/*
- *
- * 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeInformation.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeInformation.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeInformation.java
deleted file mode 100644
index de108a2..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeInformation.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.apache.stratos.adc.mgt.dto;
-/*
- *
- * 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.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeWrapper.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeWrapper.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeWrapper.java
deleted file mode 100644
index f4a101b..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/CartridgeWrapper.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*                                                                             
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.adc.mgt.dto;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.wso2.carbon.utils.Pageable;
-
-/**
- * This class holds paginated information about cartridges
- */
-public final class CartridgeWrapper implements Pageable {
-
-	private Cartridge[] cartridges;
-	private int numberOfPages;
-
-	public CartridgeWrapper() {
-	}
-
-	public int getNumberOfPages() {
-		return numberOfPages;
-	}
-
-	public void setNumberOfPages(int numberOfPages) {
-		this.numberOfPages = numberOfPages;
-	}
-
-	public <T> void set(List<T> items) {
-		this.cartridges = items.toArray(new Cartridge[items.size()]);
-	}
-
-	public Cartridge[] getCartridges() {
-		return cartridges != null ? Arrays.copyOf(cartridges, cartridges.length) : null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/Policy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/Policy.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/Policy.java
deleted file mode 100644
index 7ae8371..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/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.adc.mgt.dto;
-
-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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/PolicyDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/PolicyDefinition.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/PolicyDefinition.java
deleted file mode 100644
index 28319603..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/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.adc.mgt.dto;
-
-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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/RepositoryInformation.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/RepositoryInformation.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/RepositoryInformation.java
deleted file mode 100644
index dcd5d6e..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/RepositoryInformation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.adc.mgt.dto;
-
-import java.io.Serializable;
-
-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) {
-		this.refName = refName;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/SubscriptionInfo.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/SubscriptionInfo.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/SubscriptionInfo.java
deleted file mode 100644
index f920448..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/dto/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.adc.mgt.dto;
-
-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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/ADCException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/ADCException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/ADCException.java
deleted file mode 100644
index d019332..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/ADCException.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.adc.mgt.exception;
-
-public class ADCException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private String message;
-
-	public ADCException() {
-		super();
-	}
-
-	public ADCException(String message, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-	}
-
-	public ADCException(String message) {
-		super(message);
-		this.message = message;
-	}
-
-	public ADCException(Throwable cause) {
-		super(cause);
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/AlreadySubscribedException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/AlreadySubscribedException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/AlreadySubscribedException.java
deleted file mode 100644
index 1df4609..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/AlreadySubscribedException.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.adc.mgt.exception;
-
-public class AlreadySubscribedException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private final String message;
-
-	private final String cartridgeType;
-
-	public AlreadySubscribedException(String message, String cartridgeType, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-		this.cartridgeType = cartridgeType;
-	}
-
-	public AlreadySubscribedException(String message, String cartridgeType) {
-		super(message);
-		this.message = message;
-		this.cartridgeType = cartridgeType;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-	public String getCartridgeType() {
-		return cartridgeType;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/DomainMappingExistsException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/DomainMappingExistsException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/DomainMappingExistsException.java
deleted file mode 100644
index ee26b0c..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/DomainMappingExistsException.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.adc.mgt.exception;
-
-public class DomainMappingExistsException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private final String message;
-
-	private final String domain;
-
-	public DomainMappingExistsException(String message, String domain, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-		this.domain = domain;
-	}
-
-	public DomainMappingExistsException(String message, String domain) {
-		super(message);
-		this.message = message;
-		this.domain = domain;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-
-	public String getDomain() {
-		return domain;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/DuplicateCartridgeAliasException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/DuplicateCartridgeAliasException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/DuplicateCartridgeAliasException.java
deleted file mode 100644
index 7dcc67c..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/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.adc.mgt.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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/InvalidCartridgeAliasException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/InvalidCartridgeAliasException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/InvalidCartridgeAliasException.java
deleted file mode 100644
index deec790..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/InvalidCartridgeAliasException.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.adc.mgt.exception;
-
-public class InvalidCartridgeAliasException extends Exception {
-
-	private static final long serialVersionUID = 1L;
-
-	private final String message;
-
-	private final String cartridgeType;
-
-	private final String cartridgeAlias;
-
-    private int tenantId;
-
-	public InvalidCartridgeAliasException(String message, String cartridgeType, String cartridgeAlias, Throwable cause) {
-		super(message, cause);
-		this.message = message;
-		this.cartridgeType = cartridgeType;
-		this.cartridgeAlias = cartridgeAlias;
-	}
-
-	public InvalidCartridgeAliasException(String message, String cartridgeType, String cartridgeAlias) {
-		super(message);
-		this.message = message;
-		this.cartridgeType = cartridgeType;
-		this.cartridgeAlias = cartridgeAlias;
-	}
-
-    public InvalidCartridgeAliasException(String message, int tenantId, String cartridgeType, String cartridgeAlias) {
-        super(message);
-        this.message = message;
-        this.tenantId = tenantId;
-        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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/InvalidRepositoryException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/InvalidRepositoryException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/InvalidRepositoryException.java
deleted file mode 100644
index cefe9ce..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/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.adc.mgt.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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/NotSubscribedException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/NotSubscribedException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/NotSubscribedException.java
deleted file mode 100644
index 9a28d55..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/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.adc.mgt.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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/PersistenceManagerException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/PersistenceManagerException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/PersistenceManagerException.java
deleted file mode 100644
index ccf2f9c..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/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.adc.mgt.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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/PolicyException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/PolicyException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/PolicyException.java
deleted file mode 100644
index 48ed6c5..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/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.adc.mgt.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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/RepositoryCredentialsRequiredException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/RepositoryCredentialsRequiredException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/RepositoryCredentialsRequiredException.java
deleted file mode 100644
index f5f5879..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/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.adc.mgt.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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/RepositoryRequiredException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/RepositoryRequiredException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/RepositoryRequiredException.java
deleted file mode 100644
index 3bf720b..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/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.adc.mgt.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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/RepositoryTransportException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/RepositoryTransportException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/RepositoryTransportException.java
deleted file mode 100644
index 5d5f63c..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/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.adc.mgt.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/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/UnregisteredCartridgeException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/UnregisteredCartridgeException.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/UnregisteredCartridgeException.java
deleted file mode 100644
index 905a3b6..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/exception/UnregisteredCartridgeException.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.adc.mgt.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 String getMessage() {
-		return message;
-	}
-
-	public String getCartridgeType() {
-		return cartridgeType;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9f74f29c/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/internal/ADCManagementServerComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/internal/ADCManagementServerComponent.java b/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/internal/ADCManagementServerComponent.java
deleted file mode 100644
index 14545b6..0000000
--- a/components/org.apache.stratos.adc.mgt/src/main/java/org/apache/stratos/adc/mgt/internal/ADCManagementServerComponent.java
+++ /dev/null
@@ -1,188 +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.adc.mgt.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.adc.mgt.listener.InstanceStatusListener;
-import org.apache.stratos.adc.mgt.publisher.TenantEventPublisher;
-import org.apache.stratos.adc.mgt.publisher.TenantSynchronizerTaskScheduler;
-import org.apache.stratos.adc.mgt.retriever.DataInsertionAndRetrievalManager;
-import org.apache.stratos.adc.mgt.topology.receiver.StratosManagerTopologyReceiver;
-import org.apache.stratos.adc.mgt.utils.CartridgeConfigFileReader;
-import org.apache.stratos.adc.mgt.utils.StratosDBUtils;
-import org.apache.stratos.adc.topology.mgt.service.TopologyManagementService;
-import org.apache.stratos.messaging.broker.publish.EventPublisher;
-import org.apache.stratos.messaging.broker.subscribe.TopicSubscriber;
-import org.apache.stratos.messaging.util.Constants;
-import org.osgi.service.component.ComponentContext;
-import org.wso2.carbon.ntask.core.service.TaskService;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.wso2.carbon.user.core.service.RealmService;
-import org.wso2.carbon.utils.ConfigurationContextService;
-
-/**
- * @scr.component name="org.wso2.carbon.hosting.mgt.internal.ADCManagementServerComponent"
- *                immediate="true"
- * @scr.reference name="config.context.service"
- *                interface="org.wso2.carbon.utils.ConfigurationContextService"
- *                cardinality="1..1" policy="dynamic"
- *                bind="setConfigurationContextService"
- *                unbind="unsetConfigurationContextService"
- * @scr.reference name="user.realmservice.default"
- *                interface="org.wso2.carbon.user.core.service.RealmService"
- *                cardinality="1..1" policy="dynamic" bind="setRealmService"
- *                unbind="unsetRealmService"
- * @scr.reference name="registry.service"
- *                interface=
- *                "org.wso2.carbon.registry.core.service.RegistryService"
- *                cardinality="1..1" policy="dynamic" bind="setRegistryService"
- *                unbind="unsetRegistryService"
- * @scr.reference name="topology.mgt.service"
- *                interface=
- *                "org.apache.stratos.adc.topology.mgt.service.TopologyManagementService"
- *                cardinality="1..1" policy="dynamic"
- *                bind="setTopologyManagementService"
- *                unbind="unsetTopologyManagementService"
- * @scr.reference name="ntask.component" interface="org.wso2.carbon.ntask.core.service.TaskService"
- *                cardinality="1..1" policy="dynamic" bind="setTaskService"
- *                unbind="unsetTaskService"
- */
-
-public class ADCManagementServerComponent {
-
-    private static final Log log = LogFactory.getLog(ADCManagementServerComponent.class);
-    private StratosManagerTopologyReceiver stratosManagerTopologyReceiver;
-
-    protected void activate(ComponentContext componentContext) throws Exception {
-		try {
-			CartridgeConfigFileReader.readProperties();
-			StratosDBUtils.initialize();
-			DataHolder.setEventPublisher(new EventPublisher(Constants.INSTANCE_NOTIFIER_TOPIC));
-
-            // Schedule complete tenant event synchronizer
-            if(log.isDebugEnabled()) {
-                log.debug("Scheduling tenant synchronizer task...");
-            }
-            TenantSynchronizerTaskScheduler.schedule(ServiceReferenceHolder.getInstance().getTaskService());
-
-            // Register tenant event publisher
-            if(log.isDebugEnabled()) {
-                log.debug("Starting tenant event publisher...");
-            }
-            TenantEventPublisher tenantEventPublisher = new TenantEventPublisher();
-            componentContext.getBundleContext().registerService(
-                    org.apache.stratos.common.listeners.TenantMgtListener.class.getName(),
-                    tenantEventPublisher, null);
-
-            // Start instance status topic subscriber
-            if(log.isDebugEnabled()) {
-                log.debug("Starting instance status topic subscriber...");
-            }
-            TopicSubscriber subscriber = new TopicSubscriber(Constants.INSTANCE_STATUS_TOPIC);
-            subscriber.setMessageListener(new InstanceStatusListener());
-            Thread tsubscriber = new Thread(subscriber);
-			tsubscriber.start();
-
-            //initializing the topology event subscriber
-            /*TopicSubscriber topologyTopicSubscriber = new TopicSubscriber(Constants.TOPOLOGY_TOPIC);
-            topologyTopicSubscriber.setMessageListener(new TopologyEventListner());
-            Thread topologyTopicSubscriberThread = new Thread(topologyTopicSubscriber);
-            topologyTopicSubscriberThread.start();
-
-            //Starting Topology Receiver
-            TopologyReceiver topologyReceiver = new TopologyReceiver();
-            Thread topologyReceiverThread = new Thread(topologyReceiver);
-            topologyReceiverThread.start();*/
-
-            stratosManagerTopologyReceiver = new StratosManagerTopologyReceiver();
-            Thread topologyReceiverThread = new Thread(stratosManagerTopologyReceiver);
-            topologyReceiverThread.start();
-            log.info("Topology receiver thread started");
-
-            // retrieve persisted CartridgeSubscriptions
-            new DataInsertionAndRetrievalManager().cachePersistedSubscriptions();
-
-            //Component activated successfully
-            log.info("ADC management server component is activated");
-			
-		} catch (Exception e) {
-            if(log.isFatalEnabled()) {
-			    log.fatal("Could not activate ADC management server component", e);
-            }
-		}
-	}
-
-    protected void setConfigurationContextService(ConfigurationContextService contextService) {
-        DataHolder.setClientConfigContext(contextService.getClientConfigContext());
-        DataHolder.setServerConfigContext(contextService.getServerConfigContext());
-
-    }
-
-    protected void unsetConfigurationContextService(ConfigurationContextService contextService) {
-        DataHolder.setClientConfigContext(null);
-        DataHolder.setServerConfigContext(null);
-    }
-
-    protected void setRealmService(RealmService realmService) {
-        // keeping the realm service in the DataHolder class
-        DataHolder.setRealmService(realmService);
-    }
-
-    protected void unsetRealmService(RealmService realmService) {
-    }
-
-    protected void setRegistryService(RegistryService registryService) {
-        try {
-            DataHolder.setRegistryService(registryService);
-        } catch (Exception e) {
-            log.error("Cannot retrieve governance registry", e);
-        }
-    }
-
-    protected void unsetRegistryService(RegistryService registryService) {
-    }
-
-    protected void setTopologyManagementService(TopologyManagementService topologyMgtService) {
-        DataHolder.setTopologyMgtService(topologyMgtService);
-    }
-
-    protected void unsetTopologyManagementService(TopologyManagementService topologyMgtService) {
-    }
-
-    protected void setTaskService(TaskService taskService) {
-        if (log.isDebugEnabled()) {
-            log.debug("Setting the task service");
-        }
-        ServiceReferenceHolder.getInstance().setTaskService(taskService);
-    }
-
-    protected void unsetTaskService(TaskService taskService) {
-        if (log.isDebugEnabled()) {
-            log.debug("Un-setting the task service");
-        }
-        ServiceReferenceHolder.getInstance().setTaskService(null);
-    }
-
-    protected void deactivate(ComponentContext context) {
-
-        //terminate Stratos Manager Topology Receiver
-        stratosManagerTopologyReceiver.terminate();
-    }
-}