Skip to content

Commit

Permalink
added data source support
Browse files Browse the repository at this point in the history
  • Loading branch information
dprzybyl committed Oct 25, 2023
1 parent 041e5c8 commit 8fd9371
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 198 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.cognifide.apm.api.status.Status;
import com.cognifide.apm.core.grammar.ApmType.ApmEmpty;
import com.cognifide.apm.core.grammar.ApmType.ApmList;
import com.cognifide.apm.core.grammar.ApmType.ApmMap;
import com.cognifide.apm.core.grammar.ApmType.ApmString;
import com.cognifide.apm.core.grammar.antlr.ApmLangBaseVisitor;
import com.cognifide.apm.core.grammar.antlr.ApmLangParser.AllowDenyCommandContext;
Expand Down Expand Up @@ -281,6 +282,8 @@ private List<Map<String, ApmType>> readValues(ForEachContext ctx) {
values = variableValue.getList();
} else if (variableValue instanceof ApmEmpty) {
values = Collections.emptyList();
} else if (variableValue instanceof ApmMap && variableValue.getMap().isEmpty()) {
values = Collections.emptyList();
} else {
values = ImmutableList.of(variableValue);
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public ApmType determine(ResourceResolver resolver, List<Object> parameters) {
String rootPath = (String) parameters.get(0);
List<Config> configs = determineConfigs(parameters);
Resource root = resolver.getResource(rootPath);
if (root == null) {
return new ApmEmpty();
}
return traverseTree(root, 0, configs);
}

Expand Down Expand Up @@ -107,7 +110,7 @@ private static class Config {
private final List<ConfigProperty> properties;

public Config(Map<String, Object> map) {
String regex = (String) map.get("excludeRegex");
String regex = (String) map.get("regex");
pattern = StringUtils.isNotEmpty(regex) ? Pattern.compile(regex) : null;
String excludeRegex = (String) map.get("excludeRegex");
excludePattern = StringUtils.isNotEmpty(excludeRegex) ? Pattern.compile(excludeRegex) : null;
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion app/aem/ui.apps.cloud/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ apply(from = rootProject.file("app/aem/common.gradle.kts"))
aem {
tasks {
packageCompose {
mergePackageProject(":app:aem:ui.apps.base")
from(project(":app:aem:ui.apps.base").layout.projectDirectory.dir("src/main/content"))
installBundleProject(":app:aem:api")
installBundleProject(":app:aem:runmodes.cloud")
installBundleProject(":app:aem:core")
Expand Down
2 changes: 1 addition & 1 deletion app/aem/ui.apps/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ apply(from = rootProject.file("app/aem/common.gradle.kts"))
aem {
tasks {
packageCompose {
mergePackageProject(":app:aem:ui.apps.base")
from(project(":app:aem:ui.apps.base").layout.projectDirectory.dir("src/main/content"))
installBundleProject(":app:aem:api")
installBundleProject(":app:aem:runmodes")
installBundleProject(":app:aem:core")
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 8fd9371

Please sign in to comment.