Skip to content

Commit

Permalink
rename types to remove redundant 'Input' suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Feb 27, 2024
1 parent 81a4508 commit ef36d05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/cryostat/graphql/RootNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public DiscoveryNode getRootNode() {
"Get target nodes that are descendants of this node. That is, get the set of leaf nodes"
+ " from anywhere below this node's subtree.")
public List<DiscoveryNode> descendantTargets(
@Source DiscoveryNode discoveryNode, DiscoveryNodeFilterInput filter) {
@Source DiscoveryNode discoveryNode, DiscoveryNodeFilter filter) {
// TODO do this filtering at the database query level as much as possible. As is, this will
// load the entire discovery tree out of the database, then perform the filtering at the
// application level.
Expand All @@ -64,7 +64,7 @@ private Set<DiscoveryNode> recurseChildren(
return result;
}

public static class DiscoveryNodeFilterInput implements Predicate<DiscoveryNode> {
public static class DiscoveryNodeFilter implements Predicate<DiscoveryNode> {
public @Nullable Long id;
public @Nullable String name;
public @Nullable List<String> names;
Expand Down
13 changes: 6 additions & 7 deletions src/main/java/io/cryostat/graphql/TargetNodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.function.Predicate;

import io.cryostat.discovery.DiscoveryNode;
import io.cryostat.graphql.RootNode.DiscoveryNodeFilterInput;
import io.cryostat.graphql.RootNode.DiscoveryNodeFilter;
import io.cryostat.graphql.matchers.LabelSelectorMatcher;
import io.cryostat.recordings.ActiveRecording;
import io.cryostat.recordings.RecordingHelper;
Expand Down Expand Up @@ -74,7 +74,7 @@ public GraphQLSchema.Builder registerRecordingStateEnum(

@Query("targetNodes")
@Description("Get the Target discovery nodes, i.e. the leaf nodes of the discovery tree")
public List<DiscoveryNode> getTargetNodes(DiscoveryNodeFilterInput filter) {
public List<DiscoveryNode> getTargetNodes(DiscoveryNodeFilter filter) {
// TODO do this filtering at the database query level as much as possible. As is, this will
// load the entire discovery tree out of the database, then perform the filtering at the
// application level.
Expand Down Expand Up @@ -118,8 +118,7 @@ public Recordings recordings(@Source Target target, Context context) {
return recordings;
}

public ActiveRecordings active(
@Source Recordings recordings, ActiveRecordingsFilterInput filter) {
public ActiveRecordings active(@Source Recordings recordings, ActiveRecordingsFilter filter) {
var out = new ActiveRecordings();
out.data = new ArrayList<>();
out.aggregate = new AggregateInfo();
Expand All @@ -136,7 +135,7 @@ public ActiveRecordings active(
}

public ArchivedRecordings archived(
@Source Recordings recordings, ArchivedRecordingsFilterInput filter) {
@Source Recordings recordings, ArchivedRecordingsFilter filter) {
var out = new ArchivedRecordings();
out.data = new ArrayList<>();
out.aggregate = new AggregateInfo();
Expand Down Expand Up @@ -174,7 +173,7 @@ public static class AggregateInfo {
size;
}

public static class ActiveRecordingsFilterInput implements Predicate<ActiveRecording> {
public static class ActiveRecordingsFilter implements Predicate<ActiveRecording> {

public @Nullable String name;
public @Nullable List<String> names;
Expand Down Expand Up @@ -233,7 +232,7 @@ public boolean test(ActiveRecording r) {
}
}

public static class ArchivedRecordingsFilterInput implements Predicate<ArchivedRecording> {
public static class ArchivedRecordingsFilter implements Predicate<ArchivedRecording> {

public @Nullable String name;
public @Nullable List<String> names;
Expand Down

0 comments on commit ef36d05

Please sign in to comment.