| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| EntityNameContract |
|
| 1.0;1 |
| 1 | /** | |
| 2 | * Copyright 2005-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 | package org.kuali.rice.kim.api.identity.name; | |
| 17 | ||
| 18 | import org.joda.time.DateTime; | |
| 19 | import org.kuali.rice.core.api.mo.common.Defaultable; | |
| 20 | import org.kuali.rice.core.api.mo.common.GloballyUnique; | |
| 21 | import org.kuali.rice.core.api.mo.common.Identifiable; | |
| 22 | import org.kuali.rice.core.api.mo.common.Versioned; | |
| 23 | import org.kuali.rice.core.api.mo.common.active.Inactivatable; | |
| 24 | import org.kuali.rice.kim.api.identity.CodedAttributeContract; | |
| 25 | ||
| 26 | import java.util.Date; | |
| 27 | ||
| 28 | public interface EntityNameContract extends Versioned, GloballyUnique, Defaultable, Inactivatable, Identifiable { | |
| 29 | public static final String NAME_CHANGED_DATE_FORMAT = "yyyy-MM-dd"; | |
| 30 | ||
| 31 | /** | |
| 32 | * Gets this {@link Entity}'s id. | |
| 33 | * @return the id for this {@link EntityNameContract}, or null if none has been assigned. | |
| 34 | */ | |
| 35 | String getEntityId(); | |
| 36 | ||
| 37 | /** | |
| 38 | * Gets this {@link EntityNameContract}'s TypeContract. | |
| 39 | * @return the type for this {@link EntityNameContract}, or null if none has been assigned. | |
| 40 | */ | |
| 41 | CodedAttributeContract getNameType(); | |
| 42 | ||
| 43 | /** | |
| 44 | * Gets this {@link EntityNameContract}'s first name. | |
| 45 | * @return the first name for this {@link EntityNameContract}, or null if none has been assigned. | |
| 46 | */ | |
| 47 | String getFirstName(); | |
| 48 | ||
| 49 | /** | |
| 50 | * Gets this {@link EntityNameContract}'s unmasked first name. | |
| 51 | * @return the unmasked first name for this {@link EntityNameContract}, or null if none has been assigned. | |
| 52 | */ | |
| 53 | String getFirstNameUnmasked(); | |
| 54 | ||
| 55 | /** | |
| 56 | * Gets this {@link EntityNameContract}'s middle name. | |
| 57 | * @return the middle name for this {@link EntityNameContract}, or null if none has been assigned. | |
| 58 | */ | |
| 59 | String getMiddleName(); | |
| 60 | ||
| 61 | /** | |
| 62 | * Gets this {@link EntityNameContract}'s unmasked middle name. | |
| 63 | * @return the unmasked middle name for this {@link EntityNameContract}, or null if none has been assigned. | |
| 64 | */ | |
| 65 | String getMiddleNameUnmasked(); | |
| 66 | ||
| 67 | /** | |
| 68 | * Gets this {@link EntityNameContract}'s last name. | |
| 69 | * @return the last name for this {@link EntityNameContract}, or null if none has been assigned. | |
| 70 | */ | |
| 71 | String getLastName(); | |
| 72 | ||
| 73 | /** | |
| 74 | * Gets this {@link EntityNameContract}'s unmasked last name. | |
| 75 | * @return the unmasked last name for this {@link EntityNameContract}, or null if none has been assigned. | |
| 76 | */ | |
| 77 | String getLastNameUnmasked(); | |
| 78 | ||
| 79 | /** | |
| 80 | * Gets this {@link EntityNameContract}'s name prefix. | |
| 81 | * Corresponds to PESC NamePrefix. | |
| 82 | * @return the name prefix for this {@link EntityNameContract}, or null if none has been assigned. | |
| 83 | */ | |
| 84 | String getNamePrefix(); | |
| 85 | ||
| 86 | /** | |
| 87 | * Gets this {@link EntityNameContract}'s unmasked name prefix. | |
| 88 | * Corresponds to PESC NamePrefix. | |
| 89 | * @return the unmasked name prefix for this {@link EntityNameContract}, or null if none has been assigned. | |
| 90 | */ | |
| 91 | String getNamePrefixUnmasked(); | |
| 92 | ||
| 93 | /** | |
| 94 | * Gets this {@link EntityNameContract}'s name title. | |
| 95 | * Corresponds to PESC NameTitle. | |
| 96 | * @return the name title for this {@link EntityNameContract}, or null if none has been assigned. | |
| 97 | */ | |
| 98 | String getNameTitle(); | |
| 99 | ||
| 100 | /** | |
| 101 | * Gets this {@link EntityNameContract}'s unmasked name title. | |
| 102 | * Corresponds to PESC NameTitle. | |
| 103 | * @return the unmasked name title for this {@link EntityNameContract}, or null if none has been assigned. | |
| 104 | */ | |
| 105 | String getNameTitleUnmasked(); | |
| 106 | ||
| 107 | ||
| 108 | /** | |
| 109 | * Gets this {@link EntityNameContract}'s suffix. | |
| 110 | * Corresponds to PESC NameSuffix. | |
| 111 | * @return the suffix for this {@link EntityNameContract}, or null if none has been assigned. | |
| 112 | */ | |
| 113 | String getNameSuffix(); | |
| 114 | ||
| 115 | /** | |
| 116 | * Gets this {@link EntityNameContract}'s unmasked suffix. | |
| 117 | * Corresponds to PESC NameSuffix. | |
| 118 | * @return the unmasked suffix for this {@link EntityNameContract}, or null if none has been assigned. | |
| 119 | */ | |
| 120 | String getNameSuffixUnmasked(); | |
| 121 | ||
| 122 | /** | |
| 123 | * Return the entire name as the person or system wants it displayed. | |
| 124 | * Corresponds to PESC CompositeName. | |
| 125 | * @return the complete name in the format of "lastName, firstName middleName" | |
| 126 | */ | |
| 127 | String getCompositeName(); | |
| 128 | ||
| 129 | /** | |
| 130 | * Gets this {@link EntityNameContract}'s unmasked formatted name. | |
| 131 | * Corresponds to PESC CompositeName. | |
| 132 | * @return the complete name in the format of "lastName, firstName middleName" | |
| 133 | */ | |
| 134 | String getCompositeNameUnmasked(); | |
| 135 | ||
| 136 | /** | |
| 137 | * Get the note associated with this {@link EntityNameContract} | |
| 138 | * Corresponds to PESC NoteMessage | |
| 139 | * @return the message associated with this EntityName | |
| 140 | */ | |
| 141 | String getNoteMessage(); | |
| 142 | ||
| 143 | /** | |
| 144 | * Get the name change date {@link EntityNameContract} | |
| 145 | * Corresponds to PESC name changed date | |
| 146 | * @return the name change date of this EntityName | |
| 147 | */ | |
| 148 | DateTime getNameChangedDate(); | |
| 149 | ||
| 150 | /** | |
| 151 | * Returns a boolean value that determines if email fields should be suppressed. | |
| 152 | * @return boolean value that determines if email should be suppressed. | |
| 153 | */ | |
| 154 | boolean isSuppressName(); | |
| 155 | } |