001 /* 002 * Sonar, open source software quality management tool. 003 * Copyright (C) 2008-2011 SonarSource 004 * mailto:contact AT sonarsource DOT com 005 * 006 * Sonar is free software; you can redistribute it and/or 007 * modify it under the terms of the GNU Lesser General Public 008 * License as published by the Free Software Foundation; either 009 * version 3 of the License, or (at your option) any later version. 010 * 011 * Sonar is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 * Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public 017 * License along with Sonar; if not, write to the Free Software 018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 019 */ 020 package org.sonar.core.dashboard; 021 022 import com.google.common.collect.Lists; 023 024 import java.util.Collection; 025 import java.util.Date; 026 import java.util.List; 027 028 public final class DashboardDto { 029 030 private Long id; 031 private Long userId; 032 private String name; 033 private String description; 034 private String columnLayout; 035 private boolean shared; 036 private Date createdAt; 037 private Date updatedAt; 038 private List<WidgetDto> widgetDtos = Lists.newArrayList(); 039 040 public Long getId() { 041 return id; 042 } 043 044 public DashboardDto setId(Long id) { 045 this.id = id; 046 return this; 047 } 048 049 public Long getUserId() { 050 return userId; 051 } 052 053 public DashboardDto setUserId(Long userId) { 054 this.userId = userId; 055 return this; 056 } 057 058 public String getName() { 059 return name; 060 } 061 062 public DashboardDto setName(String name) { 063 this.name = name; 064 return this; 065 } 066 067 public String getDescription() { 068 return description; 069 } 070 071 public DashboardDto setDescription(String description) { 072 this.description = description; 073 return this; 074 } 075 076 public String getColumnLayout() { 077 return columnLayout; 078 } 079 080 public DashboardDto setColumnLayout(String columnLayout) { 081 this.columnLayout = columnLayout; 082 return this; 083 } 084 085 public boolean getShared() { 086 return shared; 087 } 088 089 public DashboardDto setShared(boolean shared) { 090 this.shared = shared; 091 return this; 092 } 093 094 public Date getCreatedAt() { 095 return createdAt; 096 } 097 098 public DashboardDto setCreatedAt(Date createdAt) { 099 this.createdAt = createdAt; 100 return this; 101 } 102 103 public Date getUpdatedAt() { 104 return updatedAt; 105 } 106 107 public DashboardDto setUpdatedAt(Date updatedAt) { 108 this.updatedAt = updatedAt; 109 return this; 110 } 111 112 public Collection<WidgetDto> getWidgets() { 113 return widgetDtos; 114 } 115 116 public DashboardDto addWidget(WidgetDto widgetDto) { 117 widgetDtos.add(widgetDto); 118 return this; 119 } 120 121 }