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

devonfw / IDEasy / 13327588889

14 Feb 2025 10:44AM UTC coverage: 67.947% (-0.5%) from 68.469%
13327588889

Pull #1021

github

web-flow
Merge d03159bfe into 52609dacb
Pull Request #1021: #786: support ide upgrade to automatically update to the latest version of IDEasy

2964 of 4791 branches covered (61.87%)

Branch coverage included in aggregate %.

7688 of 10886 relevant lines covered (70.62%)

3.07 hits per line

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

84.21
cli/src/main/java/com/devonfw/tools/ide/tool/repository/CustomToolMetadata.java
1
package com.devonfw.tools.ide.tool.repository;
2

3
import java.util.Set;
4

5
import com.devonfw.tools.ide.os.OperatingSystem;
6
import com.devonfw.tools.ide.os.SystemArchitecture;
7
import com.devonfw.tools.ide.url.model.file.UrlChecksums;
8
import com.devonfw.tools.ide.url.model.file.UrlDownloadFileMetadata;
9
import com.devonfw.tools.ide.version.VersionIdentifier;
10
import com.fasterxml.jackson.annotation.JsonIgnore;
11

12
/**
13
 * Representation of a {@link CustomToolMetadata} from a {@link CustomToolRepository}.
14
 */
15
public final class CustomToolMetadata implements UrlDownloadFileMetadata {
16

17
  private final String tool;
18

19
  private final VersionIdentifier version;
20

21
  private final OperatingSystem os;
22

23
  private final SystemArchitecture arch;
24

25
  private final String url;
26

27
  private final UrlChecksums checksums;
28

29
  private final String repositoryUrl;
30

31
  /**
32
   * The constructor.
33
   *
34
   * @param tool the {@link #getTool() tool}.
35
   * @param versionString the {@link #getVersion() version} as {@link String}.
36
   * @param os the {@link #getOs() OS}.
37
   * @param arch the {@link #getArch()  architecture}.
38
   * @param url the {@link #getUrl() download URL}.
39
   * @param checksums the {@link #getChecksums() checksum}.
40
   * @param repositoryUrl the {@link #getRepositoryUrl() repository URL}.
41
   */
42
  public CustomToolMetadata(String tool, String versionString, OperatingSystem os, SystemArchitecture arch,
43
      String url, UrlChecksums checksums, String repositoryUrl) {
44

45
    super();
2✔
46
    this.tool = tool;
3✔
47
    this.version = VersionIdentifier.of(versionString);
4✔
48
    this.os = os;
3✔
49
    this.arch = arch;
3✔
50
    this.url = url;
3✔
51
    this.checksums = checksums;
3✔
52
    this.repositoryUrl = repositoryUrl;
3✔
53
  }
1✔
54

55
  @Override
56
  public String getTool() {
57

58
    return this.tool;
3✔
59
  }
60

61
  @Override
62
  public String getEdition() {
63

64
    return this.tool;
×
65
  }
66

67
  @Override
68
  public VersionIdentifier getVersion() {
69

70
    return version;
3✔
71
  }
72

73
  /**
74
   * @return the URL to the download artifact.
75
   */
76
  public String getUrl() {
77

78
    return this.url;
3✔
79
  }
80

81
  @Override
82
  public UrlChecksums getChecksums() {
83

84
    return this.checksums;
3✔
85
  }
86

87
  @Override
88
  public OperatingSystem getOs() {
89

90
    return this.os;
3✔
91
  }
92

93
  @Override
94
  public SystemArchitecture getArch() {
95

96
    return this.arch;
3✔
97
  }
98

99
  @Override
100
  public Set<String> getUrls() {
101

102
    return Set.of(this.url);
×
103
  }
104

105
  /**
106
   * @return the {@link CustomToolsJson#url() repository base URL}.
107
   */
108
  @JsonIgnore
109
  public String getRepositoryUrl() {
110

111
    return this.repositoryUrl;
3✔
112
  }
113

114
  @Override
115
  public String toString() {
116

117
    return "CustomTool[" + this.tool + ":" + this.version + "@" + this.url + "]";
×
118
  }
119

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