Repository: stratos
Updated Branches:
  refs/heads/master a03ff6dbe -> bfc6d7586


http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/js/validate_domain.js
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/js/validate_domain.js
 
b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/js/validate_domain.js
deleted file mode 100644
index 6d95e54..0000000
--- 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/js/validate_domain.js
+++ /dev/null
@@ -1,172 +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.
- *
-*/
-
-function validateWithText(domain, status) {
-       sessionAwareStatusAwareFunction(function() {
-    if(domain == "") {
-        
CARBON.showWarningDialog(org_wso2_carbon_validate_domain_ui_jsi18n["domain.empty"]);
-        return false;
-    }
-
-    var reason = checkDomain(domain);
-    if (reason != "") {
-        CARBON.showWarningDialog(reason);
-        return false;
-    }
-
-    var continueDiv = document.getElementById("with-text-continue");
-    var msgDiv = document.getElementById("with-text-msg");
-    var keyInput = document.getElementById("with-text-success-key");
-
-    var busyTextPlaceHolder = document.getElementById("busyText");
-    busyTextPlaceHolder.innerHTML = "<img src=\"images/ajax-loader.gif\"/>";
-
-    new Ajax.Request('../validate-domain/validate_with_text_ajaxprocessor.jsp',
-    {
-        method:'post',
-        parameters: {domain: domain, status: status},
-
-        onSuccess: function(transport) {
-            busyTextPlaceHolder.innerHTML = "";
-            var returnValue = transport.responseText;
-            if (returnValue.search(/----false----/) >= 0) {
-                msgDiv.style.color = "#f00";
-                msgDiv.innerHTML = "<img src='images/wrong.gif'/> " + 
org_wso2_carbon_validate_domain_ui_jsi18n["validation.fail.with.text"];
-                continueDiv.style.visibility = "hidden";
-            } else if (returnValue.search(/----unavailable----/) >= 0) {
-                msgDiv.style.color = "#f00";
-                msgDiv.innerHTML = "<img src='images/wrong.gif'/> " + 
org_wso2_carbon_validate_domain_ui_jsi18n["domain.unavailable"];
-                continueDiv.style.visibility = "hidden";
-            } else if (returnValue != "") {
-                msgDiv.style.color = "#058000";
-                msgDiv.innerHTML = "<img src='images/right.gif'/> " + 
org_wso2_carbon_validate_domain_ui_jsi18n["validation.success.with.text"];
-                continueDiv.style.visibility = "visible";
-                keyInput.value = returnValue;
-            }
-        },
-
-        onFailure: function(transport){
-            busyTextPlaceHolder.innerHTML = "";
-        }
-    });
-       }, status, 
org_wso2_carbon_validate_domain_ui_jsi18n["session.timed.out"]);
-}
-
-function validateWithDNS(domain, status) {
-       sessionAwareStatusAwareFunction(function() {
-    if(domain == "") {
-        
CARBON.showWarningDialog(org_wso2_carbon_validate_domain_ui_jsi18n["domain.empty"]);
-        return false;
-    }
-
-    var reason = checkDomain(domain);
-    if (reason != "") {
-        CARBON.showWarningDialog(reason);
-        return false;
-    }
-
-    var continueDiv = document.getElementById("with-dns-continue");
-    var msgDiv = document.getElementById("with-dns-msg");
-    var keyInput = document.getElementById("with-dns-success-key");
-
-    var busyDNSPlaceHolder = document.getElementById("busyDNS");
-    busyDNSPlaceHolder.innerHTML = "<img src=\"images/ajax-loader.gif\"/>";
-
-    new Ajax.Request('../validate-domain/validate_with_dns_ajaxprocessor.jsp',
-    {
-        method:'post',
-        parameters: {domain: domain, status: status},
-
-        onSuccess: function(transport) {
-            busyDNSPlaceHolder.innerHTML = "";
-            var returnValue = transport.responseText;
-            if (returnValue.search(/----false----/) >= 0) {
-                msgDiv.style.color = "#f00";
-                msgDiv.innerHTML = "<img src='images/wrong.gif'/> " + 
org_wso2_carbon_validate_domain_ui_jsi18n["validation.fail.with.dns"];
-                continueDiv.style.visibility = "hidden";
-            } else if (returnValue.search(/----unavailable----/) >= 0) {
-                msgDiv.style.color = "#f00";
-                msgDiv.innerHTML = "<img src='images/wrong.gif'/> " + 
org_wso2_carbon_validate_domain_ui_jsi18n["domain.unavailable"];
-                continueDiv.style.visibility = "hidden";
-            } else if (returnValue != "") {
-                msgDiv.style.color = "#058000";
-                msgDiv.innerHTML = "<img src='images/right.gif'/> " + 
org_wso2_carbon_validate_domain_ui_jsi18n["validation.success.with.dns"];
-                continueDiv.style.visibility = "visible";
-                keyInput.value = returnValue;
-            }
-        },
-
-        onFailure: function(transport){
-            busyDNSPlaceHolder.innerHTML = "";
-        }
-    });
-       }, status, 
org_wso2_carbon_validate_domain_ui_jsi18n["session.timed.out"]);
-}
-
-
-function gotoRegister() {
-    window.location.href = '../tenant-register/success_register.jsp';
-}
-
-function checkDomain(domain)
-{
-    var error = "";
-    var lastIndexOfDot = domain.lastIndexOf(".");
-    var indexOfDot = domain.indexOf(".");
-    var extension = domain.substring(lastIndexOfDot, domain.length);
-
-    var illegalChars = /([^a-zA-Z0-9\._\-])/; // allow only letters and 
numbers . - _and period
-    if (extension.indexOf("-trial") >= 0 || extension.indexOf("-unverified") 
>= 0) {
-        // we are not allowing to create a domain with -trial or -unverified 
is in the extension
-        error = "The domain name you entered is not valid. Please enter a 
valid domain name.";
-    }
-    else if (lastIndexOfDot <= 0) {
-        // since this is domain validation, this expects a valid domain with 
an extension.
-        error = "Invalid domain: " + domain + ". You should have an extension 
to your domain.";
-    }
-    else if (indexOfDot == 0) {
-        error = "Invalid domain, starting with '.'";
-    }
-    else if (illegalChars.test(domain)) {
-        error = "The domain only allows letters, numbers, '.', '-' and '_'. 
<br />";
-    }
-    return error;
-}
-
-function sessionAwareStatusAwareFunction(func, status, msg) {
-       if (status == "logged_in") {
-               sessionAwareFunction(func, msg);
-       } else {
-               func();
-       }
-}
-
-function submitValidateWithDNSForm(status) {
-       sessionAwareStatusAwareFunction(function() {
-               $('validateWithDNSForm').submit();
-       }, status, 
org_wso2_carbon_validate_domain_ui_jsi18n["session.timed.out"]);
-}
-
-function submitValidateWithTextForm(status) {
-       sessionAwareStatusAwareFunction(function() {
-               $('validateWithTextForm').submit();
-       }, status, 
org_wso2_carbon_validate_domain_ui_jsi18n["session.timed.out"]);
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/submit_validate_domain_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/submit_validate_domain_ajaxprocessor.jsp
 
b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/submit_validate_domain_ajaxprocessor.jsp
deleted file mode 100644
index 85d5b83..0000000
--- 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/submit_validate_domain_ajaxprocessor.jsp
+++ /dev/null
@@ -1,37 +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.
-  --%>
-<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantConstants" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%
-String successKey = request.getParameter("successKey");
-String domain = request.getParameter("domain");
-String status = request.getParameter("status");
-session.setAttribute("validate-domain-success-key", successKey);
-session.setAttribute("temp-domain-to-register", domain);
-
-// redirect to the add registry domain page
-if ("logged_in".equals(status)) {
-    // we have already logged in so redirect to the account management page
-    
response.sendRedirect("../account-mgt/validation_success_ajaxprocessor.jsp");
-}
-else {
-    // if not logged in we will redirect to the register org page
-    response.sendRedirect("../tenant-register/success_register.jsp");
-}
-%>

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_logged_in.jsp
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_logged_in.jsp
 
b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_logged_in.jsp
deleted file mode 100644
index a9f2d41..0000000
--- 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_logged_in.jsp
+++ /dev/null
@@ -1,23 +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.
-  --%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<jsp:include page="validate_domain_template.jsp">
-    <jsp:param name="status" 
-     value="logged_in" />
-</jsp:include>

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_not_logged_in.jsp
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_not_logged_in.jsp
 
b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_not_logged_in.jsp
deleted file mode 100644
index 55ef267..0000000
--- 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_not_logged_in.jsp
+++ /dev/null
@@ -1,23 +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.
-  --%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<jsp:include page="validate_domain_template.jsp">
-    <jsp:param name="status" 
-     value="not_logged_in" />
-</jsp:include>

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_template.jsp
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_template.jsp
 
b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_template.jsp
deleted file mode 100644
index e6d6c03..0000000
--- 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_template.jsp
+++ /dev/null
@@ -1,203 +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.
-  --%>
-<%@ page 
import="org.wso2.carbon.validate.domain.ui.clients.ValidateDomainClient"%>
-<%@ page import="org.wso2.carbon.validate.domain.ui.utils.Util"%>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil"%>
-<%@ page import="org.wso2.carbon.utils.multitenancy.MultitenantConstants"%>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
-<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar";
-       prefix="carbon"%>
-<link rel="stylesheet" type="text/css" href="../yui/assets/yui.css">
-<link rel="stylesheet" type="text/css"
-       href="../yui/build/menu/assets/skins/sam/menu.css" />
-<link rel="stylesheet" type="text/css"
-       href="../yui/build/button/assets/skins/sam/button.css" />
-<link rel="stylesheet" type="text/css"
-       href="../yui/build/container/assets/skins/sam/container.css" />
-<link rel="stylesheet" type="text/css"
-       href="../yui/build/autocomplete/assets/skins/sam/autocomplete.css" />
-<link rel="stylesheet" type="text/css"
-       href="../yui/build/editor/assets/skins/sam/editor.css" />
-<link rel="stylesheet" type="text/css"
-       href="../validate-domain/css/validate_domain.css" />
-<jsp:include
-       page="../registry_common/registry_common-i18n-ajaxprocessor.jsp" />
-<script type="text/javascript"
-       src="../registry_common/js/registry_validation.js"></script>
-<script type="text/javascript"
-       src="../registry_common/js/registry_common.js"></script>
-<script type="text/javascript" src="../ajax/js/prototype.js"></script>
-<carbon:jsi18n
-        resourceBundle="org.apache.stratos.validate.domain.ui.i18n.JSResources"
-        request="<%=request%>" namespace="org.wso2.carbon.validate.domain.ui"/>
-
-<script type="text/javascript" 
src="../validate-domain/js/validate_domain.js"></script>
-
-<fmt:bundle
-       basename="org.apache.stratos.validate.domain.ui.i18n.Resources">
-       <%
-           String domain = request.getParameter("domain");
-               String status = request.getParameter("status");
-               // get the validation key
-               ValidateDomainClient client =
-                       Util.getValidateDomainClient(request, config, session);
-               String domainValidationKey = 
client.getDomainValidationKey(domain);
-               if ("unavailable".equals(domainValidationKey)) {
-           %>
-               <script type="text/javascript">
-                   jQuery(document).ready(function() {
-                       CARBON.showErrorDialog('The domain you are trying to 
validate ' +
-                               'is already taken. Please retry with another 
domain.');
-                   });
-               </script>
-
-           <%
-               }
-               //String serverUrl = 
CarbonUIUtil.getServerURL(config.getServletContext(), session);
-               String adminConsoleURL = CarbonUIUtil.getAdminConsoleURL("/");
-               String serverUrl = adminConsoleURL.replace("carbon","services");
-               // remove the services directory.
-               String serverRoot =
-                       serverUrl.substring(0, serverUrl.length() - 
"/services/".length());
-               // we have to remove the port as well.
-               if (serverRoot == null) {
-                   serverRoot = "stratoslive.wso2.com";
-               }
-               // server root without https
-               serverRoot = serverRoot.substring(8);
-               int semiCol = serverRoot.indexOf(':');
-               if (semiCol >= 0) {
-                   // need to remove the port
-                   serverRoot = serverRoot.substring(0, semiCol);
-               }
-
-               // we have additional statement
-               String statementToIgnoreValidate = "";
-               if (session.getAttribute(MultitenantConstants.TENANT_DOMAIN) == 
null) {
-                   statementToIgnoreValidate =
-                           "or <input type='button' onclick='gotoRegister()' 
value='Skip the validation step'/>";
-               }
-       %>
-       <div id="middle">
-
-    <carbon:breadcrumb label="validate"
-        resourceBundle="org.apache.stratos.validate.domain.ui.i18n.Resources"
-        topPage="false" request="<%=request%>" />
-    
-       <div id="workArea">
-       <h2><fmt:message key="domain.ownership.validation" /></h2>
-
-       <div id="validation-introduction">
-       <p>You can validate your domain using the following method 
<%=statementToIgnoreValidate%></p>
-       <ul>
-               <li class="catagory">Creating a text file in the domain web
-               ROOT</li>
-<!--           <li class="catagory">2. Setting up a CNAME entry in your 
DNS</li> -->
-       </ul>
-       </div>
-
-       <div id="with-text">
-
-       <table class="styledLeft">
-               <thead>
-                       <tr>
-                               <th>Validate domain using a text file</th>
-                       </tr>
-               </thead>
-               <tbody>
-                       <tr>
-                               <td>
-                               <p>Add a text file inside the web root of your 
domain with the following configuration:</p>
-                               <div class="conf-info">
-                               <%
-                                   // the filename is hard coded now, a change 
in this need to be reflected at validateDomainService.jsp
-                               %>
-                               <p>Filename: 
<strong>wso2multitenancy.txt</strong></p>
-                               <p>Text content: 
<strong><%=domainValidationKey%></strong></p>
-                               </div>
-                               <p class="validate-button"><em> Click the 
'Validate'
-                               button, after you complete the above step </em> 
<input type="button"
-                                       value="Validate" 
onclick="validateWithText('<%=domain%>', '<%=status%>')" /> <span
-                                       id="busyText"></span></p>
-                               <p>
-                               <div id="with-text-msg"></div>
-                               </p>
-                               <p>
-                               <div id="with-text-continue" style="visibility: 
hidden">
-                               <form id="validateWithTextForm"
-                                       onsubmit="return 
submitValidateWithTextForm('<%=status%>');" 
-                                       
action="submit_validate_domain_ajaxprocessor.jsp" method="post">
-                               <input type="hidden" id="with-text-success-key" 
name="successKey"
-                                       value="" /> <input type="hidden" 
name="domain" value="<%=domain%>" />
-                               <input type="hidden" id="with-text-status" 
name="status" value="<%=status%>"/>
-                               <input type="submit" value="Continue" /></form>
-                               </div>
-                               </p>
-                               </td>
-                       </tr>
-               </tbody>
-       </table>
-       </div>
-
-
-<!--   <div id="with-dns"> -->
-
-<!--   <table class="styledLeft"> -->
-<!--           <thead> -->
-<!--                   <tr> -->
-<!--                           <th>Validate domain using a CName entry</th> -->
-<!--                   </tr> -->
-<!--           </thead> -->
-<!--           <tbody> -->
-<!--                   <tr> -->
-<!--                           <td> -->
-<!--                           <p>Put a CNAME entry in your DNS with following 
configuration: -->
-<!--                           (Note that if you refresh this page, the 
parameters will be changed) -->
-<!--                           </p> -->
-<!--                           <div class="conf-info"> -->
-<%--                           <p>Name: 
<strong><%=domainValidationKey%>.<%=domain%></strong></p> --%>
-<!--                           <p>Type: <strong>CNAME</strong></p> -->
-<%--                           <p>Value: <strong><%=serverRoot%></strong></p> 
--%>
-<!--                           </div> -->
-<!--                           <p class="validate-button"><em> Click the 
'Validate' -->
-<!--                           button, after you finish setting the CNAME 
entry </em> <input -->
-<!--                                   type="button" value="Validate" -->
-<%--                                   onclick="validateWithDNS('<%=domain%>', 
'<%=status%>')" /> <span id="busyDNS"></span> --%>
-<!--                           </p> -->
-<!--                           <p> -->
-<!--                           <div id="with-dns-msg"></div> -->
-<!--                           </p> -->
-<!--                           <p> -->
-<!--                           <div id="with-dns-continue" style="visibility: 
hidden"> -->
-<!--                           <form id="validateWithDNSForm" -->
-<!--                                   
action="submit_validate_domain_ajaxprocessor.jsp" -->
-<%--                                   onsubmit="return 
submitValidateWithDNSForm('<%=status%>');" method="post"> --%>
-<!--                           <input type="hidden" id="with-dns-success-key" 
name="successKey" -->
-<%--                                   value="" /> <input type="hidden" 
name="domain" value="<%=domain%>" /> --%>
-<%--                           <input type="hidden" id="with-dns-status" 
name="status" value="<%=status%>"/> --%>
-<!--                           <input type="submit" value="Continue" /></form> 
-->
-<!--                           </div> -->
-<!--                           </p> -->
-<!--                           </td> -->
-<!--                   </tr> -->
-<!--           </tbody> -->
-<!--   </table> -->
-<!--   </div> -->
-       </div>
-</fmt:bundle>

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_with_dns_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_with_dns_ajaxprocessor.jsp
 
b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_with_dns_ajaxprocessor.jsp
deleted file mode 100644
index b7d3f42..0000000
--- 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_with_dns_ajaxprocessor.jsp
+++ /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.
---%>
-<%@ page 
import="org.wso2.carbon.validate.domain.ui.clients.ValidateDomainClient" %>
-<%@ page import="org.wso2.carbon.validate.domain.ui.utils.Util" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%
-    String domain = request.getParameter("domain");
-    String validationSuccessKey;
-
-    try {
-        ValidateDomainClient client = Util.getValidateDomainClient(request, 
config, session);
-        validationSuccessKey = client.validateByDNSEntry(domain);
-    } catch (Exception e) {
-        validationSuccessKey = null;
-    }
-
-    if (validationSuccessKey == null || validationSuccessKey.equals("") ||
-            validationSuccessKey.equals("false") || 
validationSuccessKey.equals("null")) {
-        validationSuccessKey = "----false----";
-    }
-    else if (validationSuccessKey.equals("unavailable")) {
-        validationSuccessKey = "----unavailable----";
-    }
-%><%=validationSuccessKey%>

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_with_text_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_with_text_ajaxprocessor.jsp
 
b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_with_text_ajaxprocessor.jsp
deleted file mode 100644
index 249f5a0..0000000
--- 
a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_with_text_ajaxprocessor.jsp
+++ /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.
---%>
-<%@ page 
import="org.wso2.carbon.validate.domain.ui.clients.ValidateDomainClient" %>
-<%@ page import="org.wso2.carbon.validate.domain.ui.utils.Util" %>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%
-    String domain = request.getParameter("domain");
-    String validationSuccessKey;
-
-    try {
-        ValidateDomainClient client = Util.getValidateDomainClient(request, 
config, session);
-        validationSuccessKey = client.validateByTextInRoot(domain);
-    } catch (Exception e) {
-        validationSuccessKey = null;
-    }
-
-    if (validationSuccessKey == null || validationSuccessKey.equals("") ||
-            validationSuccessKey.equals("false") || 
validationSuccessKey.equals("null")) {
-        validationSuccessKey = "----false----";
-    }
-    else if (validationSuccessKey.equals("unavailable")) {
-        validationSuccessKey = "----unavailable----";
-    }
-%><%=validationSuccessKey%>

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain/pom.xml 
b/components/org.apache.stratos.validate.domain/pom.xml
deleted file mode 100644
index 945d564..0000000
--- a/components/org.apache.stratos.validate.domain/pom.xml
+++ /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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-    <parent>
-        <groupId>org.apache.stratos</groupId>
-        <artifactId>stratos-components-parent</artifactId>
-        <version>4.1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>org.apache.stratos.validate.domain</artifactId>
-    <packaging>bundle</packaging>
-    <name>Apache Stratos - Validate Domains</name>
-
-    <build>
-
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Name>${project.artifactId}</Bundle-Name>
-                        <Export-Package>
-                            org.apache.stratos.validate.domain.*,
-                        </Export-Package>
-                        <Import-Package>
-                            org.wso2.carbon.registry.core.*;version=1.0.1,
-                            !javax.xml.namespace,
-                            javax.xml.namespace; version=0.0.0,
-                            
javax.servlet;version="${imp.pkg.version.javax.servlet}",
-                            
javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
-                            org.apache.axiom.*; 
version="${axiom.osgi.version.range}",
-                            *;resolution:=optional
-                        </Import-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.wso2.carbon</groupId>
-            <artifactId>org.wso2.carbon.registry.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/internal/ValidateDomainServiceComponent.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/internal/ValidateDomainServiceComponent.java
 
b/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/internal/ValidateDomainServiceComponent.java
deleted file mode 100644
index 7d43629..0000000
--- 
a/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/internal/ValidateDomainServiceComponent.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.validate.domain.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.service.component.ComponentContext;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.apache.stratos.validate.domain.util.Util;
-import org.wso2.carbon.user.core.service.RealmService;
-import org.wso2.carbon.utils.ConfigurationContextService;
-
-/**
- * @scr.component name="org.apache.stratos.validate.domain"
- *                immediate="true"
- * @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="user.realmservice.default"
- *                interface="org.wso2.carbon.user.core.service.RealmService"
- *                cardinality="1..1" policy="dynamic" bind="setRealmService"
- *                unbind="unsetRealmService"
- * @scr.reference name="config.context.service"
- *                interface="org.wso2.carbon.utils.ConfigurationContextService"
- *                cardinality="1..1" policy="dynamic"
- *                bind="setConfigurationContextService"
- *                unbind="unsetConfigurationContextService"
- */
-public class ValidateDomainServiceComponent {
-    private static Log log = 
LogFactory.getLog(ValidateDomainServiceComponent.class);
-    private static ConfigurationContextService configContextService;
-    
-    protected void activate(ComponentContext context) {
-        log.debug("******* Governance domain validation bundle is activated 
******* ");
-    }
-
-    protected void deactivate(ComponentContext context) {
-        log.debug("******* Governance domain validation bundle is deactivated 
******* ");
-    }
-
-    protected void setRegistryService(RegistryService registryService) {
-        Util.setRegistryService(registryService);
-    }
-
-    protected void unsetRegistryService(RegistryService registryService) {
-        Util.setRegistryService(null);
-    }
-
-    protected void setRealmService(RealmService realmService) {
-        Util.setRealmService(realmService);
-    }
-
-    protected void unsetRealmService(RealmService realmService) {
-        Util.setRealmService(null);
-    }
-    
-    protected void setConfigurationContextService(ConfigurationContextService 
contextService) {
-        ValidateDomainServiceComponent.configContextService = contextService;
-    }
-
-    protected void 
unsetConfigurationContextService(ConfigurationContextService contextService) {
-        ValidateDomainServiceComponent.configContextService = null;
-    }
-
-    public static ConfigurationContextService getConfigContextService() {
-        return configContextService;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/services/ValidateDomainAdminService.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/services/ValidateDomainAdminService.java
 
b/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/services/ValidateDomainAdminService.java
deleted file mode 100644
index 2b10c24..0000000
--- 
a/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/services/ValidateDomainAdminService.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.validate.domain.services;
-
-import org.wso2.carbon.core.AbstractAdmin;
-import org.apache.stratos.validate.domain.util.Util;
-
-/**
- * The service allow users to validate domains before sign in.
- */
-public class ValidateDomainAdminService extends AbstractAdmin {
-
-    public String getDomainValidationKey(String domain) throws Exception {
-        return Util.getDomainValidationKeyWithLogin(domain);
-    }
-
-    public String validateByDNSEntry(String domain)  throws Exception {
-        return Util.validateByDNSEntry(domain);
-    }
-
-    public String validateByTextInRoot(String domain) throws Exception {
-        return Util.validateByTextInRoot(domain);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/services/ValidateDomainService.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/services/ValidateDomainService.java
 
b/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/services/ValidateDomainService.java
deleted file mode 100644
index 253a397..0000000
--- 
a/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/services/ValidateDomainService.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.validate.domain.services;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.validate.domain.util.Util;
-
-/**
- * The service allow users to validate domains before sign in.
- */
-public class ValidateDomainService {
-    private static final Log log = 
LogFactory.getLog(ValidateDomainService.class);
-
-    /**
-     * get domain validation key
-     *
-     * @param domain - tenant domain
-     * @return domain validation key
-     * @throws Exception, if getting the validation key failed.
-     */
-    public String getDomainValidationKey(String domain) throws Exception {
-        // for the non admin case, we are not issuing validation keys if the 
domain already exists.
-
-        // Now we register first, before coming to the domain validation.
-//        if (!Util.checkDomainAvailability(domain)) {
-//            String msg = "Domain " + domain + " is already taken.";
-//            log.info(msg);
-//            return "unavailable";
-//        }
-        return Util.getDomainValidationKeyWithoutLogin(domain);
-    }
-
-    /**
-     * Validate by DNS Entry
-     *
-     * @param domain - tenant domain
-     * @throws Exception, if validation failed.
-     * @return, successkey
-     */
-    public String validateByDNSEntry(String domain) throws Exception {
-//        if (!Util.checkDomainAvailability(domain)) {
-//            String msg = "Domain " + domain + " is already taken.";
-//            log.info(msg);
-//            return "unavailable";
-//        }
-        return Util.validateByDNSEntry(domain);
-    }
-
-    /**
-     * Validate by Text in root
-     *
-     * @param domain, tenant domain
-     * @throws Exception, if validation failed.
-     * @return, successkey
-     */
-    public String validateByTextInRoot(String domain) throws Exception {
-        if (!Util.checkDomainAvailability(domain)) {
-            String msg = "Domain " + domain + " is already taken.";
-            log.info(msg);
-            return "unavailable";
-        }
-        return Util.validateByTextInRoot(domain);
-    }
-}
-
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/util/Util.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/util/Util.java
 
b/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/util/Util.java
deleted file mode 100644
index 601fe9c..0000000
--- 
a/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/util/Util.java
+++ /dev/null
@@ -1,320 +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.validate.domain.util;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.registry.core.RegistryConstants;
-import org.wso2.carbon.registry.core.Resource;
-import org.wso2.carbon.registry.core.ResourceImpl;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.registry.core.service.RegistryService;
-import org.wso2.carbon.registry.core.session.UserRegistry;
-import org.wso2.carbon.registry.core.utils.RegistryUtils;
-import org.wso2.carbon.registry.core.utils.UUIDGenerator;
-import org.wso2.carbon.user.core.service.RealmService;
-import org.wso2.carbon.user.core.tenant.TenantManager;
-import org.wso2.carbon.utils.CarbonUtils;
-import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
-import 
org.apache.stratos.validate.domain.internal.ValidateDomainServiceComponent;
-import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.common.util.CommonUtil;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-
-/**
- * Util methods for domain validationn
- */
-public class Util {
-
-    private static final Log log = LogFactory.getLog(Util.class);
-
-    private static RegistryService registryService;
-    private static RealmService realmService;
-
-    public static synchronized void setRegistryService(RegistryService 
service) {
-        if (registryService == null) {
-            registryService = service;
-        }
-    }
-
-    public static RegistryService getRegistryService() {
-        return registryService;
-    }
-
-    public static synchronized void setRealmService(RealmService service) {
-        if (realmService == null) {
-            realmService = service;
-        }
-    }
-
-    public static TenantManager getTenantManager() {
-        return realmService.getTenantManager();
-    }
-
-    public static UserRegistry getGovernanceSystemRegistry(int tenantId) 
throws RegistryException {
-        return registryService.getGovernanceSystemRegistry(tenantId);
-    }
-
-    /**
-     * validate the content
-     *
-     * @param sourceURL - url of the source
-     * @param content   - String content
-     * @throws RegistryException, if validation failed.
-     * @return, true if validated.
-     */
-    public static boolean validateContent(String sourceURL, String content)
-            throws RegistryException {
-        URL url;
-        try {
-            if (sourceURL != null && 
sourceURL.toLowerCase().startsWith("file:")) {
-                String msg = "The source URL must not be file in the server's 
local file system";
-                throw new RegistryException(msg);
-            }
-            url = new URL(sourceURL);
-        } catch (MalformedURLException e) {
-            String msg = "Given source URL " + sourceURL + "is not valid.";
-            throw new RegistryException(msg, e);
-        }
-
-        try {
-            URLConnection uc = url.openConnection();
-            InputStream in = uc.getInputStream();
-            byte[] inByteArr = RegistryUtils.getByteArray(in);
-            String onlineContent = new String(inByteArr);
-            return onlineContent.startsWith(content);
-
-        } catch (IOException e) {
-
-            String msg = "Could not read from the given URL: " + sourceURL;
-            throw new RegistryException(msg, e);
-        }
-    }
-
-    /**
-     * Checks whether the domain is available to register.
-     *
-     * @param domainName domain name
-     * @throws RegistryException, if failed.
-     * @return, true if avaiable to register.
-     */
-    public static boolean checkDomainAvailability(String domainName) throws 
RegistryException {
-        TenantManager tenantManager = Util.getTenantManager();
-        int tenantId;
-       
-        try {
-            tenantId = tenantManager.getTenantId(domainName);
-        } catch (org.wso2.carbon.user.api.UserStoreException e) {
-            String msg = "Error in checking the domain availability.";
-            log.error(msg);
-            // we are instead send the tenant id.
-            tenantId = -1;
-        }
-        return tenantId < 0;
-    }
-
-    /**
-     * Check whether the domain name entered is valid
-     *
-     * @param domain tenant domain
-     * @return true, if valid.
-     */
-    public static boolean checkDomainValidity(String domain) {
-        // domains with '/' will be seen as possible characters, but they need 
to be avoided..
-        return !(domain.contains("/") || domain.contains("\\"));
-    }
-
-
-    /**
-     * Get Domain Validation Key without Login.
-     * If the user is generating the validation key without login, we will be 
serving them a
-     * different keys for each refreshes of the page.
-     *
-     * @param domain - tenant domain
-     * @return generated domain validation key.
-     * @throws RegistryException, if failed in generating the domain 
validation key.
-     */
-    public static String getDomainValidationKeyWithoutLogin(String domain)
-            throws RegistryException {
-        return generateDomainValidateKey(domain);
-    }
-
-    /**
-     * Get the domain validation key with login
-     * If the user is generating the validation key with login, we will be 
serving them the same key
-     *
-     * @param domain - tenant domain.
-     * @return generated domain validation key.
-     * @throws RegistryException, if failed in generating the domain 
validation key.
-     */
-    public static String getDomainValidationKeyWithLogin(String domain) throws 
RegistryException {
-        // get the super tenant system registry
-        UserRegistry governanceSystemRegistry =
-                
Util.getGovernanceSystemRegistry(MultitenantConstants.SUPER_TENANT_ID);
-        String domainValidatorInfoPath = 
StratosConstants.DOMAIN_VALIDATOR_INFO_PATH +
-                                         RegistryConstants.PATH_SEPARATOR +
-                                         domain + 
RegistryConstants.PATH_SEPARATOR +
-                                         
StratosConstants.VALIDATION_KEY_RESOURCE_NAME;
-        if (governanceSystemRegistry.resourceExists(domainValidatorInfoPath)) {
-            Resource resource = 
governanceSystemRegistry.get(domainValidatorInfoPath);
-            Object contentObj = resource.getContent();
-            if (contentObj instanceof String) {
-                return (String) contentObj;
-            } else if (contentObj instanceof byte[]) {
-                return new String((byte[]) contentObj);
-            }
-        }
-
-        // otherwise we will generate the key
-        return generateDomainValidateKey(domain);
-    }
-
-    private static String generateDomainValidateKey(String domain) throws 
RegistryException {
-        // get the super tenant system registry
-        UserRegistry governanceSystemRegistry =
-                
Util.getGovernanceSystemRegistry(MultitenantConstants.SUPER_TENANT_ID);
-        String domainValidatorInfoPath = 
StratosConstants.DOMAIN_VALIDATOR_INFO_PATH +
-                                         RegistryConstants.PATH_SEPARATOR + 
domain +
-                                         RegistryConstants.PATH_SEPARATOR +
-                                         
StratosConstants.VALIDATION_KEY_RESOURCE_NAME;
-
-        // we have to reset the domain validation key everytime 
-        String domainValidationKey = UUIDGenerator.generateUUID();
-        Resource resource = governanceSystemRegistry.newResource();
-        resource.setContent(domainValidationKey);
-        ((ResourceImpl) resource).setVersionableChange(false);
-        governanceSystemRegistry.put(domainValidatorInfoPath, resource);
-        
CommonUtil.setAnonAuthorization(RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH 
+
-                                        domainValidatorInfoPath,
-                                        
governanceSystemRegistry.getUserRealm());
-
-        return domainValidationKey;
-    }
-
-    /**
-     * validate by DNS Entry.
-     *
-     * @param domain - tenant domain
-     * @return successkey.
-     * @throws RegistryException, if validation failed.
-     */
-    public static String validateByDNSEntry(String domain) throws 
RegistryException {
-        if (!Util.checkDomainValidity(domain)) {
-            return "false";
-        }
-        // get the super tenant system registry
-        UserRegistry governanceSystemRegistry =
-                
Util.getGovernanceSystemRegistry(MultitenantConstants.SUPER_TENANT_ID);
-        String domainValidatorInfoPath = 
StratosConstants.DOMAIN_VALIDATOR_INFO_PATH +
-                                         RegistryConstants.PATH_SEPARATOR +
-                                         domain + 
RegistryConstants.PATH_SEPARATOR +
-                                         
StratosConstants.VALIDATION_KEY_RESOURCE_NAME;
-        
-        String domainValidationKey = "";
-        if (!governanceSystemRegistry.resourceExists(domainValidatorInfoPath)) 
{
-            return "false";
-        }
-        Resource resource = 
governanceSystemRegistry.get(domainValidatorInfoPath);
-        Object content = resource.getContent();
-        if (content instanceof String) {
-            domainValidationKey = (String) content;
-        } else if (content instanceof byte[]) {
-            domainValidationKey = new String((byte[]) content);
-        }
-        
-        int httpPort = 
CarbonUtils.getTransportPort(ValidateDomainServiceComponent.getConfigContextService(),
 "http");
-        int httpProxyPort =
-            
CarbonUtils.getTransportProxyPort(ValidateDomainServiceComponent.getConfigContextService().getServerConfigContext(),
-                                              "http");
-
-
-        // check whether this is running on a different port
-        int portValue = httpProxyPort != -1 ? httpProxyPort : httpPort;
-
-        // we are forming the resource http url to access the 
domainValidationKey
-        String domainValidatorInfoAbsolutePath = 
RegistryUtils.getAbsolutePath(governanceSystemRegistry.getRegistryContext(),
-                                                                
RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH +
-                                                                
domainValidatorInfoPath);
-
-        String sourceUrl = "http://"; + domainValidationKey + "." + domain + 
":"+ portValue +
-                           RegistryConstants.PATH_SEPARATOR + "registry" +
-                           RegistryConstants.PATH_SEPARATOR + "resource" + 
domainValidatorInfoAbsolutePath;
-        if (Util.validateContent(sourceUrl, domainValidationKey)) {
-            // the validation success, so we will create the success key
-            // (this is a temporary key that we keep the session
-            String successKey = UUIDGenerator.generateUUID();
-            resource.setProperty("successKey", successKey);
-            ((ResourceImpl) resource).setVersionableChange(false);
-            governanceSystemRegistry.put(domainValidatorInfoPath, resource);
-            return successKey;
-        }
-        return "false";
-    }
-
-    /**
-     * Validate by text in root
-     *
-     * @param domain - tenant domain
-     * @return successkey
-     * @throws RegistryException, if validation failed.
-     */
-    public static String validateByTextInRoot(String domain) throws 
RegistryException {
-        if (!Util.checkDomainValidity(domain)) {
-            return "false";
-        }
-
-        UserRegistry governanceSystemRegistry =
-                
Util.getGovernanceSystemRegistry(MultitenantConstants.SUPER_TENANT_ID);
-        String domainValidatorInfoPath = 
StratosConstants.DOMAIN_VALIDATOR_INFO_PATH +
-                                         RegistryConstants.PATH_SEPARATOR +
-                                         domain + 
RegistryConstants.PATH_SEPARATOR +
-                                         
StratosConstants.VALIDATION_KEY_RESOURCE_NAME;
-        String domainValidationKey = "";
-        if (!governanceSystemRegistry.resourceExists(domainValidatorInfoPath)) 
{
-            return "false";
-        }
-        Resource resource = 
governanceSystemRegistry.get(domainValidatorInfoPath);
-        Object content = resource.getContent();
-        if (content instanceof String) {
-            domainValidationKey = (String) content;
-        } else if (content instanceof byte[]) {
-            domainValidationKey = new String((byte[]) content);
-        }
-
-
-        // the filename is hard coded now, a change in this need to be 
reflected at
-        //  validate_domain.jsp
-        String sourceUrl = "http://"; + domain + "/wso2multitenancy.txt";
-        if (Util.validateContent(sourceUrl, domainValidationKey)) {
-            // the validation success, so we will create the success key
-            // this is a temporary key that we keep the session
-            String successKey = UUIDGenerator.generateUUID();
-            resource.setProperty("successKey", successKey);
-            ((ResourceImpl) resource).setVersionableChange(false);
-            governanceSystemRegistry.put(domainValidatorInfoPath, resource);
-            return successKey;
-        }
-        return "false";
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/org.apache.stratos.validate.domain/src/main/resources/META-INF/services.xml
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.validate.domain/src/main/resources/META-INF/services.xml
 
b/components/org.apache.stratos.validate.domain/src/main/resources/META-INF/services.xml
deleted file mode 100644
index a6bc24c..0000000
--- 
a/components/org.apache.stratos.validate.domain/src/main/resources/META-INF/services.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-  #  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.
-  -->
-<serviceGroup>
-
-    <service name="ValidateDomainService" scope="transportsession">
-        <transports>
-            <transport>https</transport>
-        </transports>
-        <parameter name="ServiceClass" locked="false">
-            org.apache.stratos.validate.domain.services.ValidateDomainService
-        </parameter>
-    </service>
-    <service name="ValidateDomainAdminService" scope="transportsession">
-        <transports>
-            <transport>https</transport>
-        </transports>
-        <parameter name="ServiceClass" locked="false">
-            
org.apache.stratos.validate.domain.services.ValidateDomainAdminService
-        </parameter>
-        <parameter name="adminService" locked="true">true</parameter>
-        <parameter name="AuthorizationAction" 
locked="true">/permission/admin/configure/account</parameter>
-    </service>
-    <parameter name="hiddenService" locked="true">true</parameter>
-</serviceGroup>

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/components/pom.xml
----------------------------------------------------------------------
diff --git a/components/pom.xml b/components/pom.xml
index 03a14f4..7bbe37d 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -60,14 +60,9 @@
         <module>org.apache.stratos.load.balancer.extension.api</module>
         <!-- Tenant Activity -->
         <module>org.apache.stratos.tenant.activity</module>
-        <module>org.apache.stratos.tenant.activity.ui</module>
         <!-- Account Mgt -->
-        <module>org.apache.stratos.account.mgt</module>
-        <module>org.apache.stratos.account.mgt.ui</module>
         <module>org.apache.stratos.email.sender</module>
         <!-- Domain Validation -->
-        <module>org.apache.stratos.validate.domain</module>
-        <module>org.apache.stratos.validate.domain.ui</module>
         <!-- Redirector -->
         <module>org.apache.stratos.sso.redirector.ui</module>
         <module>org.apache.stratos.keystore.mgt</module>

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/features/manager/tenant-activity/org.apache.stratos.tenant.activity.ui.feature/pom.xml
----------------------------------------------------------------------
diff --git 
a/features/manager/tenant-activity/org.apache.stratos.tenant.activity.ui.feature/pom.xml
 
b/features/manager/tenant-activity/org.apache.stratos.tenant.activity.ui.feature/pom.xml
deleted file mode 100644
index c4271ab..0000000
--- 
a/features/manager/tenant-activity/org.apache.stratos.tenant.activity.ui.feature/pom.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 
-  #  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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-
-    <parent>
-        <groupId>org.apache.stratos</groupId>
-        <artifactId>tenant-activity-feature</artifactId>
-        <version>4.1.0-SNAPSHOT</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>org.apache.stratos.tenant.activity.ui.feature</artifactId>
-    <packaging>pom</packaging>
-    <name>Apache Stratos - Tenant Activity UI Feature</name>
-    <url>http://apache.org</url>
-    <description>This feature contains the bundles required for Tenant 
Activity front-end functionality
-    </description>
-
-    <dependencies>
-       <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.tenant.activity.stub</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-       <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.tenant.activity.ui</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-       <dependency>
-            <groupId>org.apache.stratos</groupId>
-            <artifactId>org.apache.stratos.tenant.activity</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            
-            <plugin>
-                <groupId>org.wso2.maven</groupId>
-                <artifactId>carbon-p2-plugin</artifactId>
-                <version>${carbon.p2.plugin.version}</version>
-                <executions>
-                    <execution>
-                        <id>4-p2-feature-generation</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>p2-feature-gen</goal>
-                        </goals>
-                        <configuration>
-                            <id>org.apache.stratos.tenant.activity.ui</id>
-                            
<propertiesFile>../../../etc/feature.properties</propertiesFile>
-                            <adviceFile>
-                                <properties>
-                                    
<propertyDef>org.wso2.carbon.p2.category.type:console
-                                    </propertyDef>
-                                    
<propertyDef>org.eclipse.equinox.p2.type.group:false
-                                    </propertyDef>
-                                </properties>
-                            </adviceFile>
-                            <bundles>
-                                
<bundleDef>org.apache.stratos:org.apache.stratos.tenant.activity.stub</bundleDef>
-                               
<bundleDef>org.apache.stratos:org.apache.stratos.tenant.activity.ui</bundleDef>
-                               
<bundleDef>org.apache.stratos:org.apache.stratos.tenant.activity</bundleDef>
-                            </bundles>
-                            <importBundles>
-                                
<!--<importBundleDef>org.wso2.carbon:org.wso2.carbon.identity.core</importBundleDef>-->
-                            </importBundles>
-                            <importFeatures>
-                            </importFeatures>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/stratos/blob/bfc6d758/features/manager/tenant-activity/pom.xml
----------------------------------------------------------------------
diff --git a/features/manager/tenant-activity/pom.xml 
b/features/manager/tenant-activity/pom.xml
index 9764ea0..5679041 100644
--- a/features/manager/tenant-activity/pom.xml
+++ b/features/manager/tenant-activity/pom.xml
@@ -29,7 +29,6 @@
     <name>Apache Stratos - Tenant activity Feature Aggregator Module</name>
     <url>http://apache.org</url>
     <modules>
-        <module>org.apache.stratos.tenant.activity.ui.feature</module>
         <module>org.apache.stratos.tenant.activity.server.feature</module>
     </modules>
 </project>

Reply via email to