| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Name |
|
| 0.0;0 | ||||
| Name$Field |
|
| 0.0;0 |
| 1 | /* | |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one | |
| 3 | * or more contributor license agreements. See the NOTICE file | |
| 4 | * distributed with this work for additional information | |
| 5 | * regarding copyright ownership. The ASF licenses this file | |
| 6 | * to you under the Apache License, Version 2.0 (the | |
| 7 | * "License"); you may not use this file except in compliance | |
| 8 | * with the License. You may obtain a copy of the License at | |
| 9 | * | |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 11 | * | |
| 12 | * Unless required by applicable law or agreed to in writing, | |
| 13 | * software distributed under the License is distributed on an | |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| 15 | * KIND, either express or implied. See the License for the | |
| 16 | * specific language governing permissions and limitations under the License. | |
| 17 | */ | |
| 18 | package org.apache.shindig.social.opensocial.model; | |
| 19 | ||
| 20 | import org.apache.shindig.social.core.model.NameImpl; | |
| 21 | ||
| 22 | import com.google.inject.ImplementedBy; | |
| 23 | ||
| 24 | /** | |
| 25 | * Base interface for all name objects. | |
| 26 | * see | |
| 27 | * http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Name.Field.html | |
| 28 | * | |
| 29 | */ | |
| 30 | ||
| 31 | @ImplementedBy(NameImpl.class) | |
| 32 | @Exportablebean | |
| 33 | public interface Name { | |
| 34 | ||
| 35 | /** | |
| 36 | * An enumeration of fields in the json name object. | |
| 37 | */ | |
| 38 | 1 | public static enum Field { |
| 39 | /** | |
| 40 | * The additional name. | |
| 41 | */ | |
| 42 | 1 | ADDITIONAL_NAME("additionalName"), |
| 43 | /** | |
| 44 | * The family name. | |
| 45 | */ | |
| 46 | 1 | FAMILY_NAME("familyName"), |
| 47 | /** | |
| 48 | * The given name. | |
| 49 | */ | |
| 50 | 1 | GIVEN_NAME("givenName"), |
| 51 | /** | |
| 52 | * The honorific prefix. | |
| 53 | */ | |
| 54 | 1 | HONORIFIC_PREFIX("honorificPrefix"), |
| 55 | /** | |
| 56 | * The honorific suffix. | |
| 57 | */ | |
| 58 | 1 | HONORIFIC_SUFFIX("honorificSuffix"), |
| 59 | /** | |
| 60 | * The unstructured name. | |
| 61 | */ | |
| 62 | 1 | UNSTRUCTURED("unstructured"); |
| 63 | ||
| 64 | /** | |
| 65 | * the json key for this field. | |
| 66 | */ | |
| 67 | private final String jsonString; | |
| 68 | ||
| 69 | /** | |
| 70 | * Construct the a field enum. | |
| 71 | * @param jsonString the json key for the field. | |
| 72 | */ | |
| 73 | 6 | private Field(String jsonString) { |
| 74 | 6 | this.jsonString = jsonString; |
| 75 | 6 | } |
| 76 | ||
| 77 | /** | |
| 78 | * {@inheritDoc} | |
| 79 | * @see java.lang.Enum#toString() | |
| 80 | */ | |
| 81 | @Override | |
| 82 | public String toString() { | |
| 83 | 2 | return this.jsonString; |
| 84 | } | |
| 85 | } | |
| 86 | ||
| 87 | /** | |
| 88 | * @return the name, unstructured. | |
| 89 | */ | |
| 90 | String getUnstructured(); | |
| 91 | ||
| 92 | /** | |
| 93 | * set the name unstructured. | |
| 94 | * @param unstructured the name, unstructured. | |
| 95 | */ | |
| 96 | void setUnstructured(String unstructured); | |
| 97 | ||
| 98 | /** | |
| 99 | * @return get the additional name. | |
| 100 | */ | |
| 101 | String getAdditionalName(); | |
| 102 | ||
| 103 | /** | |
| 104 | * @param additionalName set the additional name. | |
| 105 | */ | |
| 106 | void setAdditionalName(String additionalName); | |
| 107 | ||
| 108 | /** | |
| 109 | * @return the family name. | |
| 110 | */ | |
| 111 | String getFamilyName(); | |
| 112 | ||
| 113 | /** | |
| 114 | * @param familyName the family name being set. | |
| 115 | */ | |
| 116 | void setFamilyName(String familyName); | |
| 117 | ||
| 118 | /** | |
| 119 | * @return the given name. | |
| 120 | */ | |
| 121 | String getGivenName(); | |
| 122 | ||
| 123 | /** | |
| 124 | * @param givenName the given name to be set. | |
| 125 | */ | |
| 126 | void setGivenName(String givenName); | |
| 127 | ||
| 128 | /** | |
| 129 | * @return the honorific prefix. | |
| 130 | */ | |
| 131 | String getHonorificPrefix(); | |
| 132 | ||
| 133 | /** | |
| 134 | * @param honorificPrefix the honorific prefix to be set. | |
| 135 | */ | |
| 136 | void setHonorificPrefix(String honorificPrefix); | |
| 137 | ||
| 138 | /** | |
| 139 | * @return the honorific suffix. | |
| 140 | */ | |
| 141 | String getHonorificSuffix(); | |
| 142 | ||
| 143 | /** | |
| 144 | * @param honorificSuffix the honorific suffix to set. | |
| 145 | */ | |
| 146 | void setHonorificSuffix(String honorificSuffix); | |
| 147 | } |