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

Commonjava / indy-tracking-service / 44786446415

20 Nov 2026 05:46PM UTC coverage: 37.562% (-29.5%) from 67.036%
44786446415

push

github

rnc
Bump org.commonjava.atlas:atlas-relationships-api from 1.2.2 to 1.2.3

Bumps [org.commonjava.atlas:atlas-relationships-api](https://github.com/Commonjava/atlas) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/Commonjava/atlas/releases)
- [Commits](https://github.com/Commonjava/atlas/compare/atlas-parent-1.2.2...atlas-parent-1.2.3)

---
updated-dependencies:
- dependency-name: org.commonjava.atlas:atlas-relationships-api
  dependency-version: 1.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

678 of 1805 relevant lines covered (37.56%)

0.75 hits per line

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

75.71
/src/main/java/org/commonjava/indy/service/tracking/model/dto/TrackedContentEntryDTO.java
1
/**
2
 * Copyright (C) 2022-2023 Red Hat, Inc. (https://github.com/Commonjava/indy-tracking-service)
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
package org.commonjava.indy.service.tracking.model.dto;
17

18
import org.commonjava.indy.service.tracking.model.AccessChannel;
19
import org.commonjava.indy.service.tracking.model.StoreKey;
20

21
import java.util.Set;
22

23
public class TrackedContentEntryDTO
24
                implements Comparable<TrackedContentEntryDTO>
25
{
26
    private StoreKey storeKey;
27

28
    private AccessChannel accessChannel;
29

30
    private String path;
31

32
    private String originUrl;
33

34
    private String localUrl;
35

36
    private String md5;
37

38
    private String sha256;
39

40
    private String sha1;
41

42
    private Long size;
43

44
    private Set<Long> timestamps;
45

46
    public TrackedContentEntryDTO()
47
    {
2 ✔
48
    }
2 ✔
49

50
    public TrackedContentEntryDTO( final StoreKey storeKey, final AccessChannel accessChannel, final String path )
51
    {
2 ✔
52
        this.storeKey = storeKey;
2 ✔
53
        setAccessChannel( accessChannel );
2 ✔
54
        this.path = path.startsWith( "/" ) ? path : "/" + path;
2 ✔
55
    }
2 ✔
56

57
    public String getOriginUrl()
58
    {
59
        return originUrl;
2 ✔
60
    }
61

62
    public void setOriginUrl( final String originUrl )
63
    {
64
        this.originUrl = originUrl;
2 ✔
65
    }
2 ✔
66

67
    public String getLocalUrl()
68
    {
69
        return localUrl;
2 ✔
70
    }
71

72
    public void setLocalUrl( final String localUrl )
73
    {
74
        this.localUrl = localUrl;
2 ✔
75
    }
2 ✔
76

77
    public String getMd5()
78
    {
79
        return md5;
2 ✔
80
    }
81

82
    public void setMd5( final String md5 )
83
    {
84
        this.md5 = md5;
2 ✔
85
    }
2 ✔
86

87
    public String getSha256()
88
    {
89
        return sha256;
2 ✔
90
    }
91

92
    public void setSha256( final String sha256 )
93
    {
94
        this.sha256 = sha256;
2 ✔
95
    }
2 ✔
96

97
    public String getSha1()
98
    {
99
        return sha1;
2 ✔
100
    }
101

102
    public void setSha1( final String sha1 )
103
    {
104
        this.sha1 = sha1;
2 ✔
105
    }
2 ✔
106

107
    public StoreKey getStoreKey()
108
    {
109
        return storeKey;
2 ✔
110
    }
111

112
    public void setStoreKey( final StoreKey storeKey )
113
    {
114
        this.storeKey = storeKey;
2 ✔
115
    }
2 ✔
116

117
    public AccessChannel getAccessChannel()
118
    {
119
        return accessChannel;
2 ✔
120
    }
121

122
    public void setAccessChannel( final AccessChannel accessChannel )
123
    {
124
        this.accessChannel = accessChannel;
2 ✔
125
    }
2 ✔
126

127
    public String getPath()
128
    {
129
        return path;
2 ✔
130
    }
131

132
    public void setPath( final String path )
133
    {
134
        this.path = path.startsWith( "/" ) ? path : "/" + path;
2 ✔
135
    }
2 ✔
136

137
    public Long getSize()
138
    {
139
        return size;
2 ✔
140
    }
141

142
    public void setSize( final Long size )
143
    {
144
        this.size = size;
2 ✔
145
    }
2 ✔
146

147
    @Override
148
    public int compareTo( final TrackedContentEntryDTO other )
149
    {
150
        int comp = storeKey.compareTo( other.getStoreKey() );
×
151
        if ( comp == 0 )
×
152
        {
153
            comp = accessChannel.compareTo( other.getAccessChannel() );
×
154
        }
155
        if ( comp == 0 )
×
156
        {
157
            comp = path.compareTo( other.getPath() );
×
158
        }
159

160
        return comp;
×
161
    }
162

163
    @Override
164
    public int hashCode()
165
    {
166
        final int prime = 31;
2 ✔
167
        int result = 1;
2 ✔
168
        result = prime * result + ( ( path == null ) ? 0 : path.hashCode() );
2 ✔
169
        result = prime * result + ( ( storeKey == null ) ? 0 : storeKey.hashCode() );
2 ✔
170
        result = prime * result + ( ( accessChannel == null ) ? 0 : accessChannel.hashCode() );
2 ✔
171
        return result;
2 ✔
172
    }
173

174
    @Override
175
    public boolean equals( final Object obj )
176
    {
177
        if ( this == obj )
2 ✔
178
        {
179
            return true;
×
180
        }
181
        if ( obj == null )
2 ✔
182
        {
183
            return false;
×
184
        }
185
        if ( getClass() != obj.getClass() )
2 ✔
186
        {
187
            return false;
×
188
        }
189
        final TrackedContentEntryDTO other = (TrackedContentEntryDTO) obj;
2 ✔
190
        if ( path == null )
2 ✔
191
        {
192
            if ( other.path != null )
×
193
            {
194
                return false;
×
195
            }
196
        }
197
        else if ( !path.equals( other.path ) )
2 ✔
198
        {
199
            return false;
×
200
        }
201
        if ( storeKey == null )
2 ✔
202
        {
203
            if ( other.storeKey != null )
×
204
            {
205
                return false;
×
206
            }
207
        }
208
        else if ( !storeKey.equals( other.storeKey ) )
2 ✔
209
        {
210
            return false;
×
211
        }
212
        if ( accessChannel == null )
2 ✔
213
        {
214
            return other.accessChannel == null;
×
215
        }
216
        // this is complicated by the transition from using MAVEN_REPO to NATIVE for non-proxy access channels.
217
        else
218
            return accessChannel.equals( other.accessChannel );
2 ✔
219
    }
220

221
    @Override
222
    public String toString()
223
    {
224
        return String.format(
×
225
                        "TrackedContentEntryDTO [\n  storeKey=%s\n  accessChannel=%s\n  path=%s\n  originUrl=%s\n  localUrl=%s\n  size=%d\n md5=%s\n  sha256=%s\n]",
226
                        storeKey, accessChannel, path, originUrl, localUrl, size, md5, sha256 );
227
    }
228

229
    public Set<Long> getTimestamps()
230
    {
231
        return timestamps;
2 ✔
232
    }
233

234
    public void setTimestamps( final Set<Long> timestamps )
235
    {
236
        this.timestamps = timestamps;
2 ✔
237
    }
2 ✔
238
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc