/*
 * @(#)EmailInspectionLevel.java
 *
 * Copyright (c) JSCAPE LLC.
 *
 * This software is the confidential and proprietary information of
 * JScape. ("Confidential Information").  You shall not disclose such
 * Confidential Information and shall use it only in accordance with
 * the terms of the license agreement you entered into with JSCAPE.
 */

package com.jscape.inspect;

import java.io.Serializable;

/**
 * Used to control the level of validation performed for an email address.
 */

public class EmailInspectionLevel
        implements Serializable {

    /**
     * Checks for valid syntax of email address.
     */
    public static final int SYNTAX_VALIDATION = 1;

    /**
     * Checks for valid syntax and internet domain of email address.
     */
    public static final int DOMAIN_VALIDATION = 2;

    /**
     * Checks for valid syntax, internet domain and valid mail server of email address.
     */
    public static final int MX_VALIDATION = 3;

    /**
     * Checks for valid syntax, internet domain, mail server and user account of email address.
     */
    public static final int USER_VALIDATION = 4;

    /**
     * Level.
     */
    private int level;

    /**
     * Creates a new EmailInspectionLevel instance.
     *
     * @param level a value between 1 and 4 where 1 is SYNTAX_VALIDATION and 4 is USER_VALIDATION
     *
     * @see #SYNTAX_VALIDATION
     * @see #DOMAIN_VALIDATION
     * @see #MX_VALIDATION
     * @see #USER_VALIDATION
     */
    protected EmailInspectionLevel(int level) {
        this.level = level;
    }

    /**
     * Gets current inspection level.
     *
     * @return a value between 1 and 4 where 1 is SYNTAX_VALIDATION and 4 is USER_VALIDATION
     *
     * @see #SYNTAX_VALIDATION
     * @see #DOMAIN_VALIDATION
     * @see #MX_VALIDATION
     * @see #USER_VALIDATION
     */
    public int getLevel() {
        return level;
    }
}

