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 WidgetDto {
029    
030      private Long id;
031      private Long dashboardId;
032      private String key;
033      private String name;
034      private String description;
035      private Integer columnIndex;
036      private Integer rowIndex;
037      private boolean configured;
038      private Date createdAt;
039      private Date updatedAt;
040      private List<WidgetPropertyDto> widgetPropertyDtos = Lists.newArrayList();
041    
042      /**
043       * @return the id
044       */
045      public Long getId() {
046        return id;
047      }
048    
049      /**
050       * @param id the id to set
051       */
052      public void setId(Long id) {
053        this.id = id;
054      }
055    
056      /**
057       * @return the dashboardId
058       */
059      public Long getDashboardId() {
060        return dashboardId;
061      }
062    
063      /**
064       * @param dashboardId the dashboardId to set
065       */
066      public void setDashboardId(Long dashboardId) {
067        this.dashboardId = dashboardId;
068      }
069    
070      /**
071       * @return the key
072       */
073      public String getKey() {
074        return key;
075      }
076    
077      /**
078       * @param key the key to set
079       */
080      public void setKey(String key) {
081        this.key = key;
082      }
083    
084      /**
085       * @return the name
086       */
087      public String getName() {
088        return name;
089      }
090    
091      /**
092       * @param name the name to set
093       */
094      public void setName(String name) {
095        this.name = name;
096      }
097    
098      /**
099       * @return the description
100       */
101      public String getDescription() {
102        return description;
103      }
104    
105      /**
106       * @param description the description to set
107       */
108      public void setDescription(String description) {
109        this.description = description;
110      }
111    
112      /**
113       * @return the columnIndex
114       */
115      public Integer getColumnIndex() {
116        return columnIndex;
117      }
118    
119      /**
120       * @param columnIndex the columnIndex to set
121       */
122      public void setColumnIndex(Integer columnIndex) {
123        this.columnIndex = columnIndex;
124      }
125    
126      /**
127       * @return the rowIndex
128       */
129      public Integer getRowIndex() {
130        return rowIndex;
131      }
132    
133      /**
134       * @param rowIndex the rowIndex to set
135       */
136      public void setRowIndex(Integer rowIndex) {
137        this.rowIndex = rowIndex;
138      }
139    
140      /**
141       * @return the configured
142       */
143      public boolean getConfigured() {
144        return configured;
145      }
146    
147      /**
148       * @param configured the configured to set
149       */
150      public void setConfigured(boolean configured) {
151        this.configured = configured;
152      }
153    
154      /**
155       * @return the createdAt
156       */
157      public Date getCreatedAt() {
158        return createdAt;
159      }
160    
161      /**
162       * @param createdAt the createdAt to set
163       */
164      public void setCreatedAt(Date createdAt) {
165        this.createdAt = createdAt;
166      }
167    
168      /**
169       * @return the updatedAt
170       */
171      public Date getUpdatedAt() {
172        return updatedAt;
173      }
174    
175      /**
176       * @param updatedAt the updatedAt to set
177       */
178      public void setUpdatedAt(Date updatedAt) {
179        this.updatedAt = updatedAt;
180      }
181    
182      /**
183       * @return the widgetProperties
184       */
185      public Collection<WidgetPropertyDto> getWidgetProperties() {
186        return widgetPropertyDtos;
187      }
188    
189      /**
190       * @param widgetPropertyDto the widgetProperty to set
191       */
192      public void addWidgetProperty(WidgetPropertyDto widgetPropertyDto) {
193        widgetPropertyDtos.add(widgetPropertyDto);
194      }
195    
196    }