Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into es_2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Cihat Keser committed Nov 1, 2015
2 parents ffbaef3 + c7a1deb commit df9c6f1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public abstract class AbstractAction<T extends JestResult> implements Action<T>
private final Multimap<String, Object> parameterMap = LinkedHashMultimap.create();
private final Set<String> cleanApiParameters = new LinkedHashSet<String>();
private String URI;
private String pathToResult;

public AbstractAction() {
}
Expand Down Expand Up @@ -160,11 +159,7 @@ public String getData(Gson gson) {

@Override
public String getPathToResult() {
return pathToResult;
}

protected void setPathToResult(String pathToResult) {
this.pathToResult = pathToResult;
return null;
}

protected String buildURI() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class NodesInfo extends GenericResultAbstractAction {

protected NodesInfo(Builder builder) {
super(builder);
setPathToResult("nodes");
setURI(buildURI());
}

Expand All @@ -24,6 +23,11 @@ public String getRestMethodName() {
return "GET";
}

@Override
public String getPathToResult() {
return "nodes";
}

public static class Builder extends AbstractMultiINodeActionBuilder<NodesInfo, Builder> {

public Builder withSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class NodesShutdown extends GenericResultAbstractAction {

protected NodesShutdown(Builder builder) {
super(builder);
setPathToResult("nodes");
setURI(buildURI());
}

Expand All @@ -27,6 +26,11 @@ public String getRestMethodName() {
return "POST";
}

@Override
public String getPathToResult() {
return "nodes";
}

public static class Builder extends AbstractMultiINodeActionBuilder<NodesShutdown, Builder> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class NodesStats extends GenericResultAbstractAction {

protected NodesStats(Builder builder) {
super(builder);
setPathToResult("nodes");
setURI(buildURI());
}

Expand All @@ -27,6 +26,11 @@ public String getRestMethodName() {
return "GET";
}

@Override
public String getPathToResult() {
return "nodes";
}

public static class Builder extends AbstractMultiINodeActionBuilder<NodesStats, Builder> {

public Builder withSettings() {
Expand Down
6 changes: 5 additions & 1 deletion jest-common/src/main/java/io/searchbox/core/MultiGet.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class MultiGet extends GenericResultAbstractAction {
protected MultiGet(AbstractAction.Builder builder) {
super(builder);
setURI(buildURI());
setPathToResult("docs/_source");
}

protected MultiGet(Builder.ByDoc builder) {
Expand Down Expand Up @@ -54,6 +53,11 @@ public String getRestMethodName() {
return "GET";
}

@Override
public String getPathToResult() {
return "docs/_source";
}

@Override
public int hashCode() {
return new HashCodeBuilder()
Expand Down

0 comments on commit df9c6f1

Please sign in to comment.