001/*
002 * Sonar, open source software quality management tool.
003 * Copyright (C) 2008-2012 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 */
020package org.sonar.core.dashboard;
021
022import com.google.common.collect.Lists;
023
024import java.util.Collection;
025import java.util.Date;
026import java.util.List;
027
028public 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 boolean global;
037  private Date createdAt;
038  private Date updatedAt;
039  private List<WidgetDto> widgetDtos = Lists.newArrayList();
040
041  public Long getId() {
042    return id;
043  }
044
045  public DashboardDto setId(Long id) {
046    this.id = id;
047    return this;
048  }
049
050  public Long getUserId() {
051    return userId;
052  }
053
054  public DashboardDto setUserId(Long userId) {
055    this.userId = userId;
056    return this;
057  }
058
059  public String getName() {
060    return name;
061  }
062
063  public DashboardDto setName(String name) {
064    this.name = name;
065    return this;
066  }
067
068  public String getDescription() {
069    return description;
070  }
071
072  public DashboardDto setDescription(String description) {
073    this.description = description;
074    return this;
075  }
076
077  public String getColumnLayout() {
078    return columnLayout;
079  }
080
081  public DashboardDto setColumnLayout(String columnLayout) {
082    this.columnLayout = columnLayout;
083    return this;
084  }
085
086  public boolean getShared() {
087    return shared;
088  }
089
090  public DashboardDto setShared(boolean shared) {
091    this.shared = shared;
092    return this;
093  }
094
095  public boolean getGlobal() {
096    return global;
097  }
098
099  public DashboardDto setGlobal(boolean global) {
100    this.global = global;
101    return this;
102  }
103
104  public Date getCreatedAt() {
105    return createdAt;
106  }
107
108  public DashboardDto setCreatedAt(Date createdAt) {
109    this.createdAt = createdAt;
110    return this;
111  }
112
113  public Date getUpdatedAt() {
114    return updatedAt;
115  }
116
117  public DashboardDto setUpdatedAt(Date updatedAt) {
118    this.updatedAt = updatedAt;
119    return this;
120  }
121
122  public Collection<WidgetDto> getWidgets() {
123    return widgetDtos;
124  }
125
126  public DashboardDto addWidget(WidgetDto widgetDto) {
127    widgetDtos.add(widgetDto);
128    return this;
129  }
130
131}