/*
 * Copyright (c) 2020, 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.stratos.common.constants;

public class TenantConstants {

    /**
     * Enum for error messages.
     */
    public enum ErrorMessage {

        ERROR_CODE_EMPTY_EMAIL("100001",
                "Provided email is empty."),
        ERROR_CODE_ILLEGAL_EMAIL("100002",
                "Wrong characters in the email."),
        ERROR_CODE_INVALID_EMAIL("100003",
                "Invalid email address is provided."),
        ERROR_CODE_UNAVAILABLE_DOMAIN("100004", "You can not use a registry reserved word: %s as a tenant domain. " +
                "Please choose a different one."),
        ERROR_CODE_EMPTY_DOMAIN_NAME("100004",
                "Provided domain name is empty."),
        ERROR_CODE_EMPTY_EXTENSION("100005",
                "You should have an extension to your domain."),
        ERROR_CODE_INVALID_DOMAIN("100006",
                "Invalid domain. Domain should not start with '.'"),
        ERROR_CODE_ILLEGAL_CHARACTERS_IN_DOMAIN("100007",
                "The tenant domain %s contains one or more illegal characters. The valid characters are lowercase " +
                        "letters, numbers, '.', '-' and '_'."),
        ERROR_CODE_EXISTING_USER_NAME("100008",
                "User name : %s exists in the system. Please pick another user name for tenant Administrator."),
        ERROR_CODE_EXISTING_DOMAIN("100009",
                "A tenant with same domain %s already exist. Please use a different domain name.");

        private final String code;
        private final String message;

        ErrorMessage(String code, String message) {

            this.code = code;
            this.message = message;
        }

        public String getCode() {
            return code;
        }

        public String getMessage() {
            return message;
        }
    }
}

@@ -862,14 +862,16 @@
 IL(%22
-1
+TM-6
 0000
-1
 %22,%0A 
@@ -952,14 +952,16 @@
 IL(%22
-100002
+TM-60001
 %22,%0A 
@@ -1048,14 +1048,16 @@
 IL(%22
-100003
+TM-60002
 %22,%0A 
@@ -1149,22 +1149,24 @@
 DOMAIN(%22
-100004
+TM-60003
 %22, %22You 
@@ -1201,20 +1201,16 @@
 ved word
-: %25s
  as a te
@@ -1315,18 +1315,20 @@
 N_NAME(%22
-10
+TM-6
 0004%22,%0A 
@@ -1413,18 +1413,20 @@
 ENSION(%22
-10
+TM-6
 0005%22,%0A 
@@ -1524,18 +1524,20 @@
 DOMAIN(%22
-10
+TM-6
 0006%22,%0A 
@@ -1653,18 +1653,20 @@
 DOMAIN(%22
-10
+TM-6
 0007%22,%0A 
@@ -1885,18 +1885,20 @@
 R_NAME(%22
-10
+TM-6
 0008%22,%0A 
@@ -2049,10 +2049,12 @@
 IN(%22
-10
+TM-6
 0009

Change error codes