Coverage Report - org.apache.shindig.social.core.model.ActivityImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
ActivityImpl
95%
62/65
50%
2/4
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.core.model;
 19  
 
 20  
 import org.apache.shindig.social.opensocial.model.Activity;
 21  
 import org.apache.shindig.social.opensocial.model.MediaItem;
 22  
 
 23  
 import java.util.Date;
 24  
 import java.util.List;
 25  
 import java.util.Map;
 26  
 
 27  
 public class ActivityImpl implements Activity {
 28  
 
 29  
   private String appId;
 30  
   private String body;
 31  
   private String bodyId;
 32  
   private String externalId;
 33  
   private String id;
 34  
   private Date updated;
 35  
   private List<MediaItem> mediaItems;
 36  
   private Long postedTime;
 37  
   private Float priority;
 38  
   private String streamFaviconUrl;
 39  
   private String streamSourceUrl;
 40  
   private String streamTitle;
 41  
   private String streamUrl;
 42  
   private Map<String, String> templateParams;
 43  
   private String title;
 44  
   private String titleId;
 45  
   private String url;
 46  
   private String userId;
 47  
 
 48  27
   public ActivityImpl() {
 49  27
   }
 50  
 
 51  48
   public ActivityImpl(String id, String userId) {
 52  48
     this.id = id;
 53  48
     this.userId = userId;
 54  48
   }
 55  
 
 56  
   public String getAppId() {
 57  27
     return appId;
 58  
   }
 59  
 
 60  
   public void setAppId(String appId) {
 61  5
     this.appId = appId;
 62  5
   }
 63  
 
 64  
   public String getBody() {
 65  32
     return body;
 66  
   }
 67  
 
 68  
   public void setBody(String body) {
 69  29
     this.body = body;
 70  29
   }
 71  
 
 72  
   public String getBodyId() {
 73  27
     return bodyId;
 74  
   }
 75  
 
 76  
   public void setBodyId(String bodyId) {
 77  5
     this.bodyId = bodyId;
 78  5
   }
 79  
 
 80  
   public String getExternalId() {
 81  26
     return externalId;
 82  
   }
 83  
 
 84  
   public void setExternalId(String externalId) {
 85  4
     this.externalId = externalId;
 86  4
   }
 87  
 
 88  
   public String getId() {
 89  39
     return id;
 90  
   }
 91  
 
 92  
   public void setId(String id) {
 93  21
     this.id = id;
 94  21
   }
 95  
 
 96  
   public Date getUpdated() {
 97  26
     if (updated == null) {
 98  26
       return null;
 99  
     }
 100  0
     return new Date(updated.getTime());
 101  
   }
 102  
 
 103  
   public void setUpdated(Date updated) {
 104  4
     if (updated == null) {
 105  0
       this.updated = null;
 106  0
     } else {
 107  4
       this.updated = new Date(updated.getTime());
 108  
     }
 109  4
   }
 110  
 
 111  
   public List<MediaItem> getMediaItems() {
 112  33
     return mediaItems;
 113  
   }
 114  
 
 115  
   public void setMediaItems(List<MediaItem> mediaItems) {
 116  50
     this.mediaItems = mediaItems;
 117  50
   }
 118  
 
 119  
   public Long getPostedTime() {
 120  25
     return postedTime;
 121  
   }
 122  
 
 123  
   public void setPostedTime(Long postedTime) {
 124  5
     this.postedTime = postedTime;
 125  5
   }
 126  
 
 127  
   public Float getPriority() {
 128  25
     return priority;
 129  
   }
 130  
 
 131  
   public void setPriority(Float priority) {
 132  4
     this.priority = priority;
 133  4
   }
 134  
 
 135  
   public String getStreamFaviconUrl() {
 136  26
     return streamFaviconUrl;
 137  
   }
 138  
 
 139  
   public void setStreamFaviconUrl(String streamFaviconUrl) {
 140  4
     this.streamFaviconUrl = streamFaviconUrl;
 141  4
   }
 142  
 
 143  
   public String getStreamSourceUrl() {
 144  25
     return streamSourceUrl;
 145  
   }
 146  
 
 147  
   public void setStreamSourceUrl(String streamSourceUrl) {
 148  4
     this.streamSourceUrl = streamSourceUrl;
 149  4
   }
 150  
 
 151  
   public String getStreamTitle() {
 152  26
     return streamTitle;
 153  
   }
 154  
 
 155  
   public void setStreamTitle(String streamTitle) {
 156  8
     this.streamTitle = streamTitle;
 157  8
   }
 158  
 
 159  
   public String getStreamUrl() {
 160  26
     return streamUrl;
 161  
   }
 162  
 
 163  
   public void setStreamUrl(String streamUrl) {
 164  4
     this.streamUrl = streamUrl;
 165  4
   }
 166  
 
 167  
   public Map<String, String> getTemplateParams() {
 168  25
     return templateParams;
 169  
   }
 170  
 
 171  
   public void setTemplateParams(Map<String, String> templateParams) {
 172  4
     this.templateParams = templateParams;
 173  4
   }
 174  
 
 175  
   public String getTitle() {
 176  30
     return title;
 177  
   }
 178  
 
 179  
   public void setTitle(String title) {
 180  28
     this.title = title;
 181  28
   }
 182  
 
 183  
   public String getTitleId() {
 184  25
     return titleId;
 185  
   }
 186  
 
 187  
   public void setTitleId(String titleId) {
 188  4
     this.titleId = titleId;
 189  4
   }
 190  
 
 191  
   public String getUrl() {
 192  26
     return url;
 193  
   }
 194  
 
 195  
   public void setUrl(String url) {
 196  5
     this.url = url;
 197  5
   }
 198  
 
 199  
   public String getUserId() {
 200  36
     return userId;
 201  
   }
 202  
 
 203  
   public void setUserId(String userId) {
 204  19
     this.userId = userId;
 205  19
   }
 206  
 
 207  
 }