• 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

77.78
/src/main/java/org/commonjava/indy/service/tracking/model/StoreType.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;
17

18
import java.util.HashSet;
19
import java.util.Set;
20

21
public enum StoreType
2 ✔
22
{
23
    group( false, "group", "groups", "g" ), remote( false, "remote", "remotes", "repository", "repositories",
2 ✔
24
                                                    "r" ), hosted( true, "hosted", "hosted", "deploy", "deploys",
2 ✔
25
                                                                   "deploy_point", "h", "d" );
26

27
    private final boolean writable;
28

29
    private final String singular;
30

31
    private final String plural;
32

33
    private final Set<String> aliases;
34

35
    StoreType( final boolean writable, final String singular, final String plural, final String... aliases )
36
    {
2 ✔
37
        this.writable = writable;
2 ✔
38
        this.singular = singular;
2 ✔
39
        this.plural = plural;
2 ✔
40

41
        final Set<String> a = new HashSet<String>();
2 ✔
42
        a.add( singular );
2 ✔
43
        a.add( plural );
2 ✔
44
        for ( final String alias : aliases )
2 ✔
45
        {
46
            a.add( alias.toLowerCase() );
2 ✔
47
        }
48

49
        this.aliases = a;
2 ✔
50
    }
2 ✔
51

52
    public static StoreType get( final String typeStr )
53
    {
54
        if ( typeStr == null )
2 ✔
55
        {
56
            return null;
×
57
        }
58

59
        final String type = typeStr.trim().toLowerCase();
2 ✔
60
        if ( type.length() < 1 )
2 ✔
61
        {
62
            return null;
×
63
        }
64

65
        for ( final StoreType st : values() )
2 ✔
66
        {
67
            //            logger.info( "Checking '{}' vs name: '{}' and aliases: {}", type, st.name(), join( st.aliases, ", " ) );
68
            if ( st.name().equalsIgnoreCase( type ) || st.aliases.contains( type ) )
2 ✔
69
            {
70
                return st;
2 ✔
71
            }
72
        }
73

74
        return null;
2 ✔
75
    }
76

77
    public String pluralEndpointName()
78
    {
79
        return plural;
×
80
    }
81

82
    public String singularEndpointName()
83
    {
84
        return singular;
×
85
    }
86

87
    public String getName()
88
    {
89
        return singularEndpointName();
×
90
    }
91

92
    public boolean isWritable()
93
    {
94
        return writable;
×
95
    }
96

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