001/** 002 * Copyright 2005-2018 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.kim.api.identity.type; 017 018 019import org.kuali.rice.core.api.mo.common.GloballyUnique; 020import org.kuali.rice.core.api.mo.common.Versioned; 021import org.kuali.rice.core.api.mo.common.active.Inactivatable; 022import org.kuali.rice.kim.api.identity.CodedAttributeContract; 023import org.kuali.rice.kim.api.identity.address.EntityAddressContract; 024import org.kuali.rice.kim.api.identity.email.EntityEmailContract; 025import org.kuali.rice.kim.api.identity.phone.EntityPhoneContract; 026 027import java.util.List; 028/** 029 * This is a contract for EntityTypeContactInfo. 030 * 031 * @author Kuali Rice Team (rice.collab@kuali.org) 032 */ 033 034public interface EntityTypeContactInfoContract extends Versioned, GloballyUnique, Inactivatable { 035 /** 036 * Gets the id of the parent identity object. 037 * @return the identity id for this {@link EntityAddressContract} 038 */ 039 String getEntityId(); 040 041 /** 042 * Gets this entityTypeCode of the {@link EntityAddressContract}'s object. 043 * @return the identity type code for this {@link EntityAddressContract} 044 */ 045 String getEntityTypeCode(); 046 047 /** 048 * Gets this identity Type of the {@link EntityTypeContactInfoContract}'s object. 049 * @return the identity type for this {@link EntityTypeContactInfoContract} 050 */ 051 CodedAttributeContract getEntityType(); 052 053 /** 054 * Gets this {@link EntityTypeContactInfoContract}'s List of {@link org.kuali.rice.kim.api.identity.address.EntityAddress}S. 055 * @return the List of {@link org.kuali.rice.kim.api.identity.address.EntityAddressContract}S for this {@link EntityTypeContactInfoContract}. 056 * The returned List will never be null, an empty List will be assigned and returned if needed. 057 */ 058 List<? extends EntityAddressContract> getAddresses(); 059 060 /** 061 * Gets this {@link EntityTypeContactInfoContract}'s List of {@link org.kuali.rice.kim.api.identity.email.EntityEmailContract}S. 062 * @return the List of {@link org.kuali.rice.kim.api.identity.email.EntityEmailContract}S for this {@link EntityTypeContactInfoContract}. 063 * The returned List will never be null, an empty List will be assigned and returned if needed. 064 */ 065 List<? extends EntityEmailContract> getEmailAddresses(); 066 067 /** 068 * Gets this {@link EntityTypeContactInfoContract}'s List of {@link org.kuali.rice.kim.api.identity.phone.EntityPhone}S. 069 * @return the List of {@link org.kuali.rice.kim.api.identity.phone.EntityPhoneContract}S for this {@link EntityTypeContactInfoContract}. 070 * The returned List will never be null, an empty List will be assigned and returned if needed. 071 */ 072 List<? extends EntityPhoneContract> getPhoneNumbers(); 073 074 /** 075 * Returns the default address record for the identity. If no default is defined, then 076 * it returns the first one found. If none are defined, it returns null. 077 */ 078 EntityAddressContract getDefaultAddress(); 079 080 /** 081 * Returns the default email record for the identity. If no default is defined, then 082 * it returns the first one found. If none are defined, it returns null. 083 */ 084 EntityEmailContract getDefaultEmailAddress(); 085 086 /** 087 * Returns the default phone record for the identity. If no default is defined, then 088 * it returns the first one found. If none are defined, it returns null. 089 */ 090 EntityPhoneContract getDefaultPhoneNumber(); 091}