summaryrefslogtreecommitdiffstats
path: root/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/changes/Changes.java
diff options
context:
space:
mode:
Diffstat (limited to 'gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/changes/Changes.java')
-rw-r--r--gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/changes/Changes.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/changes/Changes.java b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/changes/Changes.java
index d14ddfe133..dc0a250174 100644
--- a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/changes/Changes.java
+++ b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/changes/Changes.java
@@ -56,6 +56,15 @@ public interface Changes {
*/
ChangeApi id(String project, String branch, String id) throws RestApiException;
+ /**
+ * Look up a change by project and numeric ID.
+ *
+ * @param project project name.
+ * @param id change number.
+ * @see #id(int)
+ */
+ ChangeApi id(String project, int id) throws RestApiException;
+
ChangeApi create(ChangeInput in) throws RestApiException;
QueryRequest query();
@@ -85,16 +94,19 @@ public interface Changes {
return this;
}
+ /** Set an option on the request, appending to existing options. */
public QueryRequest withOption(ListChangesOption options) {
this.options.add(options);
return this;
}
+ /** Set options on the request, appending to existing options. */
public QueryRequest withOptions(ListChangesOption... options) {
this.options.addAll(Arrays.asList(options));
return this;
}
+ /** Set options on the request, replacing existing options. */
public QueryRequest withOptions(EnumSet<ListChangesOption> options) {
this.options = options;
return this;
@@ -153,6 +165,11 @@ public interface Changes {
}
@Override
+ public ChangeApi id(String project, int id) throws RestApiException {
+ throw new NotImplementedException();
+ }
+
+ @Override
public ChangeApi create(ChangeInput in) throws RestApiException {
throw new NotImplementedException();
}