| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Organization |
|
| 0.0;0 | ||||
| Organization$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.OrganizationImpl; | |
| 21 | ||
| 22 | import com.google.inject.ImplementedBy; | |
| 23 | import java.util.Date; | |
| 24 | ||
| 25 | /** | |
| 26 | * Describes a current or past organizational affiliation of this contact. Service Providers that | |
| 27 | * support only a single Company Name and Job Title field should represent them with a single | |
| 28 | * organization element with name and title properties, respectively. | |
| 29 | * | |
| 30 | * see http://code.google.com/apis/opensocial/docs/0.7/reference/opensocial.Organization.Field.html | |
| 31 | * | |
| 32 | */ | |
| 33 | ||
| 34 | @ImplementedBy(OrganizationImpl.class) | |
| 35 | @Exportablebean | |
| 36 | public interface Organization { | |
| 37 | ||
| 38 | /** | |
| 39 | * An Enumeration of field names for Organization. | |
| 40 | */ | |
| 41 | 1 | public static enum Field { |
| 42 | /** the name of the address field. */ | |
| 43 | 1 | ADDRESS("address"), |
| 44 | /** the name of the description field. */ | |
| 45 | 1 | DESCRIPTION("description"), |
| 46 | /** the name of the endDate field. */ | |
| 47 | 1 | END_DATE("endDate"), |
| 48 | /** the name of the field field. */ | |
| 49 | 1 | FIELD("field"), |
| 50 | /** the name of the name field. */ | |
| 51 | 1 | NAME("name"), |
| 52 | /** the name of the salary field. */ | |
| 53 | 1 | SALARY("salary"), |
| 54 | /** the name of the startDate field. */ | |
| 55 | 1 | START_DATE("startDate"), |
| 56 | /** the name of the subField field. */ | |
| 57 | 1 | SUB_FIELD("subField"), |
| 58 | /** the name of the title field. */ | |
| 59 | 1 | TITLE("title"), |
| 60 | /** the name of the webpage field. */ | |
| 61 | 1 | WEBPAGE("webpage"), |
| 62 | /** | |
| 63 | * the name of the type field, Should have the value of "job" or "school" to be put in the right | |
| 64 | * js fields. | |
| 65 | */ | |
| 66 | 1 | TYPE("type"), |
| 67 | /** the name of the primary field. */ | |
| 68 | 1 | PRIMARY("primary"); |
| 69 | ||
| 70 | /** | |
| 71 | * the name of this field. | |
| 72 | */ | |
| 73 | private final String jsonString; | |
| 74 | ||
| 75 | /** | |
| 76 | * Construct a field based on the name of the field. | |
| 77 | * | |
| 78 | * @param jsonString the name of the field | |
| 79 | */ | |
| 80 | 12 | private Field(String jsonString) { |
| 81 | 12 | this.jsonString = jsonString; |
| 82 | 12 | } |
| 83 | ||
| 84 | /** | |
| 85 | * @return a string representation of the enum. | |
| 86 | */ | |
| 87 | @Override | |
| 88 | public String toString() { | |
| 89 | 18 | return this.jsonString; |
| 90 | } | |
| 91 | } | |
| 92 | ||
| 93 | /** | |
| 94 | * Get the address of the organization, specified as an Address. Container support for this field | |
| 95 | * is OPTIONAL. | |
| 96 | * | |
| 97 | * @return the Address of the organization | |
| 98 | */ | |
| 99 | Address getAddress(); | |
| 100 | ||
| 101 | /** | |
| 102 | * Set the address of the organization, specified as an Address. Container support for this field | |
| 103 | * is OPTIONAL. | |
| 104 | * | |
| 105 | * @param address the address of the organization | |
| 106 | */ | |
| 107 | void setAddress(Address address); | |
| 108 | ||
| 109 | /** | |
| 110 | * Get a description or notes about the person's work in the organization, specified as a string. | |
| 111 | * This could be the courses taken by a student, or a more detailed description about a | |
| 112 | * Organization role. Container support for this field is OPTIONAL. | |
| 113 | * | |
| 114 | * @return a description about the persons work in the organization | |
| 115 | */ | |
| 116 | String getDescription(); | |
| 117 | ||
| 118 | /** | |
| 119 | * Set a description or notes about the person's work in the organization, specified as a string. | |
| 120 | * This could be the courses taken by a student, or a more detailed description about a | |
| 121 | * Organization role. Container support for this field is OPTIONAL. | |
| 122 | * | |
| 123 | * @param description a description about the persons work in the organization | |
| 124 | */ | |
| 125 | void setDescription(String description); | |
| 126 | ||
| 127 | /** | |
| 128 | * Get the date the person stopped at the organization, specified as a Date. A null date indicates | |
| 129 | * that the person is still involved with the organization. Container support for this field is | |
| 130 | * OPTIONAL. | |
| 131 | * | |
| 132 | * @return the date the person stopped at the organization | |
| 133 | */ | |
| 134 | Date getEndDate(); | |
| 135 | ||
| 136 | /** | |
| 137 | * Set the date the person stopped at the organization, specified as a Date. A null date indicates | |
| 138 | * that the person is still involved with the organization. Container support for this field is | |
| 139 | * OPTIONAL. | |
| 140 | * | |
| 141 | * @param endDate the date the person stopped at the organization | |
| 142 | */ | |
| 143 | void setEndDate(Date endDate); | |
| 144 | ||
| 145 | /** | |
| 146 | * Get the field the organization is in, specified as a string. This could be the degree pursued | |
| 147 | * if the organization is a school. Container support for this field is OPTIONAL. | |
| 148 | * | |
| 149 | * @return the field the organization is in | |
| 150 | */ | |
| 151 | String getField(); | |
| 152 | ||
| 153 | /** | |
| 154 | * Set the field the organization is in, specified as a string. This could be the degree pursued | |
| 155 | * if the organization is a school. Container support for this field is OPTIONAL. | |
| 156 | * | |
| 157 | * @param field the field the organization is in | |
| 158 | */ | |
| 159 | void setField(String field); | |
| 160 | ||
| 161 | /** | |
| 162 | * Get the name of the organization, specified as a string. For example, could be a school name or | |
| 163 | * a job company. Container support for this field is OPTIONAL. | |
| 164 | * | |
| 165 | * @return the name of the organization | |
| 166 | */ | |
| 167 | String getName(); | |
| 168 | ||
| 169 | /** | |
| 170 | * Set the name of the organization, specified as a string. For example, could be a school name or | |
| 171 | * a job company. Container support for this field is OPTIONAL. | |
| 172 | * | |
| 173 | * @param name the name of the organization | |
| 174 | */ | |
| 175 | void setName(String name); | |
| 176 | ||
| 177 | /** | |
| 178 | * Get the salary the person receives from the organization, specified as a string. Container | |
| 179 | * support for this field is OPTIONAL. | |
| 180 | * | |
| 181 | * @return the salary the person receives | |
| 182 | */ | |
| 183 | String getSalary(); | |
| 184 | ||
| 185 | /** | |
| 186 | * Set the salary the person receives from the organization, specified as a string. Container | |
| 187 | * support for this field is OPTIONAL. | |
| 188 | * | |
| 189 | * @param salary the salary the person receives | |
| 190 | */ | |
| 191 | void setSalary(String salary); | |
| 192 | ||
| 193 | /** | |
| 194 | * Get the date the person started at the organization, specified as a Date. Container support for | |
| 195 | * this field is OPTIONAL. | |
| 196 | * | |
| 197 | * @return the start date at the organization | |
| 198 | */ | |
| 199 | Date getStartDate(); | |
| 200 | ||
| 201 | /** | |
| 202 | * Set the date the person started at the organization, specified as a Date. Container support for | |
| 203 | * this field is OPTIONAL. | |
| 204 | * | |
| 205 | * @param startDate the start date at the organization | |
| 206 | */ | |
| 207 | void setStartDate(Date startDate); | |
| 208 | ||
| 209 | /** | |
| 210 | * Get the subfield the Organization is in, specified as a string. Container support for this | |
| 211 | * field is OPTIONAL. | |
| 212 | * | |
| 213 | * @return the subfield the Organization is in | |
| 214 | */ | |
| 215 | String getSubField(); | |
| 216 | ||
| 217 | /** | |
| 218 | * Set the subfield the Organization is in, specified as a string. Container support for this | |
| 219 | * field is OPTIONAL. | |
| 220 | * | |
| 221 | * @param subField the subfield the Organization is in | |
| 222 | */ | |
| 223 | void setSubField(String subField); | |
| 224 | ||
| 225 | /** | |
| 226 | * Get the title or role the person has in the organization, specified as a string. This could be | |
| 227 | * graduate student, or software engineer. Container support for this field is OPTIONAL. | |
| 228 | * | |
| 229 | * @return the title or role the person has in the organization | |
| 230 | */ | |
| 231 | String getTitle(); | |
| 232 | ||
| 233 | /** | |
| 234 | * Set the title or role the person has in the organization, specified as a string. This could be | |
| 235 | * graduate student, or software engineer. Container support for this field is OPTIONAL. | |
| 236 | * | |
| 237 | * @param title the title or role the person has in the organization | |
| 238 | */ | |
| 239 | void setTitle(String title); | |
| 240 | ||
| 241 | /** | |
| 242 | * Get a webpage related to the organization, specified as a string. Container support for this | |
| 243 | * field is OPTIONAL. | |
| 244 | * | |
| 245 | * @return the URL of a webpage related to the organization | |
| 246 | */ | |
| 247 | String getWebpage(); | |
| 248 | ||
| 249 | /** | |
| 250 | * Get a webpage related to the organization, specified as a string. Container support for this | |
| 251 | * field is OPTIONAL. | |
| 252 | * | |
| 253 | * @param webpage the URL of a webpage related to the organization | |
| 254 | */ | |
| 255 | void setWebpage(String webpage); | |
| 256 | ||
| 257 | /** | |
| 258 | * Get the type of field for this instance, usually used to label the preferred function of the | |
| 259 | * given contact information. The type of organization, with Canonical Values <em>job</em> and | |
| 260 | * <em>school</em>. | |
| 261 | * | |
| 262 | * @return the type of the field | |
| 263 | */ | |
| 264 | String getType(); | |
| 265 | ||
| 266 | /** | |
| 267 | * Set the type of field for this instance, usually used to label the preferred function of the | |
| 268 | * given contact information. The type of organization, with Canonical Values <em>job</em> and | |
| 269 | * <em>school</em>. | |
| 270 | * | |
| 271 | * @param type the type of the field | |
| 272 | */ | |
| 273 | void setType(String type); | |
| 274 | ||
| 275 | /** | |
| 276 | * Get Boolean value indicating whether this instance of the Plural Field is the primary or | |
| 277 | * preferred Organization. | |
| 278 | * | |
| 279 | * @return true if this is a primary or preferred value | |
| 280 | */ | |
| 281 | Boolean getPrimary(); | |
| 282 | ||
| 283 | /** | |
| 284 | * Set Boolean value indicating whether this instance of the Plural Field is the primary or | |
| 285 | * preferred Organization. | |
| 286 | * | |
| 287 | * @param primary true if this is a primary or preferred value | |
| 288 | */ | |
| 289 | void setPrimary(Boolean primary); | |
| 290 | ||
| 291 | } |