-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
50 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
src/main/java/com/jfrog/ide/idea/scan/data/NewScansConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
package com.jfrog.ide.idea.scan.data; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class NewScansConfig { | ||
@JsonProperty("scans") | ||
private List<NewScanConfig> scans; | ||
|
||
@SuppressWarnings("unused") | ||
public NewScansConfig() { | ||
} | ||
|
||
public NewScansConfig(NewScanConfig scan) { | ||
this.scans = List.of(scan); | ||
} | ||
} |
26 changes: 16 additions & 10 deletions
26
src/main/java/com/jfrog/ide/idea/scan/data/applications/JFrogApplicationsConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
package com.jfrog.ide.idea.scan.data.applications; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class JFrogApplicationsConfig { | ||
@JsonProperty("version") | ||
private String version; | ||
@JsonProperty("modules") | ||
private List<ModuleConfig> modules; | ||
@JsonProperty("version") | ||
private String version; | ||
@JsonProperty("modules") | ||
private List<ModuleConfig> modules; | ||
|
||
public String getVersion() { | ||
return this.version; | ||
} | ||
public JFrogApplicationsConfig(boolean createEmptyModules) { | ||
if (createEmptyModules) { | ||
modules = new ArrayList<>(); | ||
modules.add(new ModuleConfig()); | ||
} | ||
} | ||
|
||
public List<ModuleConfig> getModules() { | ||
return this.modules; | ||
} | ||
} |
42 changes: 13 additions & 29 deletions
42
src/main/java/com/jfrog/ide/idea/scan/data/applications/ModuleConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,22 @@ | ||
package com.jfrog.ide.idea.scan.data.applications; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Getter | ||
public class ModuleConfig { | ||
@JsonProperty("name") | ||
private String name; | ||
@JsonProperty("source_root") | ||
private String sourceRoot; | ||
@JsonProperty("exclude_patterns") | ||
private List<String> excludePatterns; | ||
@JsonProperty("exclude_scanners") | ||
private List<String> excludeScanners; | ||
@JsonProperty("scanners") | ||
private Map<String, ScannerConfig> scanners; | ||
|
||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
public String getSourceRoot() { | ||
return this.sourceRoot; | ||
} | ||
|
||
public List<String> getExcludePatterns() { | ||
return this.excludePatterns; | ||
} | ||
|
||
public List<String> getExcludeScanners() { | ||
return this.excludeScanners; | ||
} | ||
@JsonProperty("name") | ||
private String name; | ||
@JsonProperty("source_root") | ||
private String sourceRoot; | ||
@JsonProperty("exclude_patterns") | ||
private List<String> excludePatterns; | ||
@JsonProperty("exclude_scanners") | ||
private List<String> excludeScanners; | ||
@JsonProperty("scanners") | ||
private Map<String, ScannerConfig> scanners; | ||
|
||
public Map<String, ScannerConfig> getScanners() { | ||
return this.scanners; | ||
} | ||
} |
34 changes: 11 additions & 23 deletions
34
src/main/java/com/jfrog/ide/idea/scan/data/applications/ScannerConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,19 @@ | ||
package com.jfrog.ide.idea.scan.data.applications; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
public class ScannerConfig { | ||
@JsonProperty("language") | ||
private String language; | ||
@JsonProperty("working_dirs") | ||
private List<String> workingDirs; | ||
@JsonProperty("exclude_patterns") | ||
private List<String> excludePatterns; | ||
@JsonProperty("excluded_rules") | ||
private List<String> excludedRules; | ||
|
||
public String getLanguage() { | ||
return this.language; | ||
} | ||
|
||
public List<String> getWorkingDirs() { | ||
return this.workingDirs; | ||
} | ||
|
||
public List<String> getExcludePatterns() { | ||
return this.excludePatterns; | ||
} | ||
@JsonProperty("language") | ||
private String language; | ||
@JsonProperty("working_dirs") | ||
private List<String> workingDirs; | ||
@JsonProperty("exclude_patterns") | ||
private List<String> excludePatterns; | ||
@JsonProperty("excluded_rules") | ||
private List<String> excludedRules; | ||
|
||
public List<String> getExcludedRules() { | ||
return this.excludedRules; | ||
} | ||
} |