001 /** 002 * Copyright 2005-2014 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.kim.api.identity.name; 017 018 import org.joda.time.DateTime; 019 import org.kuali.rice.core.api.mo.common.Defaultable; 020 import org.kuali.rice.core.api.mo.common.GloballyUnique; 021 import org.kuali.rice.core.api.mo.common.Identifiable; 022 import org.kuali.rice.core.api.mo.common.Versioned; 023 import org.kuali.rice.core.api.mo.common.active.Inactivatable; 024 import org.kuali.rice.kim.api.identity.CodedAttributeContract; 025 026 import java.util.Date; 027 /** 028 * This contract represents the name information associated with an Entity. 029 * 030 * @author Kuali Rice Team (rice.collab@kuali.org) 031 */ 032 public interface EntityNameContract extends Versioned, GloballyUnique, Defaultable, Inactivatable, Identifiable { 033 public static final String NAME_CHANGED_DATE_FORMAT = "yyyy-MM-dd"; 034 035 /** 036 * Gets this {@link Entity}'s id. 037 * @return the id for this {@link EntityNameContract}, or null if none has been assigned. 038 */ 039 String getEntityId(); 040 041 /** 042 * Gets this {@link EntityNameContract}'s TypeContract. 043 * @return the type for this {@link EntityNameContract}, or null if none has been assigned. 044 */ 045 CodedAttributeContract getNameType(); 046 047 /** 048 * Gets this {@link EntityNameContract}'s first name. 049 * @return the first name for this {@link EntityNameContract}, or null if none has been assigned. 050 */ 051 String getFirstName(); 052 053 /** 054 * Gets this {@link EntityNameContract}'s unmasked first name. 055 * @return the unmasked first name for this {@link EntityNameContract}, or null if none has been assigned. 056 */ 057 String getFirstNameUnmasked(); 058 059 /** 060 * Gets this {@link EntityNameContract}'s middle name. 061 * @return the middle name for this {@link EntityNameContract}, or null if none has been assigned. 062 */ 063 String getMiddleName(); 064 065 /** 066 * Gets this {@link EntityNameContract}'s unmasked middle name. 067 * @return the unmasked middle name for this {@link EntityNameContract}, or null if none has been assigned. 068 */ 069 String getMiddleNameUnmasked(); 070 071 /** 072 * Gets this {@link EntityNameContract}'s last name. 073 * @return the last name for this {@link EntityNameContract}, or null if none has been assigned. 074 */ 075 String getLastName(); 076 077 /** 078 * Gets this {@link EntityNameContract}'s unmasked last name. 079 * @return the unmasked last name for this {@link EntityNameContract}, or null if none has been assigned. 080 */ 081 String getLastNameUnmasked(); 082 083 /** 084 * Gets this {@link EntityNameContract}'s name prefix. 085 * Corresponds to PESC NamePrefix. 086 * @return the name prefix for this {@link EntityNameContract}, or null if none has been assigned. 087 */ 088 String getNamePrefix(); 089 090 /** 091 * Gets this {@link EntityNameContract}'s unmasked name prefix. 092 * Corresponds to PESC NamePrefix. 093 * @return the unmasked name prefix for this {@link EntityNameContract}, or null if none has been assigned. 094 */ 095 String getNamePrefixUnmasked(); 096 097 /** 098 * Gets this {@link EntityNameContract}'s name title. 099 * Corresponds to PESC NameTitle. 100 * @return the name title for this {@link EntityNameContract}, or null if none has been assigned. 101 */ 102 String getNameTitle(); 103 104 /** 105 * Gets this {@link EntityNameContract}'s unmasked name title. 106 * Corresponds to PESC NameTitle. 107 * @return the unmasked name title for this {@link EntityNameContract}, or null if none has been assigned. 108 */ 109 String getNameTitleUnmasked(); 110 111 112 /** 113 * Gets this {@link EntityNameContract}'s suffix. 114 * Corresponds to PESC NameSuffix. 115 * @return the suffix for this {@link EntityNameContract}, or null if none has been assigned. 116 */ 117 String getNameSuffix(); 118 119 /** 120 * Gets this {@link EntityNameContract}'s unmasked suffix. 121 * Corresponds to PESC NameSuffix. 122 * @return the unmasked suffix for this {@link EntityNameContract}, or null if none has been assigned. 123 */ 124 String getNameSuffixUnmasked(); 125 126 /** 127 * Return the entire name as the person or system wants it displayed. 128 * Corresponds to PESC CompositeName. 129 * @return the complete name in the format of "lastName, firstName middleName" 130 */ 131 String getCompositeName(); 132 133 /** 134 * Gets this {@link EntityNameContract}'s unmasked formatted name. 135 * Corresponds to PESC CompositeName. 136 * @return the complete name in the format of "lastName, firstName middleName" 137 */ 138 String getCompositeNameUnmasked(); 139 140 /** 141 * Get the note associated with this {@link EntityNameContract} 142 * Corresponds to PESC NoteMessage 143 * @return the message associated with this EntityName 144 */ 145 String getNoteMessage(); 146 147 /** 148 * Get the name change date {@link EntityNameContract} 149 * Corresponds to PESC name changed date 150 * @return the name change date of this EntityName 151 */ 152 DateTime getNameChangedDate(); 153 154 /** 155 * Returns a boolean value that determines if email fields should be suppressed. 156 * @return boolean value that determines if email should be suppressed. 157 */ 158 boolean isSuppressName(); 159 }