@Test public void toURLQueryStringGroupIdOnly() { KieContainerResourceFilter filter = new KieContainerResourceFilter.Builder() .releaseId(new ReleaseId(GROUP_ID, null, null)).build(); Assertions.assertThat(filter.toURLQueryString()).isEqualTo("groupId=" + GROUP_ID); }
public String toURLQueryString() { StringJoiner joiner = new StringJoiner("&"); if (releaseIdFilter.getGroupId() != null) { joiner.add("groupId=" + releaseIdFilter.getGroupId()); } if (releaseIdFilter.getArtifactId() != null) { joiner.add("artifactId=" + releaseIdFilter.getArtifactId()); } if (releaseIdFilter.getVersion() != null) { joiner.add("version=" + releaseIdFilter.getVersion()); } if (!statusFilter.equals(KieContainerStatusFilter.ACCEPT_ALL)) { String status = statusFilter.getAcceptedStatuses() .stream() .map(s -> s.toString()) .collect(Collectors.joining(",")); joiner.add("status=" + status); } return joiner.toString(); }
KieContainerResourceFilter { public String toURLQueryString() { StringJoiner joiner = new StringJoiner("&"); if (releaseIdFilter.getGroupId() != null) { joiner.add("groupId=" + releaseIdFilter.getGroupId()); } if (releaseIdFilter.getArtifactId() != null) { joiner.add("artifactId=" + releaseIdFilter.getArtifactId()); } if (releaseIdFilter.getVersion() != null) { joiner.add("version=" + releaseIdFilter.getVersion()); } if (!statusFilter.equals(KieContainerStatusFilter.ACCEPT_ALL)) { String status = statusFilter.getAcceptedStatuses() .stream() .map(s -> s.toString()) .collect(Collectors.joining(",")); joiner.add("status=" + status); } return joiner.toString(); } }
KieContainerResourceFilter { public String toURLQueryString() { StringJoiner joiner = new StringJoiner("&"); if (releaseIdFilter.getGroupId() != null) { joiner.add("groupId=" + releaseIdFilter.getGroupId()); } if (releaseIdFilter.getArtifactId() != null) { joiner.add("artifactId=" + releaseIdFilter.getArtifactId()); } if (releaseIdFilter.getVersion() != null) { joiner.add("version=" + releaseIdFilter.getVersion()); } if (!statusFilter.equals(KieContainerStatusFilter.ACCEPT_ALL)) { String status = statusFilter.getAcceptedStatuses() .stream() .map(s -> s.toString()) .collect(Collectors.joining(",")); joiner.add("status=" + status); } return joiner.toString(); } private  KieContainerResourceFilter();  KieContainerResourceFilter(ReleaseIdFilter releaseIdFilter, KieContainerStatusFilter statusFilter);  KieContainerResourceFilter(ReleaseIdFilter releaseIdFilter); }
KieContainerResourceFilter { public String toURLQueryString() { StringJoiner joiner = new StringJoiner("&"); if (releaseIdFilter.getGroupId() != null) { joiner.add("groupId=" + releaseIdFilter.getGroupId()); } if (releaseIdFilter.getArtifactId() != null) { joiner.add("artifactId=" + releaseIdFilter.getArtifactId()); } if (releaseIdFilter.getVersion() != null) { joiner.add("version=" + releaseIdFilter.getVersion()); } if (!statusFilter.equals(KieContainerStatusFilter.ACCEPT_ALL)) { String status = statusFilter.getAcceptedStatuses() .stream() .map(s -> s.toString()) .collect(Collectors.joining(",")); joiner.add("status=" + status); } return joiner.toString(); } private  KieContainerResourceFilter();  KieContainerResourceFilter(ReleaseIdFilter releaseIdFilter, KieContainerStatusFilter statusFilter);  KieContainerResourceFilter(ReleaseIdFilter releaseIdFilter); ReleaseIdFilter getReleaseIdFilter(); KieContainerStatusFilter getStatusFilter(); boolean accept(KieContainerResource kieContainerResource); String toURLQueryString(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
KieContainerResourceFilter { public String toURLQueryString() { StringJoiner joiner = new StringJoiner("&"); if (releaseIdFilter.getGroupId() != null) { joiner.add("groupId=" + releaseIdFilter.getGroupId()); } if (releaseIdFilter.getArtifactId() != null) { joiner.add("artifactId=" + releaseIdFilter.getArtifactId()); } if (releaseIdFilter.getVersion() != null) { joiner.add("version=" + releaseIdFilter.getVersion()); } if (!statusFilter.equals(KieContainerStatusFilter.ACCEPT_ALL)) { String status = statusFilter.getAcceptedStatuses() .stream() .map(s -> s.toString()) .collect(Collectors.joining(",")); joiner.add("status=" + status); } return joiner.toString(); } private  KieContainerResourceFilter();  KieContainerResourceFilter(ReleaseIdFilter releaseIdFilter, KieContainerStatusFilter statusFilter);  KieContainerResourceFilter(ReleaseIdFilter releaseIdFilter); ReleaseIdFilter getReleaseIdFilter(); KieContainerStatusFilter getStatusFilter(); boolean accept(KieContainerResource kieContainerResource); String toURLQueryString(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static final KieContainerResourceFilter ACCEPT_ALL; }