• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

smartsheet / smartsheet-java-sdk / #55

02 Oct 2024 07:40PM UTC coverage: 60.548% (+0.7%) from 59.836%
#55

push

github

web-flow
Release prep for 3.2.1 (#103)

4156 of 6864 relevant lines covered (60.55%)

0.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

22.58
/src/main/java/com/smartsheet/api/models/Template.java
1
/*
2
 * Copyright (C) 2024 Smartsheet
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package com.smartsheet.api.models;
18

19
import com.smartsheet.api.models.enums.AccessLevel;
20
import com.smartsheet.api.models.enums.GlobalTemplate;
21

22
import java.util.List;
23

24
/**
25
 * A template object that is a default layout for future sheets.
26
 *
27
 * @see <a href="http://help.smartsheet.com/customer/portal/articles/522123-using-templates">Using Templates Help</a>
28
 */
29
public class Template extends NamedModel<Long> {
1✔
30
    /**
31
     * Represents the description for the template.
32
     */
33
    private String description;
34

35
    /**
36
     * Represents the access level for the template.
37
     */
38
    private AccessLevel accessLevel;
39

40
    /**
41
     * URL to the small preview image for this template
42
     */
43
    private String image;
44

45
    /**
46
     * URL to the large preview image for this template
47
     */
48
    private String largeImage;
49

50
    /**
51
     * Locale of the template
52
     */
53
    private String locale;
54

55
    /**
56
     * Type of the template. One of "sheet" or "report"
57
     */
58
    private String type;
59

60
    /**
61
     * List of search tags for this template
62
     */
63
    private List<String> tags;
64

65
    /**
66
     * List of categories this template belongs to
67
     */
68
    private List<String> categories;
69

70
    /**
71
     * Flag indicating whether the template is blank
72
     */
73
    private Boolean blank;
74

75
    /**
76
     * Type of global template. One of "BLANK_SHEET", "TASK_LIST", or "PROJECT_SHEET"
77
     */
78
    private GlobalTemplate globalTemplate;
79

80
    /**
81
     * Gets the description of the template.
82
     *
83
     * @return the description
84
     */
85
    public String getDescription() {
86
        return description;
1✔
87
    }
88

89
    /**
90
     * Sets the description of the template.
91
     *
92
     * @param description the new description
93
     */
94
    public Template setDescription(String description) {
95
        this.description = description;
1✔
96
        return this;
1✔
97
    }
98

99
    /**
100
     * Gets the access level of the template.
101
     *
102
     * @return the access level
103
     */
104
    public AccessLevel getAccessLevel() {
105
        return accessLevel;
1✔
106
    }
107

108
    /**
109
     * Sets the access level of the template.
110
     *
111
     * @param accessLevel the new access level
112
     */
113
    public Template setAccessLevel(AccessLevel accessLevel) {
114
        this.accessLevel = accessLevel;
1✔
115
        return this;
1✔
116
    }
117

118
    /**
119
     * Gets the URL to the small preview image for this template.
120
     *
121
     * @return the URL
122
     */
123
    public String getImage() {
124
        return image;
×
125
    }
126

127
    /**
128
     * Sets the URL to the small preview image for this template.
129
     */
130
    public Template setImage(String image) {
131
        this.image = image;
×
132
        return this;
×
133
    }
134

135
    /**
136
     * Gets the URL to the large preview image for this template.
137
     *
138
     * @return the URL
139
     */
140
    public String getLargeImage() {
141
        return largeImage;
×
142
    }
143

144
    /**
145
     * Sets the URL to the large preview image for this template.
146
     */
147
    public Template setLargeImage(String largeImage) {
148
        this.largeImage = largeImage;
×
149
        return this;
×
150
    }
151

152
    /**
153
     * Gets the locate of the template.
154
     *
155
     * @return locale
156
     */
157
    public String getLocale() {
158
        return locale;
×
159
    }
160

161
    /**
162
     * Sets the locate of the template.
163
     */
164
    public Template setLocale(String locale) {
165
        this.locale = locale;
×
166
        return this;
×
167
    }
168

169
    /**
170
     * Gets the type of the template. One of "sheet" or "report"
171
     *
172
     * @return type
173
     */
174
    public String getType() {
175
        return type;
×
176
    }
177

178
    /**
179
     * Sets the type of the template. One of "sheet" or "report"
180
     */
181
    public Template setType(String type) {
182
        this.type = type;
×
183
        return this;
×
184
    }
185

186
    /**
187
     * Gets the list of search tags for this template.
188
     */
189
    public List<String> getTags() {
190
        return tags;
×
191
    }
192

193
    /**
194
     * Sets the array of search tags for this template.
195
     */
196
    public Template setTags(List<String> tags) {
197
        this.tags = tags;
×
198
        return this;
×
199
    }
200

201
    /**
202
     * Gets the list of categories this template belongs to
203
     *
204
     * @return array of categories
205
     */
206
    public List<String> getCategories() {
207
        return categories;
×
208
    }
209

210
    /**
211
     * Sets the array of categories this template belongs to
212
     */
213
    public Template setCategories(List<String> categories) {
214
        this.categories = categories;
×
215
        return this;
×
216
    }
217

218
    /**
219
     * Returns true if this template is blank
220
     *
221
     * @return flag indicating whether template is blank
222
     */
223
    public Boolean isBlank() {
224
        return blank;
×
225
    }
226

227
    /**
228
     * Sets the flag indicating whether this template is blank.
229
     */
230
    public Template setBlank(Boolean blank) {
231
        this.blank = blank;
×
232
        return this;
×
233
    }
234

235
    /**
236
     * Gets the type of global template
237
     *
238
     * @return template type
239
     */
240
    public GlobalTemplate getGlobalTemplate() {
241
        return globalTemplate;
×
242
    }
243

244
    /**
245
     * Sets the type of global template
246
     */
247
    public Template setGlobalTemplate(GlobalTemplate globalTemplate) {
248
        this.globalTemplate = globalTemplate;
×
249
        return this;
×
250
    }
251
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc