You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2013/07/12 09:01:21 UTC
[1/3] applying 0001-Domain-validater-and-UI-component-refactor.patch
Updated Branches:
refs/heads/master 316ba6cec -> a875aabb7
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/js/validate_domain.js
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/js/validate_domain.js b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/js/validate_domain.js
deleted file mode 100644
index 1585b42..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/js/validate_domain.js
+++ /dev/null
@@ -1,151 +0,0 @@
-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"]);
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/submit_validate_domain_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/submit_validate_domain_ajaxprocessor.jsp b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/submit_validate_domain_ajaxprocessor.jsp
deleted file mode 100644
index b5edff1..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/submit_validate_domain_ajaxprocessor.jsp
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. 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");
-}
-%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_logged_in.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_logged_in.jsp b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_logged_in.jsp
deleted file mode 100644
index 6ee6e47..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_logged_in.jsp
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. 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/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_not_logged_in.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_not_logged_in.jsp b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_not_logged_in.jsp
deleted file mode 100644
index 92b4f61..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_not_logged_in.jsp
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. 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>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_template.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_template.jsp b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_template.jsp
deleted file mode 100644
index 0372c92..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_domain_template.jsp
+++ /dev/null
@@ -1,204 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. 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.wso2.carbon.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.wso2.carbon.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.wso2.carbon.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>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_with_dns_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_with_dns_ajaxprocessor.jsp b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_with_dns_ajaxprocessor.jsp
deleted file mode 100644
index a2bea9a..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_with_dns_ajaxprocessor.jsp
+++ /dev/null
@@ -1,22 +0,0 @@
-<%@ 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%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_with_text_ajaxprocessor.jsp
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_with_text_ajaxprocessor.jsp b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_with_text_ajaxprocessor.jsp
deleted file mode 100644
index 1105363..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/validate_with_text_ajaxprocessor.jsp
+++ /dev/null
@@ -1,22 +0,0 @@
-<%@ 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%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/pom.xml b/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/pom.xml
deleted file mode 100644
index 89d1f73..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/pom.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<!--
-# Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed 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.wso2.carbon</groupId>
- <artifactId>domain-validator-parent</artifactId>
- <version>2.1.0</version>
-<relativePath>../../pom.xml</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.wso2.carbon.validate.domain</artifactId>
- <packaging>bundle</packaging>
- <name>WSO2 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.wso2.carbon.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.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.stratos.common</artifactId>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/internal/ValidateDomainServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/internal/ValidateDomainServiceComponent.java b/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/internal/ValidateDomainServiceComponent.java
deleted file mode 100644
index eb792f9..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/internal/ValidateDomainServiceComponent.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-*
-* WSO2 Inc. 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.wso2.carbon.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.wso2.carbon.validate.domain.util.Util;
-import org.wso2.carbon.user.core.service.RealmService;
-import org.wso2.carbon.utils.ConfigurationContextService;
-
-/**
- * @scr.component name="org.wso2.carbon.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/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/services/ValidateDomainAdminService.java
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/services/ValidateDomainAdminService.java b/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/services/ValidateDomainAdminService.java
deleted file mode 100644
index 05f885a..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/services/ValidateDomainAdminService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-*
-* WSO2 Inc. 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.wso2.carbon.validate.domain.services;
-
-import org.wso2.carbon.core.AbstractAdmin;
-import org.wso2.carbon.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/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/services/ValidateDomainService.java
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/services/ValidateDomainService.java b/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/services/ValidateDomainService.java
deleted file mode 100644
index 53cef09..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/services/ValidateDomainService.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-*
-* WSO2 Inc. 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.wso2.carbon.validate.domain.services;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.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/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/util/Util.java
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/util/Util.java b/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/util/Util.java
deleted file mode 100644
index cb42b32..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/java/org/wso2/carbon/validate/domain/util/Util.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 Inc. 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.wso2.carbon.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.wso2.carbon.validate.domain.internal.ValidateDomainServiceComponent;
-import org.wso2.carbon.stratos.common.constants.StratosConstants;
-import org.wso2.carbon.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/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/resources/META-INF/services.xml
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/resources/META-INF/services.xml b/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/resources/META-INF/services.xml
deleted file mode 100644
index 39fa82f..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain/2.1.0/src/main/resources/META-INF/services.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- !
- ! Copyright 2006 The Apache Software Foundation.
- !
- ! Licensed 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.wso2.carbon.validate.domain.services.ValidateDomainService
- </parameter>
- </service>
- <service name="ValidateDomainAdminService" scope="transportsession">
- <transports>
- <transport>https</transport>
- </transports>
- <parameter name="ServiceClass" locked="false">
- org.wso2.carbon.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>
[3/3] git commit: applying
0001-Domain-validater-and-UI-component-refactor.patch
Posted by la...@apache.org.
applying 0001-Domain-validater-and-UI-component-refactor.patch
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/a875aabb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/a875aabb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/a875aabb
Branch: refs/heads/master
Commit: a875aabb7c0298ee81ee75bb992aaba2fe4bc67c
Parents: 316ba6c
Author: Lakmal Warusawithana <la...@wso2.com>
Authored: Fri Jul 12 12:31:03 2013 +0530
Committer: Lakmal Warusawithana <la...@wso2.com>
Committed: Fri Jul 12 12:31:03 2013 +0530
----------------------------------------------------------------------
.../pom.xml | 103 ++++++
.../ui/clients/ValidateDomainAdminClient.java | 117 +++++++
.../domain/ui/clients/ValidateDomainClient.java | 27 ++
.../clients/ValidateDomainNonAdminClient.java | 115 +++++++
.../stratos/validate/domain/ui/utils/Util.java | 40 +++
.../src/main/resources/META-INF/component.xml | 21 ++
.../resources/ValidateDomainAdminService.wsdl | 238 ++++++++++++++
.../main/resources/ValidateDomainService.wsdl | 238 ++++++++++++++
.../domain/ui/i18n/JSResources.properties | 7 +
.../domain/ui/i18n/Resources.properties | 3 +
.../web/validate-domain/css/validate_domain.css | 31 ++
.../docs/images/domain-validation.png | Bin 0 -> 56415 bytes
.../web/validate-domain/docs/userguide.html | 47 +++
.../web/validate-domain/images/ajax-loader.gif | Bin 0 -> 673 bytes
.../web/validate-domain/images/right.gif | Bin 0 -> 924 bytes
.../web/validate-domain/images/wrong.gif | Bin 0 -> 976 bytes
.../web/validate-domain/js/validate_domain.js | 151 +++++++++
.../submit_validate_domain_ajaxprocessor.jsp | 36 +++
.../validate_domain_logged_in.jsp | 22 ++
.../validate_domain_not_logged_in.jsp | 22 ++
.../validate_domain_template.jsp | 204 ++++++++++++
.../validate_with_dns_ajaxprocessor.jsp | 22 ++
.../validate_with_text_ajaxprocessor.jsp | 22 ++
.../org.apache.stratos.validate.domain/pom.xml | 81 +++++
.../ValidateDomainServiceComponent.java | 87 +++++
.../services/ValidateDomainAdminService.java | 39 +++
.../domain/services/ValidateDomainService.java | 82 +++++
.../stratos/validate/domain/util/Util.java | 320 +++++++++++++++++++
.../src/main/resources/META-INF/services.xml | 39 +++
.../2.1.0/pom.xml | 96 ------
.../ui/clients/ValidateDomainAdminClient.java | 117 -------
.../domain/ui/clients/ValidateDomainClient.java | 27 --
.../clients/ValidateDomainNonAdminClient.java | 115 -------
.../carbon/validate/domain/ui/utils/Util.java | 40 ---
.../src/main/resources/META-INF/component.xml | 21 --
.../resources/ValidateDomainAdminService.wsdl | 238 --------------
.../main/resources/ValidateDomainService.wsdl | 238 --------------
.../domain/ui/i18n/JSResources.properties | 7 -
.../domain/ui/i18n/Resources.properties | 3 -
.../web/validate-domain/css/validate_domain.css | 31 --
.../docs/images/domain-validation.png | Bin 56415 -> 0 bytes
.../web/validate-domain/docs/userguide.html | 47 ---
.../web/validate-domain/images/ajax-loader.gif | Bin 673 -> 0 bytes
.../web/validate-domain/images/right.gif | Bin 924 -> 0 bytes
.../web/validate-domain/images/wrong.gif | Bin 976 -> 0 bytes
.../web/validate-domain/js/validate_domain.js | 151 ---------
.../submit_validate_domain_ajaxprocessor.jsp | 36 ---
.../validate_domain_logged_in.jsp | 22 --
.../validate_domain_not_logged_in.jsp | 22 --
.../validate_domain_template.jsp | 204 ------------
.../validate_with_dns_ajaxprocessor.jsp | 22 --
.../validate_with_text_ajaxprocessor.jsp | 22 --
.../2.1.0/pom.xml | 80 -----
.../ValidateDomainServiceComponent.java | 87 -----
.../services/ValidateDomainAdminService.java | 39 ---
.../domain/services/ValidateDomainService.java | 82 -----
.../wso2/carbon/validate/domain/util/Util.java | 320 -------------------
.../src/main/resources/META-INF/services.xml | 39 ---
58 files changed, 2114 insertions(+), 2106 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/pom.xml b/components/org.apache.stratos.validate.domain.ui/pom.xml
new file mode 100644
index 0000000..6dd57c2
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/pom.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+# Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+#
+# Licensed 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>3.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.wso2.carbon.validate.domain.ui</artifactId>
+ <packaging>bundle</packaging>
+ <name>WSO2 Stratos - Validate Domains - User Interface</name>
+
+ <build>
+
+ <plugins>
+
+ <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.ui.*,
+ </Export-Package>
+ <Import-Package>
+ javax.servlet;version="${imp.pkg.version.javax.servlet}",
+ javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
+ org.apache.lucene.*,
+ org.apache.stratos.validate.domain.stub.*; version="${carbon.platform.package.import.version.range}",
+ *;resolution:=optional
+ </Import-Package>
+ <Carbon-Component>UIBundle</Carbon-Component>
+ </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.eclipse.equinox</groupId>
+ <artifactId>javax.servlet</artifactId>
+ <version>${version.javax.servlet}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.axis2.wso2</groupId>
+ <artifactId>axis2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.axiom.wso2</groupId>
+ <artifactId>axiom</artifactId>
+ <version>${orbit.version.axiom}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.wso2.carbon</groupId>
+ <artifactId>org.wso2.carbon.ui</artifactId>
+ <version>${wso2carbon.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>org.apache.stratos.validate.domain.stub</artifactId>
+ <version>${apache.stratos.version}</version>
+ </dependency>
+ </dependencies>
+
+ <properties>
+ <version.javax.servlet>3.0.0.v201112011016</version.javax.servlet>
+ </properties>
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainAdminClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainAdminClient.java b/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainAdminClient.java
new file mode 100644
index 0000000..3ae8a09
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainAdminClient.java
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+* WSO2 Inc. 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.ui.clients;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.registry.core.exceptions.RegistryException;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.utils.ServerConstants;
+import org.apache.stratos.validate.domain.stub.services.ValidateDomainAdminServiceStub;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.http.HttpSession;
+
+public class ValidateDomainAdminClient implements ValidateDomainClient {
+ private static final Log log = LogFactory.getLog(ValidateDomainAdminClient.class);
+
+ private ValidateDomainAdminServiceStub stub;
+ private String epr;
+
+ public ValidateDomainAdminClient(String cookie, String backendServerURL,
+ ConfigurationContext configContext) throws RegistryException {
+
+ epr = backendServerURL + "ValidateDomainAdminService";
+
+ try {
+ stub = new ValidateDomainAdminServiceStub(configContext, epr);
+
+ ServiceClient client = stub._getServiceClient();
+ Options option = client.getOptions();
+ option.setManageSession(true);
+ option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
+
+ } catch (AxisFault axisFault) {
+ String msg =
+ "Failed to initiate Validate Domain service client. " + axisFault.getMessage();
+ log.error(msg, axisFault);
+ throw new RegistryException(msg, axisFault);
+ }
+ }
+
+ public ValidateDomainAdminClient(ServletConfig config, HttpSession session)
+ throws RegistryException {
+
+ String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext =
+ (ConfigurationContext) config.getServletContext().getAttribute(
+ CarbonConstants.CONFIGURATION_CONTEXT);
+ epr = backendServerURL + "ValidateDomainAdminService";
+
+ try {
+ stub = new ValidateDomainAdminServiceStub(configContext, epr);
+
+ ServiceClient client = stub._getServiceClient();
+ Options option = client.getOptions();
+ option.setManageSession(true);
+ option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
+
+ } catch (AxisFault axisFault) {
+ String msg =
+ "Failed to initiate Add Services service client. " + axisFault.getMessage();
+ log.error(msg, axisFault);
+ throw new RegistryException(msg, axisFault);
+ }
+ }
+
+ public String getDomainValidationKey(String domain) throws RegistryException {
+ try {
+ return stub.getDomainValidationKey(domain);
+ } catch (Exception e) {
+ String msg = "Failed to get domain validation keys. " + e.getMessage();
+ log.error(msg, e);
+ throw new RegistryException(msg, e);
+ }
+ }
+
+ public String validateByDNSEntry(String domain) throws RegistryException {
+ try {
+ return stub.validateByDNSEntry(domain);
+ } catch (Exception e) {
+ String msg = "Failed to validate by dns entry. " + e.getMessage();
+ log.error(msg, e);
+ throw new RegistryException(msg, e);
+ }
+ }
+
+ public String validateByTextInRoot(String domain) throws RegistryException {
+ try {
+ return stub.validateByTextInRoot(domain);
+ } catch (Exception e) {
+ String msg = "Failed to validate by dns entry. " + e.getMessage();
+ log.error(msg, e);
+ throw new RegistryException(msg, e);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainClient.java b/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainClient.java
new file mode 100644
index 0000000..2df05d5
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainClient.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * Licensed 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.ui.clients;
+
+import org.wso2.carbon.registry.core.exceptions.RegistryException;
+
+public interface ValidateDomainClient {
+ public String getDomainValidationKey(String domain) throws RegistryException;
+
+ public String validateByDNSEntry(String domain) throws RegistryException;
+
+ public String validateByTextInRoot(String domain) throws RegistryException;
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainNonAdminClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainNonAdminClient.java b/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainNonAdminClient.java
new file mode 100644
index 0000000..e214a34
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/clients/ValidateDomainNonAdminClient.java
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+* WSO2 Inc. 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.ui.clients;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.CarbonConstants;
+import org.wso2.carbon.registry.core.exceptions.RegistryException;
+import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.utils.ServerConstants;
+import org.apache.stratos.validate.domain.stub.services.ValidateDomainServiceStub;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.http.HttpSession;
+
+public class ValidateDomainNonAdminClient implements ValidateDomainClient {
+ private static final Log log = LogFactory.getLog(ValidateDomainNonAdminClient.class);
+
+ private ValidateDomainServiceStub stub;
+ private String epr;
+
+ public ValidateDomainNonAdminClient(
+ String cookie, String backendServerURL, ConfigurationContext configContext)
+ throws RegistryException {
+
+ epr = backendServerURL + "ValidateDomainService";
+
+ try {
+ stub = new ValidateDomainServiceStub(configContext, epr);
+
+ ServiceClient client = stub._getServiceClient();
+ Options option = client.getOptions();
+ option.setManageSession(true);
+ option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
+
+ } catch (AxisFault axisFault) {
+ String msg = "Failed to initiate AddServices service client. " + axisFault.getMessage();
+ log.error(msg, axisFault);
+ throw new RegistryException(msg, axisFault);
+ }
+ }
+
+ public ValidateDomainNonAdminClient(ServletConfig config, HttpSession session)
+ throws RegistryException {
+
+ String cookie = (String)session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
+ String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
+ ConfigurationContext configContext = (ConfigurationContext) config.
+ getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
+ epr = backendServerURL + "ValidateDomainService";
+
+ try {
+ stub = new ValidateDomainServiceStub(configContext, epr);
+
+ ServiceClient client = stub._getServiceClient();
+ Options option = client.getOptions();
+ option.setManageSession(true);
+ option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
+
+ } catch (AxisFault axisFault) {
+ String msg = "Failed to initiate Add Services service client. " + axisFault.getMessage();
+ log.error(msg, axisFault);
+ throw new RegistryException(msg, axisFault);
+ }
+ }
+
+ public String getDomainValidationKey(String domain) throws RegistryException {
+ try {
+ return stub.getDomainValidationKey(domain);
+ } catch (Exception e) {
+ String msg = "Failed to get domain validation keys. " + e.getMessage();
+ log.error(msg, e);
+ throw new RegistryException(msg, e);
+ }
+ }
+
+ public String validateByDNSEntry(String domain) throws RegistryException {
+ try {
+ return stub.validateByDNSEntry(domain);
+ } catch (Exception e) {
+ String msg = "Failed to validate by dns entry. " + e.getMessage();
+ log.error(msg, e);
+ throw new RegistryException(msg, e);
+ }
+ }
+
+ public String validateByTextInRoot(String domain) throws RegistryException {
+ try {
+ return stub.validateByTextInRoot(domain);
+ } catch (Exception e) {
+ String msg = "Failed to validate by dns entry. " + e.getMessage();
+ log.error(msg, e);
+ throw new RegistryException(msg, e);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/utils/Util.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/utils/Util.java b/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/utils/Util.java
new file mode 100644
index 0000000..9ed98ba
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/java/org/apache/stratos/validate/domain/ui/utils/Util.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * Licensed 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.ui.utils;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.wso2.carbon.registry.core.exceptions.RegistryException;
+import org.apache.stratos.validate.domain.ui.clients.ValidateDomainAdminClient;
+import org.apache.stratos.validate.domain.ui.clients.ValidateDomainClient;
+import org.apache.stratos.validate.domain.ui.clients.ValidateDomainNonAdminClient;
+
+public class Util {
+ public static ValidateDomainClient getValidateDomainClient(ServletRequest request,
+ ServletConfig config, HttpSession session) throws RegistryException {
+ // this doesn't make any security hole, as even a not-logged-in user try
+ // manually put status parameter to logged_in, still the back-end service
+ // try to validate him and he will fail.
+
+ String status = request.getParameter("status");
+ if ("logged_in".equals(status)) {
+ return new ValidateDomainAdminClient(config, session);
+ }
+ return new ValidateDomainNonAdminClient(config, session);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/META-INF/component.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/META-INF/component.xml b/components/org.apache.stratos.validate.domain.ui/src/main/resources/META-INF/component.xml
new file mode 100644
index 0000000..7d459e4
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/META-INF/component.xml
@@ -0,0 +1,21 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. 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.
+ -->
+<component xmlns="http://products.wso2.org/carbon">
+
+
+</component>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/ValidateDomainAdminService.wsdl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/ValidateDomainAdminService.wsdl b/components/org.apache.stratos.validate.domain.ui/src/main/resources/ValidateDomainAdminService.wsdl
new file mode 100644
index 0000000..0e16976
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/ValidateDomainAdminService.wsdl
@@ -0,0 +1,238 @@
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://services.domain.validate.carbon.wso2.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://services.domain.validate.carbon.wso2.org">
+ <wsdl:documentation>ValidateDomainAdminService</wsdl:documentation>
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://services.domain.validate.carbon.wso2.org">
+ <xs:element name="validateByTextInRootException">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="validateByTextInRootException" nillable="true" type="ns:Exception" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="Message" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="validateByTextInRoot">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="validateByTextInRootResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="validateByDNSEntryException">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="validateByDNSEntryException" nillable="true" type="ns:Exception" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="validateByDNSEntry">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="validateByDNSEntryResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getDomainValidationKeyException">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="getDomainValidationKeyException" nillable="true" type="ns:Exception" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getDomainValidationKey">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getDomainValidationKeyResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="validateByTextInRootRequest">
+ <wsdl:part name="parameters" element="ns:validateByTextInRoot" />
+ </wsdl:message>
+ <wsdl:message name="validateByTextInRootResponse">
+ <wsdl:part name="parameters" element="ns:validateByTextInRootResponse" />
+ </wsdl:message>
+ <wsdl:message name="validateByTextInRootException">
+ <wsdl:part name="parameters" element="ns:validateByTextInRootException" />
+ </wsdl:message>
+ <wsdl:message name="validateByDNSEntryRequest">
+ <wsdl:part name="parameters" element="ns:validateByDNSEntry" />
+ </wsdl:message>
+ <wsdl:message name="validateByDNSEntryResponse">
+ <wsdl:part name="parameters" element="ns:validateByDNSEntryResponse" />
+ </wsdl:message>
+ <wsdl:message name="validateByDNSEntryException">
+ <wsdl:part name="parameters" element="ns:validateByDNSEntryException" />
+ </wsdl:message>
+ <wsdl:message name="getDomainValidationKeyRequest">
+ <wsdl:part name="parameters" element="ns:getDomainValidationKey" />
+ </wsdl:message>
+ <wsdl:message name="getDomainValidationKeyResponse">
+ <wsdl:part name="parameters" element="ns:getDomainValidationKeyResponse" />
+ </wsdl:message>
+ <wsdl:message name="getDomainValidationKeyException">
+ <wsdl:part name="parameters" element="ns:getDomainValidationKeyException" />
+ </wsdl:message>
+ <wsdl:portType name="ValidateDomainAdminServicePortType">
+ <wsdl:operation name="validateByTextInRoot">
+ <wsdl:input message="ns:validateByTextInRootRequest" wsaw:Action="urn:validateByTextInRoot" />
+ <wsdl:output message="ns:validateByTextInRootResponse" wsaw:Action="urn:validateByTextInRootResponse" />
+ <wsdl:fault message="ns:validateByTextInRootException" name="validateByTextInRootException" wsaw:Action="urn:validateByTextInRootvalidateByTextInRootException" />
+ </wsdl:operation>
+ <wsdl:operation name="validateByDNSEntry">
+ <wsdl:input message="ns:validateByDNSEntryRequest" wsaw:Action="urn:validateByDNSEntry" />
+ <wsdl:output message="ns:validateByDNSEntryResponse" wsaw:Action="urn:validateByDNSEntryResponse" />
+ <wsdl:fault message="ns:validateByDNSEntryException" name="validateByDNSEntryException" wsaw:Action="urn:validateByDNSEntryvalidateByDNSEntryException" />
+ </wsdl:operation>
+ <wsdl:operation name="getDomainValidationKey">
+ <wsdl:input message="ns:getDomainValidationKeyRequest" wsaw:Action="urn:getDomainValidationKey" />
+ <wsdl:output message="ns:getDomainValidationKeyResponse" wsaw:Action="urn:getDomainValidationKeyResponse" />
+ <wsdl:fault message="ns:getDomainValidationKeyException" name="getDomainValidationKeyException" wsaw:Action="urn:getDomainValidationKeygetDomainValidationKeyException" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="ValidateDomainAdminServiceSoap11Binding" type="ns:ValidateDomainAdminServicePortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <wsdl:operation name="validateByTextInRoot">
+ <soap:operation soapAction="urn:validateByTextInRoot" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="validateByTextInRootException">
+ <soap:fault use="literal" name="validateByTextInRootException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="validateByDNSEntry">
+ <soap:operation soapAction="urn:validateByDNSEntry" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="validateByDNSEntryException">
+ <soap:fault use="literal" name="validateByDNSEntryException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="getDomainValidationKey">
+ <soap:operation soapAction="urn:getDomainValidationKey" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="getDomainValidationKeyException">
+ <soap:fault use="literal" name="getDomainValidationKeyException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="ValidateDomainAdminServiceSoap12Binding" type="ns:ValidateDomainAdminServicePortType">
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <wsdl:operation name="validateByTextInRoot">
+ <soap12:operation soapAction="urn:validateByTextInRoot" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="validateByTextInRootException">
+ <soap12:fault use="literal" name="validateByTextInRootException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="validateByDNSEntry">
+ <soap12:operation soapAction="urn:validateByDNSEntry" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="validateByDNSEntryException">
+ <soap12:fault use="literal" name="validateByDNSEntryException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="getDomainValidationKey">
+ <soap12:operation soapAction="urn:getDomainValidationKey" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="getDomainValidationKeyException">
+ <soap12:fault use="literal" name="getDomainValidationKeyException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="ValidateDomainAdminServiceHttpBinding" type="ns:ValidateDomainAdminServicePortType">
+ <http:binding verb="POST" />
+ <wsdl:operation name="validateByTextInRoot">
+ <http:operation location="validateByTextInRoot" />
+ <wsdl:input>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="validateByDNSEntry">
+ <http:operation location="validateByDNSEntry" />
+ <wsdl:input>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getDomainValidationKey">
+ <http:operation location="getDomainValidationKey" />
+ <wsdl:input>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="ValidateDomainAdminService">
+ <wsdl:port name="ValidateDomainAdminServiceHttpsSoap11Endpoint" binding="ns:ValidateDomainAdminServiceSoap11Binding">
+ <soap:address location="https://192.168.1.100:9443/services/ValidateDomainAdminService.ValidateDomainAdminServiceHttpsSoap11Endpoint/" />
+ </wsdl:port>
+ <wsdl:port name="ValidateDomainAdminServiceHttpsSoap12Endpoint" binding="ns:ValidateDomainAdminServiceSoap12Binding">
+ <soap12:address location="https://192.168.1.100:9443/services/ValidateDomainAdminService.ValidateDomainAdminServiceHttpsSoap12Endpoint/" />
+ </wsdl:port>
+ <wsdl:port name="ValidateDomainAdminServiceHttpsEndpoint" binding="ns:ValidateDomainAdminServiceHttpBinding">
+ <http:address location="https://192.168.1.100:9443/services/ValidateDomainAdminService.ValidateDomainAdminServiceHttpsEndpoint/" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/ValidateDomainService.wsdl
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/ValidateDomainService.wsdl b/components/org.apache.stratos.validate.domain.ui/src/main/resources/ValidateDomainService.wsdl
new file mode 100644
index 0000000..c22a6ab
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/ValidateDomainService.wsdl
@@ -0,0 +1,238 @@
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://services.domain.validate.carbon.wso2.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://services.domain.validate.carbon.wso2.org">
+ <wsdl:documentation>ValidateDomainService</wsdl:documentation>
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://services.domain.validate.carbon.wso2.org">
+ <xs:element name="validateByTextInRootException">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="validateByTextInRootException" nillable="true" type="ns:Exception" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="Message" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="validateByTextInRoot">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="validateByTextInRootResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="validateByDNSEntryException">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="validateByDNSEntryException" nillable="true" type="ns:Exception" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="validateByDNSEntry">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="validateByDNSEntryResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getDomainValidationKeyException">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="getDomainValidationKeyException" nillable="true" type="ns:Exception" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getDomainValidationKey">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getDomainValidationKeyResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="validateByTextInRootRequest">
+ <wsdl:part name="parameters" element="ns:validateByTextInRoot" />
+ </wsdl:message>
+ <wsdl:message name="validateByTextInRootResponse">
+ <wsdl:part name="parameters" element="ns:validateByTextInRootResponse" />
+ </wsdl:message>
+ <wsdl:message name="validateByTextInRootException">
+ <wsdl:part name="parameters" element="ns:validateByTextInRootException" />
+ </wsdl:message>
+ <wsdl:message name="validateByDNSEntryRequest">
+ <wsdl:part name="parameters" element="ns:validateByDNSEntry" />
+ </wsdl:message>
+ <wsdl:message name="validateByDNSEntryResponse">
+ <wsdl:part name="parameters" element="ns:validateByDNSEntryResponse" />
+ </wsdl:message>
+ <wsdl:message name="validateByDNSEntryException">
+ <wsdl:part name="parameters" element="ns:validateByDNSEntryException" />
+ </wsdl:message>
+ <wsdl:message name="getDomainValidationKeyRequest">
+ <wsdl:part name="parameters" element="ns:getDomainValidationKey" />
+ </wsdl:message>
+ <wsdl:message name="getDomainValidationKeyResponse">
+ <wsdl:part name="parameters" element="ns:getDomainValidationKeyResponse" />
+ </wsdl:message>
+ <wsdl:message name="getDomainValidationKeyException">
+ <wsdl:part name="parameters" element="ns:getDomainValidationKeyException" />
+ </wsdl:message>
+ <wsdl:portType name="ValidateDomainServicePortType">
+ <wsdl:operation name="validateByTextInRoot">
+ <wsdl:input message="ns:validateByTextInRootRequest" wsaw:Action="urn:validateByTextInRoot" />
+ <wsdl:output message="ns:validateByTextInRootResponse" wsaw:Action="urn:validateByTextInRootResponse" />
+ <wsdl:fault message="ns:validateByTextInRootException" name="validateByTextInRootException" wsaw:Action="urn:validateByTextInRootvalidateByTextInRootException" />
+ </wsdl:operation>
+ <wsdl:operation name="validateByDNSEntry">
+ <wsdl:input message="ns:validateByDNSEntryRequest" wsaw:Action="urn:validateByDNSEntry" />
+ <wsdl:output message="ns:validateByDNSEntryResponse" wsaw:Action="urn:validateByDNSEntryResponse" />
+ <wsdl:fault message="ns:validateByDNSEntryException" name="validateByDNSEntryException" wsaw:Action="urn:validateByDNSEntryvalidateByDNSEntryException" />
+ </wsdl:operation>
+ <wsdl:operation name="getDomainValidationKey">
+ <wsdl:input message="ns:getDomainValidationKeyRequest" wsaw:Action="urn:getDomainValidationKey" />
+ <wsdl:output message="ns:getDomainValidationKeyResponse" wsaw:Action="urn:getDomainValidationKeyResponse" />
+ <wsdl:fault message="ns:getDomainValidationKeyException" name="getDomainValidationKeyException" wsaw:Action="urn:getDomainValidationKeygetDomainValidationKeyException" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="ValidateDomainServiceSoap11Binding" type="ns:ValidateDomainServicePortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <wsdl:operation name="validateByTextInRoot">
+ <soap:operation soapAction="urn:validateByTextInRoot" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="validateByTextInRootException">
+ <soap:fault use="literal" name="validateByTextInRootException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="validateByDNSEntry">
+ <soap:operation soapAction="urn:validateByDNSEntry" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="validateByDNSEntryException">
+ <soap:fault use="literal" name="validateByDNSEntryException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="getDomainValidationKey">
+ <soap:operation soapAction="urn:getDomainValidationKey" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="getDomainValidationKeyException">
+ <soap:fault use="literal" name="getDomainValidationKeyException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="ValidateDomainServiceSoap12Binding" type="ns:ValidateDomainServicePortType">
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <wsdl:operation name="validateByTextInRoot">
+ <soap12:operation soapAction="urn:validateByTextInRoot" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="validateByTextInRootException">
+ <soap12:fault use="literal" name="validateByTextInRootException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="validateByDNSEntry">
+ <soap12:operation soapAction="urn:validateByDNSEntry" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="validateByDNSEntryException">
+ <soap12:fault use="literal" name="validateByDNSEntryException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="getDomainValidationKey">
+ <soap12:operation soapAction="urn:getDomainValidationKey" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="getDomainValidationKeyException">
+ <soap12:fault use="literal" name="getDomainValidationKeyException" />
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="ValidateDomainServiceHttpBinding" type="ns:ValidateDomainServicePortType">
+ <http:binding verb="POST" />
+ <wsdl:operation name="validateByTextInRoot">
+ <http:operation location="validateByTextInRoot" />
+ <wsdl:input>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="validateByDNSEntry">
+ <http:operation location="validateByDNSEntry" />
+ <wsdl:input>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getDomainValidationKey">
+ <http:operation location="getDomainValidationKey" />
+ <wsdl:input>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml" part="parameters" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="ValidateDomainService">
+ <wsdl:port name="ValidateDomainServiceHttpsSoap11Endpoint" binding="ns:ValidateDomainServiceSoap11Binding">
+ <soap:address location="https://192.168.1.100:9443/services/ValidateDomainService.ValidateDomainServiceHttpsSoap11Endpoint/" />
+ </wsdl:port>
+ <wsdl:port name="ValidateDomainServiceHttpsSoap12Endpoint" binding="ns:ValidateDomainServiceSoap12Binding">
+ <soap12:address location="https://192.168.1.100:9443/services/ValidateDomainService.ValidateDomainServiceHttpsSoap12Endpoint/" />
+ </wsdl:port>
+ <wsdl:port name="ValidateDomainServiceHttpsEndpoint" binding="ns:ValidateDomainServiceHttpBinding">
+ <http:address location="https://192.168.1.100:9443/services/ValidateDomainService.ValidateDomainServiceHttpsEndpoint/" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/org/apache/stratos/validate/domain/ui/i18n/JSResources.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/org/apache/stratos/validate/domain/ui/i18n/JSResources.properties b/components/org.apache.stratos.validate.domain.ui/src/main/resources/org/apache/stratos/validate/domain/ui/i18n/JSResources.properties
new file mode 100644
index 0000000..7052880
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/org/apache/stratos/validate/domain/ui/i18n/JSResources.properties
@@ -0,0 +1,7 @@
+validation.fail.with.text=Domain ownership validation failed. Make sure you have put the exact text content mentioned here in the web root.
+validation.success.with.text=Domain ownership validation succeeded.
+validation.fail.with.dns=Domain ownership validation failed. Note it may take sometime to propagate the changes in DNS. Please retry after a little break.
+validation.success.with.dns=Domain ownership validation succeeded.
+domain.empty=The domain to validate ownership is empty.
+domain.unavailable=The domain is already registered. Please choose a different domain.
+session.timed.out=Your session timed out. Please login again.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/org/apache/stratos/validate/domain/ui/i18n/Resources.properties
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/org/apache/stratos/validate/domain/ui/i18n/Resources.properties b/components/org.apache.stratos.validate.domain.ui/src/main/resources/org/apache/stratos/validate/domain/ui/i18n/Resources.properties
new file mode 100644
index 0000000..fc77420
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/org/apache/stratos/validate/domain/ui/i18n/Resources.properties
@@ -0,0 +1,3 @@
+domain.ownership.validation=Domain Ownership Validation
+validate.domain.menu=Validate Domain
+validate=Validate
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/css/validate_domain.css
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/css/validate_domain.css b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/css/validate_domain.css
new file mode 100644
index 0000000..7b83d63
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/css/validate_domain.css
@@ -0,0 +1,31 @@
+div#validation-introduction {
+ margin: 5px;
+}
+
+div#with-text {
+ margin: 5px;
+}
+
+div#with-dns {
+ margin: 5px;
+}
+p {
+ padding:5px !important;
+}
+
+p.validate-button {
+ padding: 15px 5px 15px 5px !important;
+}
+
+li.catagory {
+ padding: 5px 0px 5px 25px !important;
+}
+
+
+
+div.conf-info {
+ background: #cccccc !important;
+ border: 1px solid #111 !important;
+ margin: 5px !important;
+ padding: 2px !important;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/docs/images/domain-validation.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/docs/images/domain-validation.png b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/docs/images/domain-validation.png
new file mode 100644
index 0000000..382dfdb
Binary files /dev/null and b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/docs/images/domain-validation.png differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/docs/userguide.html
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/docs/userguide.html b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/docs/userguide.html
new file mode 100644
index 0000000..204c14a
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/docs/userguide.html
@@ -0,0 +1,47 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. 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.
+ -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <title>Validate Domain Ownership - User Guide</title>
+ <link href="../../admin/css/documentation.css" rel="stylesheet" type="text/css" media="all" />
+</head>
+
+<body>
+<h1>Validate Domain Ownership</h1>
+
+<p>
+You can validate the ownership of your domain using two methods,
+ <ul>
+ <li>Creating a text file in the domain web ROOT </li>
+ <li>Setting up a CNAME entry in your DNS</li>
+ </ul>
+
+</p>
+
+
+<p>Instructions are shown in the following form.</p>
+
+<p>
+<img src="images/domain-validation.png" alt="Validation domain ownership"/>
+<div><strong>Figure1: Validate domain Ownership</strong></div>
+</p>
+
+</body>
+
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/ajax-loader.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/ajax-loader.gif b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/ajax-loader.gif
new file mode 100644
index 0000000..f2a1bc0
Binary files /dev/null and b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/ajax-loader.gif differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/right.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/right.gif b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/right.gif
new file mode 100644
index 0000000..72a64c9
Binary files /dev/null and b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/right.gif differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/wrong.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/wrong.gif b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/wrong.gif
new file mode 100644
index 0000000..77e1f2c
Binary files /dev/null and b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/images/wrong.gif differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..1585b42
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/js/validate_domain.js
@@ -0,0 +1,151 @@
+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"]);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..b5edff1
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/submit_validate_domain_ajaxprocessor.jsp
@@ -0,0 +1,36 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. 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");
+}
+%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..6ee6e47
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_logged_in.jsp
@@ -0,0 +1,22 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. 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/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..92b4f61
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_not_logged_in.jsp
@@ -0,0 +1,22 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. 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>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..0372c92
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_domain_template.jsp
@@ -0,0 +1,204 @@
+<!--
+ ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ ~
+ ~ WSO2 Inc. 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.wso2.carbon.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.wso2.carbon.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.wso2.carbon.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>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..a2bea9a
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_with_dns_ajaxprocessor.jsp
@@ -0,0 +1,22 @@
+<%@ 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%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..1105363
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain.ui/src/main/resources/web/validate-domain/validate_with_text_ajaxprocessor.jsp
@@ -0,0 +1,22 @@
+<%@ 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%>
\ No newline at end of file
[2/3] applying 0001-Domain-validater-and-UI-component-refactor.patch
Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..4423b04
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain/pom.xml
@@ -0,0 +1,81 @@
+<!--
+# Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+#
+# Licensed 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>3.0.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>${apache.stratos.version}</version>
+ </dependency>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..a672d96
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/internal/ValidateDomainServiceComponent.java
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+* WSO2 Inc. 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/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..8724bdd
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/services/ValidateDomainAdminService.java
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+* WSO2 Inc. 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/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..b950e24
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/services/ValidateDomainService.java
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+*
+* WSO2 Inc. 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/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..d8f7935
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain/src/main/java/org/apache/stratos/validate/domain/util/Util.java
@@ -0,0 +1,320 @@
+/*
+ * Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. 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/incubator-stratos/blob/a875aabb/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
new file mode 100644
index 0000000..7b53b53
--- /dev/null
+++ b/components/org.apache.stratos.validate.domain/src/main/resources/META-INF/services.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ !
+ ! Copyright 2006 The Apache Software Foundation.
+ !
+ ! Licensed 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/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/pom.xml
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/pom.xml b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/pom.xml
deleted file mode 100644
index 9a4b73e..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/pom.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-# Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-#
-# Licensed 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.wso2.carbon</groupId>
- <artifactId>domain-validator-parent</artifactId>
- <version>2.1.0</version>
-<relativePath>../../pom.xml</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.wso2.carbon.validate.domain.ui</artifactId>
- <version>2.1.0</version>
- <packaging>bundle</packaging>
- <name>WSO2 Stratos - Validate Domains - User Interface</name>
-
- <build>
-
- <plugins>
-
- <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.wso2.carbon.validate.domain.ui.*,
- </Export-Package>
- <Import-Package>
- javax.servlet;version="${imp.pkg.version.javax.servlet}",
- javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
- org.apache.lucene.*,
- org.wso2.carbon.validate.domain.stub.*; version="${carbon.platform.package.import.version.range}",
- *;resolution:=optional
- </Import-Package>
- <Carbon-Component>UIBundle</Carbon-Component>
- </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.eclipse.equinox</groupId>
- <artifactId>javax.servlet</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.axis2.wso2</groupId>
- <artifactId>axis2</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ws.commons.axiom.wso2</groupId>
- <artifactId>axiom</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.ui</artifactId>
- </dependency>
- <dependency>
- <groupId>org.wso2.carbon</groupId>
- <artifactId>org.wso2.carbon.validate.domain.stub</artifactId>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainAdminClient.java
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainAdminClient.java b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainAdminClient.java
deleted file mode 100644
index 9d0d34e..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainAdminClient.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-*
-* WSO2 Inc. 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.wso2.carbon.validate.domain.ui.clients;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.CarbonConstants;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.ui.CarbonUIUtil;
-import org.wso2.carbon.utils.ServerConstants;
-import org.wso2.carbon.validate.domain.stub.services.ValidateDomainAdminServiceStub;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.http.HttpSession;
-
-public class ValidateDomainAdminClient implements ValidateDomainClient {
- private static final Log log = LogFactory.getLog(ValidateDomainAdminClient.class);
-
- private ValidateDomainAdminServiceStub stub;
- private String epr;
-
- public ValidateDomainAdminClient(String cookie, String backendServerURL,
- ConfigurationContext configContext) throws RegistryException {
-
- epr = backendServerURL + "ValidateDomainAdminService";
-
- try {
- stub = new ValidateDomainAdminServiceStub(configContext, epr);
-
- ServiceClient client = stub._getServiceClient();
- Options option = client.getOptions();
- option.setManageSession(true);
- option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
-
- } catch (AxisFault axisFault) {
- String msg =
- "Failed to initiate Validate Domain service client. " + axisFault.getMessage();
- log.error(msg, axisFault);
- throw new RegistryException(msg, axisFault);
- }
- }
-
- public ValidateDomainAdminClient(ServletConfig config, HttpSession session)
- throws RegistryException {
-
- String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext =
- (ConfigurationContext) config.getServletContext().getAttribute(
- CarbonConstants.CONFIGURATION_CONTEXT);
- epr = backendServerURL + "ValidateDomainAdminService";
-
- try {
- stub = new ValidateDomainAdminServiceStub(configContext, epr);
-
- ServiceClient client = stub._getServiceClient();
- Options option = client.getOptions();
- option.setManageSession(true);
- option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
-
- } catch (AxisFault axisFault) {
- String msg =
- "Failed to initiate Add Services service client. " + axisFault.getMessage();
- log.error(msg, axisFault);
- throw new RegistryException(msg, axisFault);
- }
- }
-
- public String getDomainValidationKey(String domain) throws RegistryException {
- try {
- return stub.getDomainValidationKey(domain);
- } catch (Exception e) {
- String msg = "Failed to get domain validation keys. " + e.getMessage();
- log.error(msg, e);
- throw new RegistryException(msg, e);
- }
- }
-
- public String validateByDNSEntry(String domain) throws RegistryException {
- try {
- return stub.validateByDNSEntry(domain);
- } catch (Exception e) {
- String msg = "Failed to validate by dns entry. " + e.getMessage();
- log.error(msg, e);
- throw new RegistryException(msg, e);
- }
- }
-
- public String validateByTextInRoot(String domain) throws RegistryException {
- try {
- return stub.validateByTextInRoot(domain);
- } catch (Exception e) {
- String msg = "Failed to validate by dns entry. " + e.getMessage();
- log.error(msg, e);
- throw new RegistryException(msg, e);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainClient.java
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainClient.java b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainClient.java
deleted file mode 100644
index 8a81d17..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainClient.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * Licensed 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.wso2.carbon.validate.domain.ui.clients;
-
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-
-public interface ValidateDomainClient {
- public String getDomainValidationKey(String domain) throws RegistryException;
-
- public String validateByDNSEntry(String domain) throws RegistryException;
-
- public String validateByTextInRoot(String domain) throws RegistryException;
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainNonAdminClient.java
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainNonAdminClient.java b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainNonAdminClient.java
deleted file mode 100644
index 520fdc6..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/clients/ValidateDomainNonAdminClient.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
-*
-* WSO2 Inc. 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.wso2.carbon.validate.domain.ui.clients;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.CarbonConstants;
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.ui.CarbonUIUtil;
-import org.wso2.carbon.utils.ServerConstants;
-import org.wso2.carbon.validate.domain.stub.services.ValidateDomainServiceStub;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.http.HttpSession;
-
-public class ValidateDomainNonAdminClient implements ValidateDomainClient {
- private static final Log log = LogFactory.getLog(ValidateDomainNonAdminClient.class);
-
- private ValidateDomainServiceStub stub;
- private String epr;
-
- public ValidateDomainNonAdminClient(
- String cookie, String backendServerURL, ConfigurationContext configContext)
- throws RegistryException {
-
- epr = backendServerURL + "ValidateDomainService";
-
- try {
- stub = new ValidateDomainServiceStub(configContext, epr);
-
- ServiceClient client = stub._getServiceClient();
- Options option = client.getOptions();
- option.setManageSession(true);
- option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
-
- } catch (AxisFault axisFault) {
- String msg = "Failed to initiate AddServices service client. " + axisFault.getMessage();
- log.error(msg, axisFault);
- throw new RegistryException(msg, axisFault);
- }
- }
-
- public ValidateDomainNonAdminClient(ServletConfig config, HttpSession session)
- throws RegistryException {
-
- String cookie = (String)session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
- String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
- ConfigurationContext configContext = (ConfigurationContext) config.
- getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
- epr = backendServerURL + "ValidateDomainService";
-
- try {
- stub = new ValidateDomainServiceStub(configContext, epr);
-
- ServiceClient client = stub._getServiceClient();
- Options option = client.getOptions();
- option.setManageSession(true);
- option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
-
- } catch (AxisFault axisFault) {
- String msg = "Failed to initiate Add Services service client. " + axisFault.getMessage();
- log.error(msg, axisFault);
- throw new RegistryException(msg, axisFault);
- }
- }
-
- public String getDomainValidationKey(String domain) throws RegistryException {
- try {
- return stub.getDomainValidationKey(domain);
- } catch (Exception e) {
- String msg = "Failed to get domain validation keys. " + e.getMessage();
- log.error(msg, e);
- throw new RegistryException(msg, e);
- }
- }
-
- public String validateByDNSEntry(String domain) throws RegistryException {
- try {
- return stub.validateByDNSEntry(domain);
- } catch (Exception e) {
- String msg = "Failed to validate by dns entry. " + e.getMessage();
- log.error(msg, e);
- throw new RegistryException(msg, e);
- }
- }
-
- public String validateByTextInRoot(String domain) throws RegistryException {
- try {
- return stub.validateByTextInRoot(domain);
- } catch (Exception e) {
- String msg = "Failed to validate by dns entry. " + e.getMessage();
- log.error(msg, e);
- throw new RegistryException(msg, e);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/utils/Util.java
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/utils/Util.java b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/utils/Util.java
deleted file mode 100644
index b3f27eb..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/java/org/wso2/carbon/validate/domain/ui/utils/Util.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * Licensed 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.wso2.carbon.validate.domain.ui.utils;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.validate.domain.ui.clients.ValidateDomainAdminClient;
-import org.wso2.carbon.validate.domain.ui.clients.ValidateDomainClient;
-import org.wso2.carbon.validate.domain.ui.clients.ValidateDomainNonAdminClient;
-
-public class Util {
- public static ValidateDomainClient getValidateDomainClient(ServletRequest request,
- ServletConfig config, HttpSession session) throws RegistryException {
- // this doesn't make any security hole, as even a not-logged-in user try
- // manually put status parameter to logged_in, still the back-end service
- // try to validate him and he will fail.
-
- String status = request.getParameter("status");
- if ("logged_in".equals(status)) {
- return new ValidateDomainAdminClient(config, session);
- }
- return new ValidateDomainNonAdminClient(config, session);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/META-INF/component.xml
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/META-INF/component.xml b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/META-INF/component.xml
deleted file mode 100644
index 7d459e4..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/META-INF/component.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. 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.
- -->
-<component xmlns="http://products.wso2.org/carbon">
-
-
-</component>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/ValidateDomainAdminService.wsdl
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/ValidateDomainAdminService.wsdl b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/ValidateDomainAdminService.wsdl
deleted file mode 100644
index 0e16976..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/ValidateDomainAdminService.wsdl
+++ /dev/null
@@ -1,238 +0,0 @@
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://services.domain.validate.carbon.wso2.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://services.domain.validate.carbon.wso2.org">
- <wsdl:documentation>ValidateDomainAdminService</wsdl:documentation>
- <wsdl:types>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://services.domain.validate.carbon.wso2.org">
- <xs:element name="validateByTextInRootException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="validateByTextInRootException" nillable="true" type="ns:Exception" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:complexType name="Exception">
- <xs:sequence>
- <xs:element minOccurs="0" name="Message" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- <xs:element name="validateByTextInRoot">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="validateByTextInRootResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="validateByDNSEntryException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="validateByDNSEntryException" nillable="true" type="ns:Exception" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="validateByDNSEntry">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="validateByDNSEntryResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDomainValidationKeyException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="getDomainValidationKeyException" nillable="true" type="ns:Exception" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDomainValidationKey">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDomainValidationKeyResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:schema>
- </wsdl:types>
- <wsdl:message name="validateByTextInRootRequest">
- <wsdl:part name="parameters" element="ns:validateByTextInRoot" />
- </wsdl:message>
- <wsdl:message name="validateByTextInRootResponse">
- <wsdl:part name="parameters" element="ns:validateByTextInRootResponse" />
- </wsdl:message>
- <wsdl:message name="validateByTextInRootException">
- <wsdl:part name="parameters" element="ns:validateByTextInRootException" />
- </wsdl:message>
- <wsdl:message name="validateByDNSEntryRequest">
- <wsdl:part name="parameters" element="ns:validateByDNSEntry" />
- </wsdl:message>
- <wsdl:message name="validateByDNSEntryResponse">
- <wsdl:part name="parameters" element="ns:validateByDNSEntryResponse" />
- </wsdl:message>
- <wsdl:message name="validateByDNSEntryException">
- <wsdl:part name="parameters" element="ns:validateByDNSEntryException" />
- </wsdl:message>
- <wsdl:message name="getDomainValidationKeyRequest">
- <wsdl:part name="parameters" element="ns:getDomainValidationKey" />
- </wsdl:message>
- <wsdl:message name="getDomainValidationKeyResponse">
- <wsdl:part name="parameters" element="ns:getDomainValidationKeyResponse" />
- </wsdl:message>
- <wsdl:message name="getDomainValidationKeyException">
- <wsdl:part name="parameters" element="ns:getDomainValidationKeyException" />
- </wsdl:message>
- <wsdl:portType name="ValidateDomainAdminServicePortType">
- <wsdl:operation name="validateByTextInRoot">
- <wsdl:input message="ns:validateByTextInRootRequest" wsaw:Action="urn:validateByTextInRoot" />
- <wsdl:output message="ns:validateByTextInRootResponse" wsaw:Action="urn:validateByTextInRootResponse" />
- <wsdl:fault message="ns:validateByTextInRootException" name="validateByTextInRootException" wsaw:Action="urn:validateByTextInRootvalidateByTextInRootException" />
- </wsdl:operation>
- <wsdl:operation name="validateByDNSEntry">
- <wsdl:input message="ns:validateByDNSEntryRequest" wsaw:Action="urn:validateByDNSEntry" />
- <wsdl:output message="ns:validateByDNSEntryResponse" wsaw:Action="urn:validateByDNSEntryResponse" />
- <wsdl:fault message="ns:validateByDNSEntryException" name="validateByDNSEntryException" wsaw:Action="urn:validateByDNSEntryvalidateByDNSEntryException" />
- </wsdl:operation>
- <wsdl:operation name="getDomainValidationKey">
- <wsdl:input message="ns:getDomainValidationKeyRequest" wsaw:Action="urn:getDomainValidationKey" />
- <wsdl:output message="ns:getDomainValidationKeyResponse" wsaw:Action="urn:getDomainValidationKeyResponse" />
- <wsdl:fault message="ns:getDomainValidationKeyException" name="getDomainValidationKeyException" wsaw:Action="urn:getDomainValidationKeygetDomainValidationKeyException" />
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="ValidateDomainAdminServiceSoap11Binding" type="ns:ValidateDomainAdminServicePortType">
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:operation name="validateByTextInRoot">
- <soap:operation soapAction="urn:validateByTextInRoot" style="document" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="validateByTextInRootException">
- <soap:fault use="literal" name="validateByTextInRootException" />
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="validateByDNSEntry">
- <soap:operation soapAction="urn:validateByDNSEntry" style="document" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="validateByDNSEntryException">
- <soap:fault use="literal" name="validateByDNSEntryException" />
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="getDomainValidationKey">
- <soap:operation soapAction="urn:getDomainValidationKey" style="document" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="getDomainValidationKeyException">
- <soap:fault use="literal" name="getDomainValidationKeyException" />
- </wsdl:fault>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:binding name="ValidateDomainAdminServiceSoap12Binding" type="ns:ValidateDomainAdminServicePortType">
- <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:operation name="validateByTextInRoot">
- <soap12:operation soapAction="urn:validateByTextInRoot" style="document" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="validateByTextInRootException">
- <soap12:fault use="literal" name="validateByTextInRootException" />
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="validateByDNSEntry">
- <soap12:operation soapAction="urn:validateByDNSEntry" style="document" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="validateByDNSEntryException">
- <soap12:fault use="literal" name="validateByDNSEntryException" />
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="getDomainValidationKey">
- <soap12:operation soapAction="urn:getDomainValidationKey" style="document" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="getDomainValidationKeyException">
- <soap12:fault use="literal" name="getDomainValidationKeyException" />
- </wsdl:fault>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:binding name="ValidateDomainAdminServiceHttpBinding" type="ns:ValidateDomainAdminServicePortType">
- <http:binding verb="POST" />
- <wsdl:operation name="validateByTextInRoot">
- <http:operation location="validateByTextInRoot" />
- <wsdl:input>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="validateByDNSEntry">
- <http:operation location="validateByDNSEntry" />
- <wsdl:input>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getDomainValidationKey">
- <http:operation location="getDomainValidationKey" />
- <wsdl:input>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="ValidateDomainAdminService">
- <wsdl:port name="ValidateDomainAdminServiceHttpsSoap11Endpoint" binding="ns:ValidateDomainAdminServiceSoap11Binding">
- <soap:address location="https://192.168.1.100:9443/services/ValidateDomainAdminService.ValidateDomainAdminServiceHttpsSoap11Endpoint/" />
- </wsdl:port>
- <wsdl:port name="ValidateDomainAdminServiceHttpsSoap12Endpoint" binding="ns:ValidateDomainAdminServiceSoap12Binding">
- <soap12:address location="https://192.168.1.100:9443/services/ValidateDomainAdminService.ValidateDomainAdminServiceHttpsSoap12Endpoint/" />
- </wsdl:port>
- <wsdl:port name="ValidateDomainAdminServiceHttpsEndpoint" binding="ns:ValidateDomainAdminServiceHttpBinding">
- <http:address location="https://192.168.1.100:9443/services/ValidateDomainAdminService.ValidateDomainAdminServiceHttpsEndpoint/" />
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/ValidateDomainService.wsdl
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/ValidateDomainService.wsdl b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/ValidateDomainService.wsdl
deleted file mode 100644
index c22a6ab..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/ValidateDomainService.wsdl
+++ /dev/null
@@ -1,238 +0,0 @@
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://services.domain.validate.carbon.wso2.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://services.domain.validate.carbon.wso2.org">
- <wsdl:documentation>ValidateDomainService</wsdl:documentation>
- <wsdl:types>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://services.domain.validate.carbon.wso2.org">
- <xs:element name="validateByTextInRootException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="validateByTextInRootException" nillable="true" type="ns:Exception" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:complexType name="Exception">
- <xs:sequence>
- <xs:element minOccurs="0" name="Message" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- <xs:element name="validateByTextInRoot">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="validateByTextInRootResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="validateByDNSEntryException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="validateByDNSEntryException" nillable="true" type="ns:Exception" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="validateByDNSEntry">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="validateByDNSEntryResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDomainValidationKeyException">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="getDomainValidationKeyException" nillable="true" type="ns:Exception" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDomainValidationKey">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="domain" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDomainValidationKeyResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:schema>
- </wsdl:types>
- <wsdl:message name="validateByTextInRootRequest">
- <wsdl:part name="parameters" element="ns:validateByTextInRoot" />
- </wsdl:message>
- <wsdl:message name="validateByTextInRootResponse">
- <wsdl:part name="parameters" element="ns:validateByTextInRootResponse" />
- </wsdl:message>
- <wsdl:message name="validateByTextInRootException">
- <wsdl:part name="parameters" element="ns:validateByTextInRootException" />
- </wsdl:message>
- <wsdl:message name="validateByDNSEntryRequest">
- <wsdl:part name="parameters" element="ns:validateByDNSEntry" />
- </wsdl:message>
- <wsdl:message name="validateByDNSEntryResponse">
- <wsdl:part name="parameters" element="ns:validateByDNSEntryResponse" />
- </wsdl:message>
- <wsdl:message name="validateByDNSEntryException">
- <wsdl:part name="parameters" element="ns:validateByDNSEntryException" />
- </wsdl:message>
- <wsdl:message name="getDomainValidationKeyRequest">
- <wsdl:part name="parameters" element="ns:getDomainValidationKey" />
- </wsdl:message>
- <wsdl:message name="getDomainValidationKeyResponse">
- <wsdl:part name="parameters" element="ns:getDomainValidationKeyResponse" />
- </wsdl:message>
- <wsdl:message name="getDomainValidationKeyException">
- <wsdl:part name="parameters" element="ns:getDomainValidationKeyException" />
- </wsdl:message>
- <wsdl:portType name="ValidateDomainServicePortType">
- <wsdl:operation name="validateByTextInRoot">
- <wsdl:input message="ns:validateByTextInRootRequest" wsaw:Action="urn:validateByTextInRoot" />
- <wsdl:output message="ns:validateByTextInRootResponse" wsaw:Action="urn:validateByTextInRootResponse" />
- <wsdl:fault message="ns:validateByTextInRootException" name="validateByTextInRootException" wsaw:Action="urn:validateByTextInRootvalidateByTextInRootException" />
- </wsdl:operation>
- <wsdl:operation name="validateByDNSEntry">
- <wsdl:input message="ns:validateByDNSEntryRequest" wsaw:Action="urn:validateByDNSEntry" />
- <wsdl:output message="ns:validateByDNSEntryResponse" wsaw:Action="urn:validateByDNSEntryResponse" />
- <wsdl:fault message="ns:validateByDNSEntryException" name="validateByDNSEntryException" wsaw:Action="urn:validateByDNSEntryvalidateByDNSEntryException" />
- </wsdl:operation>
- <wsdl:operation name="getDomainValidationKey">
- <wsdl:input message="ns:getDomainValidationKeyRequest" wsaw:Action="urn:getDomainValidationKey" />
- <wsdl:output message="ns:getDomainValidationKeyResponse" wsaw:Action="urn:getDomainValidationKeyResponse" />
- <wsdl:fault message="ns:getDomainValidationKeyException" name="getDomainValidationKeyException" wsaw:Action="urn:getDomainValidationKeygetDomainValidationKeyException" />
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="ValidateDomainServiceSoap11Binding" type="ns:ValidateDomainServicePortType">
- <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:operation name="validateByTextInRoot">
- <soap:operation soapAction="urn:validateByTextInRoot" style="document" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="validateByTextInRootException">
- <soap:fault use="literal" name="validateByTextInRootException" />
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="validateByDNSEntry">
- <soap:operation soapAction="urn:validateByDNSEntry" style="document" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="validateByDNSEntryException">
- <soap:fault use="literal" name="validateByDNSEntryException" />
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="getDomainValidationKey">
- <soap:operation soapAction="urn:getDomainValidationKey" style="document" />
- <wsdl:input>
- <soap:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="getDomainValidationKeyException">
- <soap:fault use="literal" name="getDomainValidationKeyException" />
- </wsdl:fault>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:binding name="ValidateDomainServiceSoap12Binding" type="ns:ValidateDomainServicePortType">
- <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdl:operation name="validateByTextInRoot">
- <soap12:operation soapAction="urn:validateByTextInRoot" style="document" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="validateByTextInRootException">
- <soap12:fault use="literal" name="validateByTextInRootException" />
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="validateByDNSEntry">
- <soap12:operation soapAction="urn:validateByDNSEntry" style="document" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="validateByDNSEntryException">
- <soap12:fault use="literal" name="validateByDNSEntryException" />
- </wsdl:fault>
- </wsdl:operation>
- <wsdl:operation name="getDomainValidationKey">
- <soap12:operation soapAction="urn:getDomainValidationKey" style="document" />
- <wsdl:input>
- <soap12:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <soap12:body use="literal" />
- </wsdl:output>
- <wsdl:fault name="getDomainValidationKeyException">
- <soap12:fault use="literal" name="getDomainValidationKeyException" />
- </wsdl:fault>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:binding name="ValidateDomainServiceHttpBinding" type="ns:ValidateDomainServicePortType">
- <http:binding verb="POST" />
- <wsdl:operation name="validateByTextInRoot">
- <http:operation location="validateByTextInRoot" />
- <wsdl:input>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="validateByDNSEntry">
- <http:operation location="validateByDNSEntry" />
- <wsdl:input>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getDomainValidationKey">
- <http:operation location="getDomainValidationKey" />
- <wsdl:input>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:input>
- <wsdl:output>
- <mime:content type="text/xml" part="parameters" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="ValidateDomainService">
- <wsdl:port name="ValidateDomainServiceHttpsSoap11Endpoint" binding="ns:ValidateDomainServiceSoap11Binding">
- <soap:address location="https://192.168.1.100:9443/services/ValidateDomainService.ValidateDomainServiceHttpsSoap11Endpoint/" />
- </wsdl:port>
- <wsdl:port name="ValidateDomainServiceHttpsSoap12Endpoint" binding="ns:ValidateDomainServiceSoap12Binding">
- <soap12:address location="https://192.168.1.100:9443/services/ValidateDomainService.ValidateDomainServiceHttpsSoap12Endpoint/" />
- </wsdl:port>
- <wsdl:port name="ValidateDomainServiceHttpsEndpoint" binding="ns:ValidateDomainServiceHttpBinding">
- <http:address location="https://192.168.1.100:9443/services/ValidateDomainService.ValidateDomainServiceHttpsEndpoint/" />
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/org/wso2/carbon/validate/domain/ui/i18n/JSResources.properties
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/org/wso2/carbon/validate/domain/ui/i18n/JSResources.properties b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/org/wso2/carbon/validate/domain/ui/i18n/JSResources.properties
deleted file mode 100644
index 7052880..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/org/wso2/carbon/validate/domain/ui/i18n/JSResources.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-validation.fail.with.text=Domain ownership validation failed. Make sure you have put the exact text content mentioned here in the web root.
-validation.success.with.text=Domain ownership validation succeeded.
-validation.fail.with.dns=Domain ownership validation failed. Note it may take sometime to propagate the changes in DNS. Please retry after a little break.
-validation.success.with.dns=Domain ownership validation succeeded.
-domain.empty=The domain to validate ownership is empty.
-domain.unavailable=The domain is already registered. Please choose a different domain.
-session.timed.out=Your session timed out. Please login again.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/org/wso2/carbon/validate/domain/ui/i18n/Resources.properties
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/org/wso2/carbon/validate/domain/ui/i18n/Resources.properties b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/org/wso2/carbon/validate/domain/ui/i18n/Resources.properties
deleted file mode 100644
index fc77420..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/org/wso2/carbon/validate/domain/ui/i18n/Resources.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-domain.ownership.validation=Domain Ownership Validation
-validate.domain.menu=Validate Domain
-validate=Validate
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/css/validate_domain.css
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/css/validate_domain.css b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/css/validate_domain.css
deleted file mode 100644
index 7b83d63..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/css/validate_domain.css
+++ /dev/null
@@ -1,31 +0,0 @@
-div#validation-introduction {
- margin: 5px;
-}
-
-div#with-text {
- margin: 5px;
-}
-
-div#with-dns {
- margin: 5px;
-}
-p {
- padding:5px !important;
-}
-
-p.validate-button {
- padding: 15px 5px 15px 5px !important;
-}
-
-li.catagory {
- padding: 5px 0px 5px 25px !important;
-}
-
-
-
-div.conf-info {
- background: #cccccc !important;
- border: 1px solid #111 !important;
- margin: 5px !important;
- padding: 2px !important;
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/docs/images/domain-validation.png
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/docs/images/domain-validation.png b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/docs/images/domain-validation.png
deleted file mode 100644
index 382dfdb..0000000
Binary files a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/docs/images/domain-validation.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/docs/userguide.html
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/docs/userguide.html b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/docs/userguide.html
deleted file mode 100644
index 204c14a..0000000
--- a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/docs/userguide.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--
- ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- ~
- ~ WSO2 Inc. 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.
- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <title>Validate Domain Ownership - User Guide</title>
- <link href="../../admin/css/documentation.css" rel="stylesheet" type="text/css" media="all" />
-</head>
-
-<body>
-<h1>Validate Domain Ownership</h1>
-
-<p>
-You can validate the ownership of your domain using two methods,
- <ul>
- <li>Creating a text file in the domain web ROOT </li>
- <li>Setting up a CNAME entry in your DNS</li>
- </ul>
-
-</p>
-
-
-<p>Instructions are shown in the following form.</p>
-
-<p>
-<img src="images/domain-validation.png" alt="Validation domain ownership"/>
-<div><strong>Figure1: Validate domain Ownership</strong></div>
-</p>
-
-</body>
-
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/ajax-loader.gif
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/ajax-loader.gif b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/ajax-loader.gif
deleted file mode 100644
index f2a1bc0..0000000
Binary files a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/ajax-loader.gif and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/right.gif
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/right.gif b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/right.gif
deleted file mode 100644
index 72a64c9..0000000
Binary files a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/right.gif and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/a875aabb/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/wrong.gif
----------------------------------------------------------------------
diff --git a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/wrong.gif b/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/wrong.gif
deleted file mode 100644
index 77e1f2c..0000000
Binary files a/components/stratos/domain-validator/org.wso2.carbon.validate.domain.ui/2.1.0/src/main/resources/web/validate-domain/images/wrong.gif and /dev/null differ