001    /**
002     * Copyright 2005-2012 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     */
016    package org.kuali.rice.location.framework.country;
017    
018    import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
019    import org.kuali.rice.krad.bo.ExternalizableBusinessObject;
020    import org.kuali.rice.location.api.country.CountryContract;
021    
022    /**
023     * TODO: Likely should remove all methods from this interface after KULRICE-7170 is fixed
024     */
025    public interface CountryEbo extends CountryContract, ExternalizableBusinessObject, MutableInactivatable {
026        
027        /**
028         * {@inheritDoc}
029         *
030         * An abbreviated String representing the unique identifying code for a given country.  This code correlates
031         * directly to the alpha-2 country codes from the ISO-3166-1-alpha-2 standard.
032         * <p>This property is required to exist.</p>
033         */
034        @Override
035        String getCode();
036    
037        /**
038         * An alternative country code to represent a country. This code correlats directly to the alpha-3 codes
039         * from the ISO_3166-1-alpha-3 standard.
040         * <p>This property is optional</p>
041         *
042         * @return The alternate country code if it exists.  null is returned if an alternate code does not exist.
043         */
044        String getAlternateCode();
045    
046        /**
047         * A full, familiar, name of a country.
048         * <p>This property is optional</p>
049         *
050         * @return The name of a country if it exists.  null is returned if a full name does not exist.
051         */
052        String getName();
053    
054        /**
055         * Value representing whether a country is restricted.
056         * <p>The meaning of restricted for a country varies depending upon the implementer - for instance if a country
057         * may not be used in the address of a Vendor.</p>
058         *
059         * <p>The default value of this property is false.</p>
060         *
061         * @return if a country is restricted.
062         */
063        boolean isRestricted();
064    
065        /**
066         * Returns the version number for this object.  In general, this value should only
067         * be null if the object has not yet been stored to a persistent data store.
068         * This version number is generally used for the purposes of optimistic locking.
069         * 
070         * @return the version number, or null if one has not been assigned yet
071         */
072        Long getVersionNumber();
073        
074        /**
075         * The active indicator for an object.
076         *
077         * @return true if active false if not.
078         */
079        boolean isActive();
080        
081        /**
082         * Sets the record to active or inactive.
083         */
084        void setActive(boolean active);
085    }