• 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

67.21
/src/main/java/org/commonjava/indy/service/tracking/model/dto/ContentTransferDTO.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.StoreEffect;
20
import org.commonjava.indy.service.tracking.model.StoreKey;
21
import org.commonjava.indy.service.tracking.model.TrackingKey;
22

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

28
    private TrackingKey trackingKey;
29

30
    private AccessChannel accessChannel;
31

32
    private String path;
33

34
    private String originUrl;
35

36
    private StoreEffect effect;
37

38
    public ContentTransferDTO()
39
    {
2 ✔
40
    }
2 ✔
41

42
    public ContentTransferDTO( final StoreKey storeKey, final TrackingKey trackingKey,
43
                               final AccessChannel accessChannel, final String path, final String originUrl,
44
                               final StoreEffect effect )
45
    {
2 ✔
46
        this.storeKey = storeKey;
2 ✔
47
        this.trackingKey = trackingKey;
2 ✔
48
        this.accessChannel = accessChannel;
2 ✔
49
        this.path = path.startsWith( "/" ) ? path : "/" + path;
2 ✔
50
        this.originUrl = originUrl;
2 ✔
51
        this.effect = effect;
2 ✔
52
    }
2 ✔
53

54
    public String getOriginUrl()
55
    {
56
        return originUrl;
2 ✔
57
    }
58

59
    public void setOriginUrl( final String originUrl )
60
    {
61
        this.originUrl = originUrl;
2 ✔
62
    }
2 ✔
63

64
    public StoreKey getStoreKey()
65
    {
66
        return storeKey;
2 ✔
67
    }
68

69
    public void setStoreKey( final StoreKey storeKey )
70
    {
71
        this.storeKey = storeKey;
2 ✔
72
    }
2 ✔
73

74
    public TrackingKey getTrackingKey()
75
    {
76
        return trackingKey;
×
77
    }
78

79
    public void setTrackingKey( TrackingKey trackingKey )
80
    {
81
        this.trackingKey = trackingKey;
2 ✔
82
    }
2 ✔
83

84
    public AccessChannel getAccessChannel()
85
    {
86
        return accessChannel;
2 ✔
87
    }
88

89
    public void setAccessChannel( final AccessChannel accessChannel )
90
    {
91
        this.accessChannel = accessChannel;
2 ✔
92
    }
2 ✔
93

94
    public String getPath()
95
    {
96
        return path;
2 ✔
97
    }
98

99
    public void setPath( final String path )
100
    {
101
        this.path = path.startsWith( "/" ) ? path : "/" + path;
2 ✔
102
    }
2 ✔
103

104
    public StoreEffect getEffect()
105
    {
106
        return this.effect;
×
107
    }
108

109
    public void setEffect( final StoreEffect effect )
110
    {
111
        this.effect = effect;
2 ✔
112
    }
2 ✔
113

114
    @Override
115
    public int compareTo( final ContentTransferDTO other )
116
    {
117
        int comp = storeKey.compareTo( other.getStoreKey() );
2 ✔
118
        if ( comp == 0 )
2 ✔
119
        {
120
            comp = accessChannel.compareTo( other.getAccessChannel() );
2 ✔
121
        }
122
        if ( comp == 0 )
2 ✔
123
        {
124
            comp = path.compareTo( other.getPath() );
2 ✔
125
        }
126

127
        return comp;
2 ✔
128
    }
129

130
    @Override
131
    public int hashCode()
132
    {
133
        final int prime = 31;
×
134
        int result = 1;
×
135
        result = prime * result + ( ( path == null ) ? 0 : path.hashCode() );
×
136
        result = prime * result + ( ( storeKey == null ) ? 0 : storeKey.hashCode() );
×
137
        result = prime * result + ( ( accessChannel == null ) ? 0 : accessChannel.hashCode() );
×
138
        return result;
×
139
    }
140

141
    @Override
142
    public boolean equals( final Object obj )
143
    {
144
        if ( this == obj )
2 ✔
145
        {
146
            return true;
2 ✔
147
        }
148
        if ( obj == null )
2 ✔
149
        {
150
            return false;
×
151
        }
152
        if ( getClass() != obj.getClass() )
2 ✔
153
        {
154
            return false;
2 ✔
155
        }
156
        final ContentTransferDTO other = (ContentTransferDTO) obj;
2 ✔
157
        if ( path == null )
2 ✔
158
        {
159
            if ( other.path != null )
×
160
            {
161
                return false;
×
162
            }
163
        }
164
        else if ( !path.equals( other.path ) )
2 ✔
165
        {
166
            return false;
2 ✔
167
        }
168
        if ( storeKey == null )
×
169
        {
170
            if ( other.storeKey != null )
×
171
            {
172
                return false;
×
173
            }
174
        }
175
        else if ( !storeKey.equals( other.storeKey ) )
×
176
        {
177
            return false;
×
178
        }
179
        if ( accessChannel == null )
×
180
        {
181
            return other.accessChannel == null;
×
182
        }
183
        // this is complicated by the transition from using MAVEN_REPO to NATIVE for non-proxy access channels.
184
        else
185
            return accessChannel.equals( other.accessChannel );
×
186
    }
187

188
    @Override
189
    public String toString()
190
    {
191
        return String.format(
×
192
                        "TrackedContentEntryDTO [\n  storeKey=%s\n  accessChannel=%s\n  path=%s\n  originUrl=%s\n  effect=%s\n]",
193
                        storeKey, accessChannel, path, originUrl, effect );
194
    }
195

196
}
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