001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.location.api.country;
017
018import org.kuali.rice.core.api.mo.common.Coded;
019import org.kuali.rice.core.api.mo.common.Versioned;
020import org.kuali.rice.core.api.mo.common.active.Inactivatable;
021
022/**
023 * Contract for a Country. Country is a basic abstraction over a Country, encapsulating its name, country code,
024 * postal code, and if its restricted or not
025 *
026 * @author Kuali Rice Team (rice.collab@kuali.org)
027 */
028public interface CountryContract extends Versioned, Inactivatable, Coded {
029
030    /**
031     * {@inheritDoc}
032     *
033     * An abbreviated String representing the unique identifying code for a given country.  This code correlates
034     * directly to the alpha-2 country codes from the ISO-3166-1-alpha-2 standard.
035     * <p>This property is required to exist.</p>
036     */
037    @Override
038    String getCode();
039
040    /**
041     * An alternative country code to represent a country. This code correlats directly to the alpha-3 codes
042     * from the ISO_3166-1-alpha-3 standard.
043     * <p>This property is optional</p>
044     *
045     * @return The alternate country code if it exists.  null is returned if an alternate code does not exist.
046     */
047    String getAlternateCode();
048
049    /**
050     * A full, familiar, name of a country.
051     * <p>This property is optional</p>
052     *
053     * @return The name of a country if it exists.  null is returned if a full name does not exist.
054     */
055    String getName();
056
057    /**
058     * Value representing whether a country is restricted.
059     * <p>The meaning of restricted for a country varies depending upon the implementer - for instance if a country
060     * may not be used in the address of a Vendor.</p>
061     *
062     * <p>The default value of this property is false.</p>
063     *
064     * @return if a country is restricted.
065     */
066    boolean isRestricted();
067}