Coverage Report - org.apache.shindig.social.opensocial.model.BodyType
 
Classes in this File Line Coverage Branch Coverage Complexity
BodyType
N/A
N/A
0
BodyType$Field
100%
10/10
N/A
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.BodyTypeImpl;
 21  
 
 22  
 import com.google.inject.ImplementedBy;
 23  
 
 24  
 /**
 25  
  * Base interface for all body type objects. see
 26  
  * http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.BodyType.Field_field_detail
 27  
  *
 28  
  */
 29  
 @ImplementedBy(BodyTypeImpl.class)
 30  
 @Exportablebean
 31  
 public interface BodyType {
 32  
 
 33  
   /**
 34  
    * The fields that represent the person object in serialized form.
 35  
    */
 36  1
   public static enum Field {
 37  
     /** the field name for build. */
 38  1
     BUILD("build"),
 39  
     /** the field name for build. */
 40  1
     EYE_COLOR("eyeColor"),
 41  
     /** the field name for hairColor. */
 42  1
     HAIR_COLOR("hairColor"),
 43  
     /** the field name for height. */
 44  1
     HEIGHT("height"),
 45  
     /** the field name for weight. */
 46  1
     WEIGHT("weight");
 47  
 
 48  
     /**
 49  
      * The field name that the instance represents.
 50  
      */
 51  
     private final String jsonString;
 52  
 
 53  
     /**
 54  
      * create a field base on the a json element.
 55  
      *
 56  
      * @param jsonString the name of the element
 57  
      */
 58  5
     private Field(String jsonString) {
 59  5
       this.jsonString = jsonString;
 60  5
     }
 61  
 
 62  
     /**
 63  
      * emit the field as a json element.
 64  
      *
 65  
      * @return the field name
 66  
      */
 67  
     @Override
 68  
     public String toString() {
 69  10
       return this.jsonString;
 70  
     }
 71  
   }
 72  
 
 73  
   /**
 74  
    * The build of the person's body, specified as a string. Container support for this field is
 75  
    * OPTIONAL.
 76  
    *
 77  
    * @return the build of the person's body
 78  
    */
 79  
   String getBuild();
 80  
 
 81  
   /**
 82  
    * The build of the person's body, specified as a string. Container support for this field is
 83  
    * OPTIONAL.
 84  
    *
 85  
    * @param build the build of the person's body
 86  
    */
 87  
   void setBuild(String build);
 88  
 
 89  
   /**
 90  
    * The eye color of the person, specified as a string. Container support for this field is
 91  
    * OPTIONAL.
 92  
    *
 93  
    * @return the eye color of the person
 94  
    */
 95  
   String getEyeColor();
 96  
 
 97  
   /**
 98  
    * The eye color of the person, specified as a string. Container support for this field is
 99  
    * OPTIONAL.
 100  
    *
 101  
    * @param eyeColor the eye color of the person
 102  
    */
 103  
   void setEyeColor(String eyeColor);
 104  
 
 105  
   /**
 106  
    * The hair color of the person, specified as a string. Container support for this field is
 107  
    * OPTIONAL.
 108  
    *
 109  
    * @return the hair color of the person
 110  
    */
 111  
   String getHairColor();
 112  
 
 113  
   /**
 114  
    * The hair color of the person, specified as a string. Container support for this field is
 115  
    * OPTIONAL.
 116  
    *
 117  
    * @param hairColor the hair color of the person
 118  
    */
 119  
   void setHairColor(String hairColor);
 120  
 
 121  
   /**
 122  
    * The height of the person in meters, specified as a number. Container support for this field is
 123  
    * OPTIONAL.
 124  
    *
 125  
    * @return the height of the person in meters
 126  
    */
 127  
   Float getHeight();
 128  
 
 129  
   /**
 130  
    * The height of the person in meters, specified as a number. Container support for this field is
 131  
    * OPTIONAL.
 132  
    *
 133  
    * @param height the height of the person in meters
 134  
    */
 135  
   void setHeight(Float height);
 136  
 
 137  
   /**
 138  
    * The weight of the person in kilograms, specified as a number. Container support for this field
 139  
    * is OPTIONAL.
 140  
    *
 141  
    * @return the weight of the person in kilograms
 142  
    */
 143  
   Float getWeight();
 144  
 
 145  
   /**
 146  
    * The weight of the person in kilograms, specified as a number. Container support for this field
 147  
    * is OPTIONAL.
 148  
    *
 149  
    * @param weight weight of the person in kilograms
 150  
    */
 151  
   void setWeight(Float weight);
 152  
 }