Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

Commit

Permalink
feat(management): allow to filter by context-path
Browse files Browse the repository at this point in the history
  • Loading branch information
phiz71 authored and ytvnr committed May 4, 2021
1 parent 3d9e83a commit 6eac88f
Showing 1 changed file with 15 additions and 2 deletions.
Expand Up @@ -40,6 +40,7 @@ public class ApiCriteria {
private String name;
private List<ApiLifecycleState> lifecycleStates;
private String environmentId;
private String contextPath;

ApiCriteria(ApiCriteria.Builder builder) {
this.ids = builder.ids;
Expand All @@ -52,6 +53,7 @@ public class ApiCriteria {
this.name = builder.name;
this.lifecycleStates = builder.lifecycleStates;
this.environmentId = builder.environmentId;
this.contextPath = builder.contextPath;
}

public List<String> getIds() {
Expand Down Expand Up @@ -94,6 +96,10 @@ public String getEnvironmentId() {
return environmentId;
}

public String getContextPath() {
return contextPath;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
Expand All @@ -108,12 +114,13 @@ public boolean equals(Object o) {
Objects.equals(version, that.version) &&
Objects.equals(name, that.name) &&
Objects.equals(lifecycleStates, that.lifecycleStates) &&
Objects.equals(environmentId, that.environmentId);
Objects.equals(environmentId, that.environmentId) &&
Objects.equals(contextPath, that.contextPath);
}

@Override
public int hashCode() {
return Objects.hash(ids, groups, category, label, state, visibility, version, name, lifecycleStates, environmentId);
return Objects.hash(ids, groups, category, label, state, visibility, version, name, lifecycleStates, environmentId, contextPath);
}

public static class Builder {
Expand All @@ -127,6 +134,7 @@ public static class Builder {
private String name;
private List<ApiLifecycleState> lifecycleStates;
private String environmentId;
private String contextPath;

public ApiCriteria.Builder ids(final String... id) {
this.ids = asList(id);
Expand Down Expand Up @@ -177,6 +185,11 @@ public ApiCriteria.Builder environmentId(final String environmentId) {
this.environmentId = environmentId;
return this;
}

public ApiCriteria.Builder contextPath(final String contextPath) {
this.contextPath = contextPath;
return this;
}

public ApiCriteria build() {
return new ApiCriteria(this);
Expand Down

0 comments on commit 6eac88f

Please sign in to comment.