1 /** 2 * Copyright 2005-2015 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.rice.location.api.country; 17 18 import org.kuali.rice.core.api.mo.common.Coded; 19 import org.kuali.rice.core.api.mo.common.Versioned; 20 import org.kuali.rice.core.api.mo.common.active.Inactivatable; 21 22 /** 23 * Contract for a Country. Country is a basic abstraction over a Country, encapsulating its name, country code, 24 * postal code, and if its restricted or not 25 * 26 * @author Kuali Rice Team (rice.collab@kuali.org) 27 */ 28 public interface CountryContract extends Versioned, Inactivatable, Coded { 29 30 /** 31 * {@inheritDoc} 32 * 33 * An abbreviated String representing the unique identifying code for a given country. This code correlates 34 * directly to the alpha-2 country codes from the ISO-3166-1-alpha-2 standard. 35 * <p>This property is required to exist.</p> 36 */ 37 @Override 38 String getCode(); 39 40 /** 41 * An alternative country code to represent a country. This code correlats directly to the alpha-3 codes 42 * from the ISO_3166-1-alpha-3 standard. 43 * <p>This property is optional</p> 44 * 45 * @return The alternate country code if it exists. null is returned if an alternate code does not exist. 46 */ 47 String getAlternateCode(); 48 49 /** 50 * A full, familiar, name of a country. 51 * <p>This property is optional</p> 52 * 53 * @return The name of a country if it exists. null is returned if a full name does not exist. 54 */ 55 String getName(); 56 57 /** 58 * Value representing whether a country is restricted. 59 * <p>The meaning of restricted for a country varies depending upon the implementer - for instance if a country 60 * may not be used in the address of a Vendor.</p> 61 * 62 * <p>The default value of this property is false.</p> 63 * 64 * @return if a country is restricted. 65 */ 66 boolean isRestricted(); 67 }