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

smartsheet / smartsheet-java-sdk / #66

26 Jun 2026 09:41AM UTC coverage: 59.997% (-0.006%) from 60.003%
#66

push

github

web-flow
Prepare for release v4.1.0 (#180)

4510 of 7517 relevant lines covered (60.0%)

0.6 hits per line

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

83.33
/src/main/java/com/smartsheet/api/internal/AbstractAssociatedResources.java
1
/*
2
 * Copyright (C) 2025 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.internal;
18

19
import com.smartsheet.api.internal.util.Util;
20

21
/**
22
 * This is the base class of the Smartsheet REST API resources that are associated to other resources.
23
 * <p>
24
 * Thread Safety: This class is thread safe because it is immutable and its base class is thread safe.
25
 */
26
public abstract class AbstractAssociatedResources extends AbstractResources {
27
    /**
28
     * Represents the master resource type (e.g. "sheet", "workspace").
29
     * <p>
30
     * It will be initialized in constructor and will not change afterwards.
31
     */
32
    private String masterResourceType;
33

34
    /**
35
     * Constructor.
36
     *
37
     * @param smartsheet         the smartsheet
38
     * @param masterResourceType the master resource type
39
     */
40
    public AbstractAssociatedResources(SmartsheetImpl smartsheet, String masterResourceType) {
41
        super(smartsheet);
1✔
42
        Util.throwIfNull(masterResourceType);
1✔
43
        Util.throwIfEmpty(masterResourceType);
1✔
44

45
        this.masterResourceType = masterResourceType;
1✔
46
    }
1✔
47

48
    /**
49
     * Getter of corresponding field.
50
     *
51
     * @return the master resource type
52
     */
53
    protected String getMasterResourceType() {
54
        return masterResourceType;
×
55
    }
56
}
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

© 2026 Coveralls, Inc