View Javadoc

1   /**
2    * Copyright 2005-2013 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.framework.country;
17  
18  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
19  import org.kuali.rice.krad.bo.ExternalizableBusinessObject;
20  import org.kuali.rice.location.api.country.CountryContract;
21  
22  /**
23   * TODO: Likely should remove all methods from this interface after KULRICE-7170 is fixed
24   */
25  public interface CountryEbo extends CountryContract, ExternalizableBusinessObject, MutableInactivatable {
26      
27      /**
28       * {@inheritDoc}
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      @Override
35      String getCode();
36  
37      /**
38       * An alternative country code to represent a country. This code correlats directly to the alpha-3 codes
39       * from the ISO_3166-1-alpha-3 standard.
40       * <p>This property is optional</p>
41       *
42       * @return The alternate country code if it exists.  null is returned if an alternate code does not exist.
43       */
44      String getAlternateCode();
45  
46      /**
47       * A full, familiar, name of a country.
48       * <p>This property is optional</p>
49       *
50       * @return The name of a country if it exists.  null is returned if a full name does not exist.
51       */
52      String getName();
53  
54      /**
55       * Value representing whether a country is restricted.
56       * <p>The meaning of restricted for a country varies depending upon the implementer - for instance if a country
57       * may not be used in the address of a Vendor.</p>
58       *
59       * <p>The default value of this property is false.</p>
60       *
61       * @return if a country is restricted.
62       */
63      boolean isRestricted();
64  
65      /**
66       * Returns the version number for this object.  In general, this value should only
67       * be null if the object has not yet been stored to a persistent data store.
68       * This version number is generally used for the purposes of optimistic locking.
69       * 
70       * @return the version number, or null if one has not been assigned yet
71       */
72      Long getVersionNumber();
73      
74      /**
75       * The active indicator for an object.
76       *
77       * @return true if active false if not.
78       */
79      boolean isActive();
80      
81      /**
82       * Sets the record to active or inactive.
83       */
84      void setActive(boolean active);
85  }