Coverage Report - org.apache.shindig.social.opensocial.model.Url
 
Classes in this File Line Coverage Branch Coverage Complexity
Url
N/A
N/A
0
Url$Field
100%
8/8
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.UrlImpl;
 21  
 
 22  
 import com.google.inject.ImplementedBy;
 23  
 
 24  
 
 25  
 /**
 26  
  * The base interface of all Url objects.
 27  
  */
 28  
 @ImplementedBy(UrlImpl.class)
 29  
 public interface Url extends ListField {
 30  
 
 31  
   /**
 32  
    * An enumeration of the field names used in Url objects.
 33  
    */
 34  1
   public static enum Field {
 35  
     /** the name of the value field. */
 36  1
     VALUE("value"),
 37  
     /** the name of the linkText field. */
 38  1
     LINK_TEXT("linkText"),
 39  
     /** the name of the type field. */
 40  1
     TYPE("type");
 41  
 
 42  
     /**
 43  
      * The name of this field.
 44  
      */
 45  
     private final String jsonString;
 46  
 
 47  
     /**
 48  
      * Construct a new field based on a name.
 49  
      *
 50  
      * @param jsonString the name of the field
 51  
      */
 52  3
     private Field(String jsonString) {
 53  3
       this.jsonString = jsonString;
 54  3
     }
 55  
 
 56  
     /**
 57  
      * The string representation of the enum.
 58  
      */
 59  
     @Override
 60  
     public String toString() {
 61  12
       return this.jsonString;
 62  
     }
 63  
   }
 64  
 
 65  
   /**
 66  
    * Get the text associated with the link.
 67  
    * @return the link text
 68  
    */
 69  
   String getLinkText();
 70  
 
 71  
   /**
 72  
    * Set the Link text associated with the link.
 73  
    * @param linkText the link text
 74  
    */
 75  
   void setLinkText(String linkText);
 76  
 }