Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CountryContract |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2006-2011 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 | ||
17 | package org.kuali.rice.shareddata.api.country; | |
18 | ||
19 | import org.kuali.rice.core.api.mo.common.Coded; | |
20 | import org.kuali.rice.core.api.mo.common.Versioned; | |
21 | import org.kuali.rice.core.api.mo.common.active.ImmutableInactivatable; | |
22 | ||
23 | /** | |
24 | * Contract for a Country. Country is a basic abstraction over a Country, encapsulating its name, country code, | |
25 | * postal code, and if its restricted or not | |
26 | */ | |
27 | public interface CountryContract extends Versioned, ImmutableInactivatable, Coded { | |
28 | ||
29 | /** | |
30 | * An abbreviated String representing the unique identifying code for a given country. This code correlates | |
31 | * directly to the alpha-2 country codes from the ISO-3166-1-alpha-2 standard. | |
32 | * <p>This property is required to exist.</p> | |
33 | * | |
34 | * @return The country code for this Country. | |
35 | */ | |
36 | @Override | |
37 | String getCode(); | |
38 | ||
39 | /** | |
40 | * An alternative country code to represent a country. This code correlats directly to the alpha-3 codes | |
41 | * from the ISO_3166-1-alpha-3 standard. | |
42 | * <p>This property is optional</p> | |
43 | * | |
44 | * @return The alternate country code if it exists. null is returned if an alternate code does not exist. | |
45 | */ | |
46 | String getAlternateCode(); | |
47 | ||
48 | /** | |
49 | * A full, familiar, name of a country. | |
50 | * <p>This property is optional</p> | |
51 | * | |
52 | * @return The name of a country if it exists. null is returned if a full name does not exist. | |
53 | */ | |
54 | String getName(); | |
55 | ||
56 | /** | |
57 | * Value representing whether a country is restricted. | |
58 | * <p>The meaning of restricted for a country varies depending upon the implementer - for instance if a country | |
59 | * may not be used in the address of a Vendor.</p> | |
60 | * | |
61 | * <p>The default value of this property is false.</p> | |
62 | * @return if a country is restricted. | |
63 | */ | |
64 | boolean isRestricted(); | |
65 | } |