/** * Creates representation of this filter which can be used as part of the URL (e.g. the "?" query part). * * @return string representation that can be directly used in URL (as query params), without the leading '?' */ 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()); } // don't send over the default status filter (e.g. one that accepts all the states) as it is not needed, it is // the default 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(); }