Skip to content

Commit

Permalink
devonfw#103: implemented requested changes
Browse files Browse the repository at this point in the history
removed default getEdition override from tools
changed getEdition to non abstract
made getIntellijJsonRelease public
  • Loading branch information
jan-vcapgemini committed Feb 19, 2024
1 parent ae52292 commit f66c7ea
Show file tree
Hide file tree
Showing 34 changed files with 28 additions and 188 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package com.devonfw.tools.ide.tool.androidstudio;

import java.util.Collection;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.devonfw.tools.ide.json.mapping.JsonMapping;
import com.devonfw.tools.ide.url.model.folder.UrlEdition;
import com.devonfw.tools.ide.url.model.folder.UrlRepository;
import com.devonfw.tools.ide.url.model.folder.UrlTool;
import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.JsonUrlUpdater;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collection;
import java.util.List;

/**
* {@link JsonUrlUpdater} for Android Studio.
Expand Down Expand Up @@ -40,12 +41,6 @@ protected String getTool() {
return "android-studio";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
public void update(UrlRepository urlRepository) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ protected String getTool() {
return "aws";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getGithubOrganization() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ protected String getTool() {
return "az";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ protected String getTool() {
return "cobigen";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getMavenGroupIdPath() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ protected String getTool() {
return "docker";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ protected String getTool() {
return "dotnet";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getVersionPrefixToRemove() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ protected String getTool() {
return "gcloud";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getGithubRepository() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ protected String getTool() {
return "gcviewer";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ protected String getTool() {
return "gh";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getVersionPrefixToRemove() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ protected String getTool() {
return "gradle";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ protected String getTool() {
return "helm";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getVersionPrefixToRemove() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ public class IntellijCommunityUrlUpdater extends IntellijUrlUpdater {
@Override
protected String getEdition() {

return getTool();
return "community";
}

@Override
IntellijJsonObject getIntellijJsonRelease(IntellijJsonObject[] releases) {
public IntellijJsonObject getIntellijJsonRelease(IntellijJsonObject[] releases) {

return releases[1];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ protected String getEdition() {
}

@Override
IntellijJsonObject getIntellijJsonRelease(IntellijJsonObject[] releases) {
public IntellijJsonObject getIntellijJsonRelease(IntellijJsonObject[] releases) {

return releases[0];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* {@link IntellijUrlUpdater} base class for IntelliJ.
*/
public abstract class IntellijUrlUpdater extends JsonUrlUpdater<IntellijJsonObject> {
public class IntellijUrlUpdater extends JsonUrlUpdater<IntellijJsonObject> {

private static final String VERSION_BASE_URL = "https://data.services.jetbrains.com";

Expand Down Expand Up @@ -56,7 +56,10 @@ public void update(UrlRepository urlRepository) {
* @param releases Has 2 elements, 1. Ultimate Edition, 2. Community Edition
* @return The release for the {@link #getEdition() edition}.
*/
abstract IntellijJsonObject getIntellijJsonRelease(IntellijJsonObject[] releases);
public IntellijJsonObject getIntellijJsonRelease(IntellijJsonObject[] releases) {

return releases[1];
}

/**
* Adds a version for the provided {@link UrlEdition}
Expand Down Expand Up @@ -141,6 +144,12 @@ protected String getTool() {
return "intellij";
}

@Override
protected String getEdition() {

return "community";
}

@Override
protected String doGetVersionUrl() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ protected String getTool() {
return "jasypt";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getMavenGroupIdPath() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ protected String getTool() {
return "java";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String mapVersion(String version) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ protected String getTool() {
return "jenkins";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getVersionUrl() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ protected String getTool() {
return "jmc";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getGithubOrganization() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ protected String getTool() {
return "kotlinc-native";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ protected String getTool() {
return "kotlinc";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ protected String getTool() {
return "lazydocker";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getGithubOrganization() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ protected String getTool() {
return "mvn";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ protected String getTool() {
return "node";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected String getVersionPrefixToRemove() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ protected String getTool() {
return "npm";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ protected String getTool() {
return "oc";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ protected String getTool() {
return "pip";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ protected String getTool() {
return "python";
}

@Override
protected String getEdition() {

return getTool();
}

@Override
protected void addVersion(UrlVersion urlVersion) {

Expand Down
Loading

0 comments on commit f66c7ea

Please sign in to comment.