Remove modifiers 'public' and 'abstract' from interface methods
These modifiers are unnecessary (default for interface methods). Change-Id: I5ad21dded21059922fb00449ba44e98037311ac4
This commit is contained in:
@@ -23,5 +23,5 @@ import java.lang.annotation.Target;
|
|||||||
@Target({METHOD})
|
@Target({METHOD})
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
||||||
public @interface GerritConfigs {
|
public @interface GerritConfigs {
|
||||||
public GerritConfig[] value();
|
GerritConfig[] value();
|
||||||
}
|
}
|
||||||
|
@@ -22,11 +22,11 @@ import com.google.gerrit.extensions.api.projects.Projects;
|
|||||||
import com.google.gerrit.extensions.restapi.NotImplementedException;
|
import com.google.gerrit.extensions.restapi.NotImplementedException;
|
||||||
|
|
||||||
public interface GerritApi {
|
public interface GerritApi {
|
||||||
public Accounts accounts();
|
Accounts accounts();
|
||||||
public Changes changes();
|
Changes changes();
|
||||||
public Config config();
|
Config config();
|
||||||
public Groups groups();
|
Groups groups();
|
||||||
public Projects projects();
|
Projects projects();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A default implementation which allows source compatibility
|
* A default implementation which allows source compatibility
|
||||||
|
@@ -21,9 +21,9 @@ import java.util.EventListener;
|
|||||||
/** Listener interested in server startup and shutdown events. */
|
/** Listener interested in server startup and shutdown events. */
|
||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface LifecycleListener extends EventListener {
|
public interface LifecycleListener extends EventListener {
|
||||||
/** Invoke when the server is starting. */
|
/** Invoked when the server is starting. */
|
||||||
public void start();
|
void start();
|
||||||
|
|
||||||
/** Invoked when the server is stopping. */
|
/** Invoked when the server is stopping. */
|
||||||
public void stop();
|
void stop();
|
||||||
}
|
}
|
||||||
|
@@ -35,10 +35,10 @@ public interface UsageDataPublishedListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface MetaData {
|
public interface MetaData {
|
||||||
public String getName();
|
String getName();
|
||||||
public String getUnitName();
|
String getUnitName();
|
||||||
public String getUnitSymbol();
|
String getUnitSymbol();
|
||||||
public String getDescription();
|
String getDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
void onUsageDataPublished(Event event);
|
void onUsageDataPublished(Event event);
|
||||||
|
@@ -17,5 +17,5 @@ package com.google.gerrit.extensions.registration;
|
|||||||
/** Handle for registered information. */
|
/** Handle for registered information. */
|
||||||
public interface RegistrationHandle {
|
public interface RegistrationHandle {
|
||||||
/** Delete this registration. */
|
/** Delete this registration. */
|
||||||
public void remove();
|
void remove();
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@ import com.google.inject.Key;
|
|||||||
import com.google.inject.Provider;
|
import com.google.inject.Provider;
|
||||||
|
|
||||||
public interface ReloadableRegistrationHandle<T> extends RegistrationHandle {
|
public interface ReloadableRegistrationHandle<T> extends RegistrationHandle {
|
||||||
public Key<T> getKey();
|
Key<T> getKey();
|
||||||
|
|
||||||
public RegistrationHandle replace(Key<T> key, Provider<T> item);
|
RegistrationHandle replace(Key<T> key, Provider<T> item);
|
||||||
}
|
}
|
||||||
|
@@ -18,5 +18,5 @@ package com.google.gerrit.extensions.restapi;
|
|||||||
* A view which may change, although the underlying resource did not change
|
* A view which may change, although the underlying resource did not change
|
||||||
*/
|
*/
|
||||||
public interface ETagView<R extends RestResource> extends RestReadView<R> {
|
public interface ETagView<R extends RestResource> extends RestReadView<R> {
|
||||||
public String getETag(R rsrc);
|
String getETag(R rsrc);
|
||||||
}
|
}
|
||||||
|
@@ -30,11 +30,11 @@ public interface RestResource {
|
|||||||
* @return time for the Last-Modified header. HTTP truncates the header
|
* @return time for the Last-Modified header. HTTP truncates the header
|
||||||
* value to seconds.
|
* value to seconds.
|
||||||
*/
|
*/
|
||||||
public Timestamp getLastModified();
|
Timestamp getLastModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A resource with an ETag. */
|
/** A resource with an ETag. */
|
||||||
public interface HasETag {
|
public interface HasETag {
|
||||||
public String getETag();
|
String getETag();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,7 @@ public interface UiAction<R extends RestResource> extends RestView<R> {
|
|||||||
* assumed unavailable and not presented. This is usually the same as
|
* assumed unavailable and not presented. This is usually the same as
|
||||||
* {@code setVisible(false)}.
|
* {@code setVisible(false)}.
|
||||||
*/
|
*/
|
||||||
public Description getDescription(R resource);
|
Description getDescription(R resource);
|
||||||
|
|
||||||
/** Describes an action invokable through the web interface. */
|
/** Describes an action invokable through the web interface. */
|
||||||
public static class Description {
|
public static class Description {
|
||||||
|
@@ -15,5 +15,5 @@
|
|||||||
package com.google.gwtexpui.globalkey.client;
|
package com.google.gwtexpui.globalkey.client;
|
||||||
|
|
||||||
public interface KeyCommandFilter {
|
public interface KeyCommandFilter {
|
||||||
public boolean include(KeyCommand key);
|
boolean include(KeyCommand key);
|
||||||
}
|
}
|
||||||
|
@@ -22,7 +22,7 @@ public interface FindReplace {
|
|||||||
* @return regular expression to match substrings with; should be treated as
|
* @return regular expression to match substrings with; should be treated as
|
||||||
* immutable.
|
* immutable.
|
||||||
*/
|
*/
|
||||||
public RegExp pattern();
|
RegExp pattern();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find and replace a single instance of this pattern in an input.
|
* Find and replace a single instance of this pattern in an input.
|
||||||
@@ -36,5 +36,5 @@ public interface FindReplace {
|
|||||||
* @return result of regular expression replacement.
|
* @return result of regular expression replacement.
|
||||||
* @throws IllegalArgumentException if the input could not be safely sanitized.
|
* @throws IllegalArgumentException if the input could not be safely sanitized.
|
||||||
*/
|
*/
|
||||||
public String replace(String input);
|
String replace(String input);
|
||||||
}
|
}
|
||||||
|
@@ -19,92 +19,92 @@ import com.google.gwt.resources.client.ImageResource;
|
|||||||
|
|
||||||
public interface Resources extends ClientBundle {
|
public interface Resources extends ClientBundle {
|
||||||
@Source("addFileComment.png")
|
@Source("addFileComment.png")
|
||||||
public ImageResource addFileComment();
|
ImageResource addFileComment();
|
||||||
|
|
||||||
@Source("arrowDown.png")
|
@Source("arrowDown.png")
|
||||||
public ImageResource arrowDown();
|
ImageResource arrowDown();
|
||||||
|
|
||||||
@Source("arrowRight.png")
|
@Source("arrowRight.png")
|
||||||
public ImageResource arrowRight();
|
ImageResource arrowRight();
|
||||||
|
|
||||||
@Source("arrowUp.png")
|
@Source("arrowUp.png")
|
||||||
public ImageResource arrowUp();
|
ImageResource arrowUp();
|
||||||
|
|
||||||
@Source("deleteHover.png")
|
@Source("deleteHover.png")
|
||||||
public ImageResource deleteHover();
|
ImageResource deleteHover();
|
||||||
|
|
||||||
@Source("deleteNormal.png")
|
@Source("deleteNormal.png")
|
||||||
public ImageResource deleteNormal();
|
ImageResource deleteNormal();
|
||||||
|
|
||||||
@Source("diffy26.png")
|
@Source("diffy26.png")
|
||||||
public ImageResource gerritAvatar26();
|
ImageResource gerritAvatar26();
|
||||||
|
|
||||||
@Source("downloadIcon.png")
|
@Source("downloadIcon.png")
|
||||||
public ImageResource downloadIcon();
|
ImageResource downloadIcon();
|
||||||
|
|
||||||
@Source("draftComments.png")
|
@Source("draftComments.png")
|
||||||
public ImageResource draftComments();
|
ImageResource draftComments();
|
||||||
|
|
||||||
@Source("editText.png")
|
@Source("editText.png")
|
||||||
public ImageResource edit();
|
ImageResource edit();
|
||||||
|
|
||||||
@Source("editUndo.png")
|
@Source("editUndo.png")
|
||||||
public ImageResource editUndo();
|
ImageResource editUndo();
|
||||||
|
|
||||||
@Source("gear.png")
|
@Source("gear.png")
|
||||||
public ImageResource gear();
|
ImageResource gear();
|
||||||
|
|
||||||
@Source("goNext.png")
|
@Source("goNext.png")
|
||||||
public ImageResource goNext();
|
ImageResource goNext();
|
||||||
|
|
||||||
@Source("goPrev.png")
|
@Source("goPrev.png")
|
||||||
public ImageResource goPrev();
|
ImageResource goPrev();
|
||||||
|
|
||||||
@Source("goUp.png")
|
@Source("goUp.png")
|
||||||
public ImageResource goUp();
|
ImageResource goUp();
|
||||||
|
|
||||||
@Source("greenCheck.png")
|
@Source("greenCheck.png")
|
||||||
public ImageResource greenCheck();
|
ImageResource greenCheck();
|
||||||
|
|
||||||
@Source("info.png")
|
@Source("info.png")
|
||||||
public ImageResource info();
|
ImageResource info();
|
||||||
|
|
||||||
@Source("listAdd.png")
|
@Source("listAdd.png")
|
||||||
public ImageResource listAdd();
|
ImageResource listAdd();
|
||||||
|
|
||||||
@Source("mediaFloppy.png")
|
@Source("mediaFloppy.png")
|
||||||
public ImageResource save();
|
ImageResource save();
|
||||||
|
|
||||||
@Source("merge.png")
|
@Source("merge.png")
|
||||||
public ImageResource merge();
|
ImageResource merge();
|
||||||
|
|
||||||
@Source("queryIcon.png")
|
@Source("queryIcon.png")
|
||||||
public ImageResource queryIcon();
|
ImageResource queryIcon();
|
||||||
|
|
||||||
@Source("readOnly.png")
|
@Source("readOnly.png")
|
||||||
public ImageResource readOnly();
|
ImageResource readOnly();
|
||||||
|
|
||||||
@Source("redNot.png")
|
@Source("redNot.png")
|
||||||
public ImageResource redNot();
|
ImageResource redNot();
|
||||||
|
|
||||||
@Source("sideBySideDiff.png")
|
@Source("sideBySideDiff.png")
|
||||||
public ImageResource sideBySideDiff();
|
ImageResource sideBySideDiff();
|
||||||
|
|
||||||
@Source("starFilled.png")
|
@Source("starFilled.png")
|
||||||
public ImageResource starFilled();
|
ImageResource starFilled();
|
||||||
|
|
||||||
@Source("starOpen.png")
|
@Source("starOpen.png")
|
||||||
public ImageResource starOpen();
|
ImageResource starOpen();
|
||||||
|
|
||||||
@Source("undoNormal.png")
|
@Source("undoNormal.png")
|
||||||
public ImageResource undoNormal();
|
ImageResource undoNormal();
|
||||||
|
|
||||||
@Source("unifiedDiff.png")
|
@Source("unifiedDiff.png")
|
||||||
public ImageResource unifiedDiff();
|
ImageResource unifiedDiff();
|
||||||
|
|
||||||
@Source("warning.png")
|
@Source("warning.png")
|
||||||
public ImageResource warning();
|
ImageResource warning();
|
||||||
|
|
||||||
@Source("question.png")
|
@Source("question.png")
|
||||||
public ImageResource question();
|
ImageResource question();
|
||||||
}
|
}
|
||||||
|
@@ -25,11 +25,11 @@ public interface AdminResources extends ClientBundle {
|
|||||||
AdminCss css();
|
AdminCss css();
|
||||||
|
|
||||||
@Source("deleteNormal.png")
|
@Source("deleteNormal.png")
|
||||||
public ImageResource deleteNormal();
|
ImageResource deleteNormal();
|
||||||
|
|
||||||
@Source("deleteHover.png")
|
@Source("deleteHover.png")
|
||||||
public ImageResource deleteHover();
|
ImageResource deleteHover();
|
||||||
|
|
||||||
@Source("undoNormal.png")
|
@Source("undoNormal.png")
|
||||||
public ImageResource undoNormal();
|
ImageResource undoNormal();
|
||||||
}
|
}
|
||||||
|
@@ -38,7 +38,7 @@ public class StarredChanges {
|
|||||||
|
|
||||||
/** Handler that can receive notifications of a change's starred status. */
|
/** Handler that can receive notifications of a change's starred status. */
|
||||||
public static interface ChangeStarHandler {
|
public static interface ChangeStarHandler {
|
||||||
public void onChangeStar(ChangeStarEvent event);
|
void onChangeStar(ChangeStarEvent event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Event fired when a star changes status. The new status is reported. */
|
/** Event fired when a star changes status. The new status is reported. */
|
||||||
|
@@ -17,5 +17,5 @@ package com.google.gerrit.client.ui;
|
|||||||
import com.google.gwt.event.shared.EventHandler;
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
|
|
||||||
public interface ScreenLoadHandler extends EventHandler {
|
public interface ScreenLoadHandler extends EventHandler {
|
||||||
public void onScreenLoad(ScreenLoadEvent event);
|
void onScreenLoad(ScreenLoadEvent event);
|
||||||
}
|
}
|
||||||
|
@@ -401,23 +401,23 @@ public class CodeMirror extends JavaScriptObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface EventHandler {
|
public interface EventHandler {
|
||||||
public void handle(CodeMirror instance, NativeEvent event);
|
void handle(CodeMirror instance, NativeEvent event);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface RenderLineHandler {
|
public interface RenderLineHandler {
|
||||||
public void handle(CodeMirror instance, LineHandle handle, Element element);
|
void handle(CodeMirror instance, LineHandle handle, Element element);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface GutterClickHandler {
|
public interface GutterClickHandler {
|
||||||
public void handle(CodeMirror instance, int line, String gutter,
|
void handle(CodeMirror instance, int line, String gutter,
|
||||||
NativeEvent clickEvent);
|
NativeEvent clickEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface BeforeSelectionChangeHandler {
|
public interface BeforeSelectionChangeHandler {
|
||||||
public void handle(CodeMirror instance, Pos anchor, Pos head);
|
void handle(CodeMirror instance, Pos anchor, Pos head);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ChangesHandler {
|
public interface ChangesHandler {
|
||||||
public void handle(CodeMirror instance);
|
void handle(CodeMirror instance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -21,18 +21,18 @@ import com.google.gerrit.server.CurrentUser;
|
|||||||
import com.google.gerrit.server.account.AuthResult;
|
import com.google.gerrit.server.account.AuthResult;
|
||||||
|
|
||||||
public interface WebSession {
|
public interface WebSession {
|
||||||
public boolean isSignedIn();
|
boolean isSignedIn();
|
||||||
public String getXGerritAuth();
|
String getXGerritAuth();
|
||||||
public boolean isValidXGerritAuth(String keyIn);
|
boolean isValidXGerritAuth(String keyIn);
|
||||||
public AccountExternalId.Key getLastLoginExternalId();
|
AccountExternalId.Key getLastLoginExternalId();
|
||||||
public CurrentUser getUser();
|
CurrentUser getUser();
|
||||||
public void login(AuthResult res, boolean rememberMe);
|
void login(AuthResult res, boolean rememberMe);
|
||||||
|
|
||||||
/** Set the user account for this current request only. */
|
/** Set the user account for this current request only. */
|
||||||
public void setUserAccountId(Account.Id id);
|
void setUserAccountId(Account.Id id);
|
||||||
public boolean isAccessPathOk(AccessPath path);
|
boolean isAccessPathOk(AccessPath path);
|
||||||
public void setAccessPathOk(AccessPath path, boolean ok);
|
void setAccessPathOk(AccessPath path, boolean ok);
|
||||||
|
|
||||||
public void logout();
|
void logout();
|
||||||
public String getSessionId();
|
String getSessionId();
|
||||||
}
|
}
|
||||||
|
@@ -15,5 +15,5 @@
|
|||||||
package com.google.gerrit.httpd.resources;
|
package com.google.gerrit.httpd.resources;
|
||||||
|
|
||||||
public interface ResourceKey {
|
public interface ResourceKey {
|
||||||
public int weigh();
|
int weigh();
|
||||||
}
|
}
|
||||||
|
@@ -23,5 +23,5 @@ interface DatabaseConfigInitializer {
|
|||||||
* Performs database platform specific configuration steps and writes
|
* Performs database platform specific configuration steps and writes
|
||||||
* configuration parameters into the given database section
|
* configuration parameters into the given database section
|
||||||
*/
|
*/
|
||||||
public void initConfig(Section databaseSection);
|
void initConfig(Section databaseSection);
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ public interface PluginsDistribution {
|
|||||||
* IOException caused by dealing with the InputStream back to the
|
* IOException caused by dealing with the InputStream back to the
|
||||||
* caller
|
* caller
|
||||||
*/
|
*/
|
||||||
public void process(String pluginName, InputStream in) throws IOException;
|
void process(String pluginName, InputStream in) throws IOException;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,7 +45,7 @@ public interface PluginsDistribution {
|
|||||||
* @throws IOException in case of any other IO error caused by reading the
|
* @throws IOException in case of any other IO error caused by reading the
|
||||||
* plugin input stream
|
* plugin input stream
|
||||||
*/
|
*/
|
||||||
public void foreach(Processor processor) throws FileNotFoundException, IOException;
|
void foreach(Processor processor) throws FileNotFoundException, IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List plugins included in the Gerrit distribution
|
* List plugins included in the Gerrit distribution
|
||||||
@@ -53,5 +53,5 @@ public interface PluginsDistribution {
|
|||||||
* @throws FileNotFoundException if the location of the plugins couldn't be
|
* @throws FileNotFoundException if the location of the plugins couldn't be
|
||||||
* determined
|
* determined
|
||||||
*/
|
*/
|
||||||
public List<String> listPluginNames() throws FileNotFoundException;
|
List<String> listPluginNames() throws FileNotFoundException;
|
||||||
}
|
}
|
||||||
|
@@ -16,8 +16,8 @@ package com.google.gerrit.pgm.init.api;
|
|||||||
|
|
||||||
/** A single step in the site initialization process. */
|
/** A single step in the site initialization process. */
|
||||||
public interface InitStep {
|
public interface InitStep {
|
||||||
public void run() throws Exception;
|
void run() throws Exception;
|
||||||
|
|
||||||
/** Executed after the site has been initialized */
|
/** Executed after the site has been initialized */
|
||||||
public void postRun() throws Exception;
|
void postRun() throws Exception;
|
||||||
}
|
}
|
||||||
|
@@ -56,7 +56,7 @@ public class Panel extends SimplePanel {
|
|||||||
*
|
*
|
||||||
* @param panel panel that will contain the panel widget.
|
* @param panel panel that will contain the panel widget.
|
||||||
*/
|
*/
|
||||||
public void onLoad(Panel panel);
|
void onLoad(Panel panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final class Context extends JavaScriptObject {
|
static final class Context extends JavaScriptObject {
|
||||||
|
@@ -58,7 +58,7 @@ public final class Screen extends SimplePanel {
|
|||||||
*
|
*
|
||||||
* @param screen panel that will contain the screen widget.
|
* @param screen panel that will contain the screen widget.
|
||||||
*/
|
*/
|
||||||
public void onLoad(Screen screen);
|
void onLoad(Screen screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final class Context extends JavaScriptObject {
|
static final class Context extends JavaScriptObject {
|
||||||
|
@@ -18,14 +18,14 @@ import com.google.gwtexpui.safehtml.client.SafeHtml;
|
|||||||
|
|
||||||
public interface SparseHtmlFile {
|
public interface SparseHtmlFile {
|
||||||
/** @return the line of formatted HTML. */
|
/** @return the line of formatted HTML. */
|
||||||
public SafeHtml getSafeHtmlLine(int lineNo);
|
SafeHtml getSafeHtmlLine(int lineNo);
|
||||||
|
|
||||||
/** @return the number of lines in this sparse list. */
|
/** @return the number of lines in this sparse list. */
|
||||||
public int size();
|
int size();
|
||||||
|
|
||||||
/** @return true if the line is valid in this sparse list. */
|
/** @return true if the line is valid in this sparse list. */
|
||||||
public boolean contains(int idx);
|
boolean contains(int idx);
|
||||||
|
|
||||||
/** @return true if this line ends in the middle of a character edit span. */
|
/** @return true if this line ends in the middle of a character edit span. */
|
||||||
public boolean hasTrailingEdit(int idx);
|
boolean hasTrailingEdit(int idx);
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ public interface ChangeHooks {
|
|||||||
* @param patchSet The Patchset that was created.
|
* @param patchSet The Patchset that was created.
|
||||||
* @throws OrmException
|
* @throws OrmException
|
||||||
*/
|
*/
|
||||||
public void doPatchsetCreatedHook(Change change, PatchSet patchSet,
|
void doPatchsetCreatedHook(Change change, PatchSet patchSet,
|
||||||
ReviewDb db) throws OrmException;
|
ReviewDb db) throws OrmException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,7 +49,7 @@ public interface ChangeHooks {
|
|||||||
* @param patchSet The Patchset that was published.
|
* @param patchSet The Patchset that was published.
|
||||||
* @throws OrmException
|
* @throws OrmException
|
||||||
*/
|
*/
|
||||||
public void doDraftPublishedHook(Change change, PatchSet patchSet,
|
void doDraftPublishedHook(Change change, PatchSet patchSet,
|
||||||
ReviewDb db) throws OrmException;
|
ReviewDb db) throws OrmException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,7 +62,7 @@ public interface ChangeHooks {
|
|||||||
* @param approvals Map of label IDs to scores
|
* @param approvals Map of label IDs to scores
|
||||||
* @throws OrmException
|
* @throws OrmException
|
||||||
*/
|
*/
|
||||||
public void doCommentAddedHook(Change change, Account account,
|
void doCommentAddedHook(Change change, Account account,
|
||||||
PatchSet patchSet, String comment,
|
PatchSet patchSet, String comment,
|
||||||
Map<String, Short> approvals, ReviewDb db)
|
Map<String, Short> approvals, ReviewDb db)
|
||||||
throws OrmException;
|
throws OrmException;
|
||||||
@@ -76,7 +76,7 @@ public interface ChangeHooks {
|
|||||||
* @param mergeResultRev The SHA-1 of the merge result revision.
|
* @param mergeResultRev The SHA-1 of the merge result revision.
|
||||||
* @throws OrmException
|
* @throws OrmException
|
||||||
*/
|
*/
|
||||||
public void doChangeMergedHook(Change change, Account account,
|
void doChangeMergedHook(Change change, Account account,
|
||||||
PatchSet patchSet, ReviewDb db, String mergeResultRev) throws OrmException;
|
PatchSet patchSet, ReviewDb db, String mergeResultRev) throws OrmException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,7 +88,7 @@ public interface ChangeHooks {
|
|||||||
* @param reason The reason that the change failed to merge.
|
* @param reason The reason that the change failed to merge.
|
||||||
* @throws OrmException
|
* @throws OrmException
|
||||||
*/
|
*/
|
||||||
public void doMergeFailedHook(Change change, Account account,
|
void doMergeFailedHook(Change change, Account account,
|
||||||
PatchSet patchSet, String reason, ReviewDb db) throws OrmException;
|
PatchSet patchSet, String reason, ReviewDb db) throws OrmException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,7 +99,7 @@ public interface ChangeHooks {
|
|||||||
* @param reason Reason for abandoning the change.
|
* @param reason Reason for abandoning the change.
|
||||||
* @throws OrmException
|
* @throws OrmException
|
||||||
*/
|
*/
|
||||||
public void doChangeAbandonedHook(Change change, Account account,
|
void doChangeAbandonedHook(Change change, Account account,
|
||||||
PatchSet patchSet, String reason, ReviewDb db) throws OrmException;
|
PatchSet patchSet, String reason, ReviewDb db) throws OrmException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,7 +110,7 @@ public interface ChangeHooks {
|
|||||||
* @param reason Reason for restoring the change.
|
* @param reason Reason for restoring the change.
|
||||||
* @throws OrmException
|
* @throws OrmException
|
||||||
*/
|
*/
|
||||||
public void doChangeRestoredHook(Change change, Account account,
|
void doChangeRestoredHook(Change change, Account account,
|
||||||
PatchSet patchSet, String reason, ReviewDb db) throws OrmException;
|
PatchSet patchSet, String reason, ReviewDb db) throws OrmException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,7 +120,7 @@ public interface ChangeHooks {
|
|||||||
* @param refUpdate An actual RefUpdate object
|
* @param refUpdate An actual RefUpdate object
|
||||||
* @param account The gerrit user who moved the ref
|
* @param account The gerrit user who moved the ref
|
||||||
*/
|
*/
|
||||||
public void doRefUpdatedHook(Branch.NameKey refName, RefUpdate refUpdate,
|
void doRefUpdatedHook(Branch.NameKey refName, RefUpdate refUpdate,
|
||||||
Account account);
|
Account account);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -131,7 +131,7 @@ public interface ChangeHooks {
|
|||||||
* @param newId The ref's new id
|
* @param newId The ref's new id
|
||||||
* @param account The gerrit user who moved the ref
|
* @param account The gerrit user who moved the ref
|
||||||
*/
|
*/
|
||||||
public void doRefUpdatedHook(Branch.NameKey refName, ObjectId oldId,
|
void doRefUpdatedHook(Branch.NameKey refName, ObjectId oldId,
|
||||||
ObjectId newId, Account account);
|
ObjectId newId, Account account);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -141,7 +141,7 @@ public interface ChangeHooks {
|
|||||||
* @param patchSet The patchset that the reviewer was added on.
|
* @param patchSet The patchset that the reviewer was added on.
|
||||||
* @param account The gerrit user who was added as reviewer.
|
* @param account The gerrit user who was added as reviewer.
|
||||||
*/
|
*/
|
||||||
public void doReviewerAddedHook(Change change, Account account,
|
void doReviewerAddedHook(Change change, Account account,
|
||||||
PatchSet patchSet, ReviewDb db) throws OrmException;
|
PatchSet patchSet, ReviewDb db) throws OrmException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -151,10 +151,10 @@ public interface ChangeHooks {
|
|||||||
* @param account The gerrit user who changed the topic.
|
* @param account The gerrit user who changed the topic.
|
||||||
* @param oldTopic The old topic name.
|
* @param oldTopic The old topic name.
|
||||||
*/
|
*/
|
||||||
public void doTopicChangedHook(Change change, Account account,
|
void doTopicChangedHook(Change change, Account account,
|
||||||
String oldTopic, ReviewDb db) throws OrmException;
|
String oldTopic, ReviewDb db) throws OrmException;
|
||||||
|
|
||||||
public void doClaSignupHook(Account account, String claName);
|
void doClaSignupHook(Account account, String claName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fire the Ref update Hook
|
* Fire the Ref update Hook
|
||||||
@@ -165,7 +165,7 @@ public interface ChangeHooks {
|
|||||||
* @param oldId The ref's old id
|
* @param oldId The ref's old id
|
||||||
* @param newId The ref's new id
|
* @param newId The ref's new id
|
||||||
*/
|
*/
|
||||||
public HookResult doRefUpdateHook(Project project, String refName,
|
HookResult doRefUpdateHook(Project project, String refName,
|
||||||
Account uploader, ObjectId oldId, ObjectId newId);
|
Account uploader, ObjectId oldId, ObjectId newId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -178,7 +178,7 @@ public interface ChangeHooks {
|
|||||||
* @param db The database
|
* @param db The database
|
||||||
* @throws OrmException
|
* @throws OrmException
|
||||||
*/
|
*/
|
||||||
public void doHashtagsChangedHook(Change change, Account account,
|
void doHashtagsChangedHook(Change change, Account account,
|
||||||
Set<String>added, Set<String> removed, Set<String> hashtags,
|
Set<String>added, Set<String> removed, Set<String> hashtags,
|
||||||
ReviewDb db) throws OrmException;
|
ReviewDb db) throws OrmException;
|
||||||
|
|
||||||
@@ -188,5 +188,5 @@ public interface ChangeHooks {
|
|||||||
* @param project The project that was created
|
* @param project The project that was created
|
||||||
* @param headName The head name of the created project
|
* @param headName The head name of the created project
|
||||||
*/
|
*/
|
||||||
public void doProjectCreatedHook(Project.NameKey project, String headName);
|
void doProjectCreatedHook(Project.NameKey project, String headName);
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@ public interface EventDispatcher {
|
|||||||
* @param db The database
|
* @param db The database
|
||||||
* @throws OrmException
|
* @throws OrmException
|
||||||
*/
|
*/
|
||||||
public void postEvent(Change change, Event event, ReviewDb db)
|
void postEvent(Change change, Event event, ReviewDb db)
|
||||||
throws OrmException;
|
throws OrmException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,5 +40,5 @@ public interface EventDispatcher {
|
|||||||
* @param branchName The branch that the event is related to
|
* @param branchName The branch that the event is related to
|
||||||
* @param event The event to post
|
* @param event The event to post
|
||||||
*/
|
*/
|
||||||
public void postEvent(Branch.NameKey branchName, Event event);
|
void postEvent(Branch.NameKey branchName, Event event);
|
||||||
}
|
}
|
||||||
|
@@ -19,5 +19,5 @@ import com.google.gerrit.server.events.Event;
|
|||||||
|
|
||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface EventListener {
|
public interface EventListener {
|
||||||
public void onEvent(Event event);
|
void onEvent(Event event);
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@ import com.google.gerrit.server.CurrentUser;
|
|||||||
|
|
||||||
/** Distributes Events to ChangeListeners. Register listeners here. */
|
/** Distributes Events to ChangeListeners. Register listeners here. */
|
||||||
public interface EventSource {
|
public interface EventSource {
|
||||||
public void addEventListener(EventListener listener, CurrentUser user);
|
void addEventListener(EventListener listener, CurrentUser user);
|
||||||
|
|
||||||
public void removeEventListener(EventListener listener);
|
void removeEventListener(EventListener listener);
|
||||||
}
|
}
|
||||||
|
@@ -24,5 +24,5 @@ import com.google.gerrit.extensions.registration.RegistrationHandle;
|
|||||||
* @param <V> type of the metric value, typically Integer or Long.
|
* @param <V> type of the metric value, typically Integer or Long.
|
||||||
*/
|
*/
|
||||||
public interface CallbackMetric<V> extends RegistrationHandle {
|
public interface CallbackMetric<V> extends RegistrationHandle {
|
||||||
public void prune();
|
void prune();
|
||||||
}
|
}
|
||||||
|
@@ -30,5 +30,5 @@ import com.googlecode.prolog_cafe.lang.Predicate;
|
|||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface PredicateProvider {
|
public interface PredicateProvider {
|
||||||
/** Return set of packages that contain Prolog predicates */
|
/** Return set of packages that contain Prolog predicates */
|
||||||
public ImmutableSet<String> getPackages();
|
ImmutableSet<String> getPackages();
|
||||||
}
|
}
|
||||||
|
@@ -20,7 +20,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
/** Translates an email address to a set of matching accounts. */
|
/** Translates an email address to a set of matching accounts. */
|
||||||
public interface AccountByEmailCache {
|
public interface AccountByEmailCache {
|
||||||
public Set<Account.Id> get(String email);
|
Set<Account.Id> get(String email);
|
||||||
|
|
||||||
public void evict(String email);
|
void evict(String email);
|
||||||
}
|
}
|
||||||
|
@@ -18,13 +18,13 @@ import com.google.gerrit.reviewdb.client.Account;
|
|||||||
|
|
||||||
/** Caches important (but small) account state to avoid database hits. */
|
/** Caches important (but small) account state to avoid database hits. */
|
||||||
public interface AccountCache {
|
public interface AccountCache {
|
||||||
public AccountState get(Account.Id accountId);
|
AccountState get(Account.Id accountId);
|
||||||
|
|
||||||
public AccountState getIfPresent(Account.Id accountId);
|
AccountState getIfPresent(Account.Id accountId);
|
||||||
|
|
||||||
public AccountState getByUsername(String username);
|
AccountState getByUsername(String username);
|
||||||
|
|
||||||
public void evict(Account.Id accountId);
|
void evict(Account.Id accountId);
|
||||||
|
|
||||||
public void evictByUsername(String username);
|
void evictByUsername(String username);
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,7 @@ import java.util.Map;
|
|||||||
/** Access control management for server-wide capabilities. */
|
/** Access control management for server-wide capabilities. */
|
||||||
public class CapabilityControl {
|
public class CapabilityControl {
|
||||||
public static interface Factory {
|
public static interface Factory {
|
||||||
public CapabilityControl create(CurrentUser user);
|
CapabilityControl create(CurrentUser user);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final CapabilityCollection capabilities;
|
private final CapabilityCollection capabilities;
|
||||||
|
@@ -19,9 +19,9 @@ package com.google.gerrit.server.account;
|
|||||||
* Expands user name to a local email address, usually by adding a domain.
|
* Expands user name to a local email address, usually by adding a domain.
|
||||||
*/
|
*/
|
||||||
public interface EmailExpander {
|
public interface EmailExpander {
|
||||||
public boolean canExpand(String user);
|
boolean canExpand(String user);
|
||||||
|
|
||||||
public String expand(String user);
|
String expand(String user);
|
||||||
|
|
||||||
public static class None implements EmailExpander {
|
public static class None implements EmailExpander {
|
||||||
public static final None INSTANCE = new None();
|
public static final None INSTANCE = new None();
|
||||||
|
@@ -19,9 +19,9 @@ import com.google.gerrit.reviewdb.client.AccountGroup;
|
|||||||
|
|
||||||
/** Tracks group objects in memory for efficient access. */
|
/** Tracks group objects in memory for efficient access. */
|
||||||
public interface GroupCache {
|
public interface GroupCache {
|
||||||
public AccountGroup get(AccountGroup.Id groupId);
|
AccountGroup get(AccountGroup.Id groupId);
|
||||||
|
|
||||||
public AccountGroup get(AccountGroup.NameKey name);
|
AccountGroup get(AccountGroup.NameKey name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lookup a group definition by its UUID. The returned definition may be null
|
* Lookup a group definition by its UUID. The returned definition may be null
|
||||||
@@ -29,16 +29,16 @@ public interface GroupCache {
|
|||||||
* copied from another server.
|
* copied from another server.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public AccountGroup get(AccountGroup.UUID uuid);
|
AccountGroup get(AccountGroup.UUID uuid);
|
||||||
|
|
||||||
/** @return sorted iteration of groups. */
|
/** @return sorted iteration of groups. */
|
||||||
public abstract Iterable<AccountGroup> all();
|
Iterable<AccountGroup> all();
|
||||||
|
|
||||||
/** Notify the cache that a new group was constructed. */
|
/** Notify the cache that a new group was constructed. */
|
||||||
public void onCreateGroup(AccountGroup.NameKey newGroupName);
|
void onCreateGroup(AccountGroup.NameKey newGroupName);
|
||||||
|
|
||||||
public void evict(AccountGroup group);
|
void evict(AccountGroup group);
|
||||||
|
|
||||||
public void evictAfterRename(final AccountGroup.NameKey oldName,
|
void evictAfterRename(final AccountGroup.NameKey oldName,
|
||||||
final AccountGroup.NameKey newName);
|
final AccountGroup.NameKey newName);
|
||||||
}
|
}
|
||||||
|
@@ -21,14 +21,14 @@ import java.util.Set;
|
|||||||
/** Tracks group inclusions in memory for efficient access. */
|
/** Tracks group inclusions in memory for efficient access. */
|
||||||
public interface GroupIncludeCache {
|
public interface GroupIncludeCache {
|
||||||
/** @return groups directly a member of the passed group. */
|
/** @return groups directly a member of the passed group. */
|
||||||
public Set<AccountGroup.UUID> subgroupsOf(AccountGroup.UUID group);
|
Set<AccountGroup.UUID> subgroupsOf(AccountGroup.UUID group);
|
||||||
|
|
||||||
/** @return any groups the passed group belongs to. */
|
/** @return any groups the passed group belongs to. */
|
||||||
public Set<AccountGroup.UUID> parentGroupsOf(AccountGroup.UUID groupId);
|
Set<AccountGroup.UUID> parentGroupsOf(AccountGroup.UUID groupId);
|
||||||
|
|
||||||
/** @return set of any UUIDs that are not internal groups. */
|
/** @return set of any UUIDs that are not internal groups. */
|
||||||
public Set<AccountGroup.UUID> allExternalMembers();
|
Set<AccountGroup.UUID> allExternalMembers();
|
||||||
|
|
||||||
public void evictSubgroupsOf(AccountGroup.UUID groupId);
|
void evictSubgroupsOf(AccountGroup.UUID groupId);
|
||||||
public void evictParentGroupsOf(AccountGroup.UUID groupId);
|
void evictParentGroupsOf(AccountGroup.UUID groupId);
|
||||||
}
|
}
|
||||||
|
@@ -22,26 +22,26 @@ import java.util.Set;
|
|||||||
|
|
||||||
public interface Realm {
|
public interface Realm {
|
||||||
/** Can the end-user modify this field of their own account? */
|
/** Can the end-user modify this field of their own account? */
|
||||||
public boolean allowsEdit(Account.FieldName field);
|
boolean allowsEdit(Account.FieldName field);
|
||||||
|
|
||||||
/** Returns the account fields that the end-user can modify. */
|
/** Returns the account fields that the end-user can modify. */
|
||||||
public Set<Account.FieldName> getEditableFields();
|
Set<Account.FieldName> getEditableFields();
|
||||||
|
|
||||||
public AuthRequest authenticate(AuthRequest who) throws AccountException;
|
AuthRequest authenticate(AuthRequest who) throws AccountException;
|
||||||
|
|
||||||
public AuthRequest link(ReviewDb db, Account.Id to, AuthRequest who)
|
AuthRequest link(ReviewDb db, Account.Id to, AuthRequest who)
|
||||||
throws AccountException;
|
throws AccountException;
|
||||||
|
|
||||||
public AuthRequest unlink(ReviewDb db, Account.Id to, AuthRequest who)
|
AuthRequest unlink(ReviewDb db, Account.Id to, AuthRequest who)
|
||||||
throws AccountException;
|
throws AccountException;
|
||||||
|
|
||||||
public void onCreateAccount(AuthRequest who, Account account);
|
void onCreateAccount(AuthRequest who, Account account);
|
||||||
|
|
||||||
/** @return true if the user has the given email address. */
|
/** @return true if the user has the given email address. */
|
||||||
public boolean hasEmailAddress(IdentifiedUser who, String email);
|
boolean hasEmailAddress(IdentifiedUser who, String email);
|
||||||
|
|
||||||
/** @return all known email addresses for the identified user. */
|
/** @return all known email addresses for the identified user. */
|
||||||
public Set<String> getEmailAddresses(IdentifiedUser who);
|
Set<String> getEmailAddresses(IdentifiedUser who);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Locate an account whose local username is the given account name.
|
* Locate an account whose local username is the given account name.
|
||||||
@@ -51,5 +51,5 @@ public interface Realm {
|
|||||||
* how to convert the accountName into an email address, and then locate the
|
* how to convert the accountName into an email address, and then locate the
|
||||||
* user by that email address.
|
* user by that email address.
|
||||||
*/
|
*/
|
||||||
public Account.Id lookup(String accountName);
|
Account.Id lookup(String accountName);
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,7 @@ public interface AvatarProvider {
|
|||||||
* {@code null} is acceptable, and results in the server responding
|
* {@code null} is acceptable, and results in the server responding
|
||||||
* with a 404. This will hide the avatar image in the web UI.
|
* with a 404. This will hide the avatar image in the web UI.
|
||||||
*/
|
*/
|
||||||
public String getUrl(IdentifiedUser forUser, int imageSize);
|
String getUrl(IdentifiedUser forUser, int imageSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a URL for a user to modify their avatar image.
|
* Gets a URL for a user to modify their avatar image.
|
||||||
@@ -46,5 +46,5 @@ public interface AvatarProvider {
|
|||||||
* @return a URL the user should visit to modify their avatar, or null if
|
* @return a URL the user should visit to modify their avatar, or null if
|
||||||
* modification is not possible.
|
* modification is not possible.
|
||||||
*/
|
*/
|
||||||
public String getChangeAvatarUrl(IdentifiedUser forUser);
|
String getChangeAvatarUrl(IdentifiedUser forUser);
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@ package com.google.gerrit.server.cache;
|
|||||||
import com.google.common.cache.RemovalNotification;
|
import com.google.common.cache.RemovalNotification;
|
||||||
|
|
||||||
public interface CacheRemovalListener<K,V> {
|
public interface CacheRemovalListener<K,V> {
|
||||||
public void onRemoval(String pluginName,
|
void onRemoval(String pluginName,
|
||||||
String cacheName,
|
String cacheName,
|
||||||
RemovalNotification<K, V> notification);
|
RemovalNotification<K, V> notification);
|
||||||
}
|
}
|
@@ -29,8 +29,8 @@ import org.eclipse.jgit.lib.Repository;
|
|||||||
* implementation changes, which might invalidate old entries).
|
* implementation changes, which might invalidate old entries).
|
||||||
*/
|
*/
|
||||||
public interface ChangeKindCache {
|
public interface ChangeKindCache {
|
||||||
public ChangeKind getChangeKind(ProjectState project, Repository repo,
|
ChangeKind getChangeKind(ProjectState project, Repository repo,
|
||||||
ObjectId prior, ObjectId next);
|
ObjectId prior, ObjectId next);
|
||||||
|
|
||||||
public ChangeKind getChangeKind(ReviewDb db, Change change, PatchSet patch);
|
ChangeKind getChangeKind(ReviewDb db, Change change, PatchSet patch);
|
||||||
}
|
}
|
||||||
|
@@ -39,9 +39,9 @@ public interface MergeabilityCache {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean get(ObjectId commit, Ref intoRef, SubmitType submitType,
|
boolean get(ObjectId commit, Ref intoRef, SubmitType submitType,
|
||||||
String mergeStrategy, Branch.NameKey dest, Repository repo, ReviewDb db);
|
String mergeStrategy, Branch.NameKey dest, Repository repo, ReviewDb db);
|
||||||
|
|
||||||
public Boolean getIfPresent(ObjectId commit, Ref intoRef,
|
Boolean getIfPresent(ObjectId commit, Ref intoRef,
|
||||||
SubmitType submitType, String mergeStrategy);
|
SubmitType submitType, String mergeStrategy);
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,7 @@ import com.google.inject.assistedinject.AssistedInject;
|
|||||||
public class ProjectOwnerGroupsProvider extends GroupSetProvider {
|
public class ProjectOwnerGroupsProvider extends GroupSetProvider {
|
||||||
|
|
||||||
public interface Factory {
|
public interface Factory {
|
||||||
public ProjectOwnerGroupsProvider create(Project.NameKey project);
|
ProjectOwnerGroupsProvider create(Project.NameKey project);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AssistedInject
|
@AssistedInject
|
||||||
|
@@ -77,7 +77,7 @@ import java.util.TimeZone;
|
|||||||
*/
|
*/
|
||||||
public class BatchUpdate implements AutoCloseable {
|
public class BatchUpdate implements AutoCloseable {
|
||||||
public interface Factory {
|
public interface Factory {
|
||||||
public BatchUpdate create(ReviewDb db, Project.NameKey project,
|
BatchUpdate create(ReviewDb db, Project.NameKey project,
|
||||||
CurrentUser user, Timestamp when);
|
CurrentUser user, Timestamp when);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,5 +20,5 @@ import com.google.gerrit.reviewdb.client.Project;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ChangeCache {
|
public interface ChangeCache {
|
||||||
public List<Change> get(Project.NameKey name);
|
List<Change> get(Project.NameKey name);
|
||||||
}
|
}
|
||||||
|
@@ -41,7 +41,7 @@ public interface GitRepositoryManager {
|
|||||||
* repository.
|
* repository.
|
||||||
* @throws IOException the name cannot be read as a repository.
|
* @throws IOException the name cannot be read as a repository.
|
||||||
*/
|
*/
|
||||||
public abstract Repository openRepository(Project.NameKey name)
|
Repository openRepository(Project.NameKey name)
|
||||||
throws RepositoryNotFoundException, IOException;
|
throws RepositoryNotFoundException, IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -58,7 +58,7 @@ public interface GitRepositoryManager {
|
|||||||
* @throws RepositoryNotFoundException the name is invalid.
|
* @throws RepositoryNotFoundException the name is invalid.
|
||||||
* @throws IOException the repository cannot be created.
|
* @throws IOException the repository cannot be created.
|
||||||
*/
|
*/
|
||||||
public abstract Repository createRepository(Project.NameKey name)
|
Repository createRepository(Project.NameKey name)
|
||||||
throws RepositoryCaseMismatchException, RepositoryNotFoundException,
|
throws RepositoryCaseMismatchException, RepositoryNotFoundException,
|
||||||
IOException;
|
IOException;
|
||||||
|
|
||||||
@@ -76,11 +76,11 @@ public interface GitRepositoryManager {
|
|||||||
* repository.
|
* repository.
|
||||||
* @throws IOException the name cannot be read as a repository.
|
* @throws IOException the name cannot be read as a repository.
|
||||||
*/
|
*/
|
||||||
public abstract Repository openMetadataRepository(Project.NameKey name)
|
Repository openMetadataRepository(Project.NameKey name)
|
||||||
throws RepositoryNotFoundException, IOException;
|
throws RepositoryNotFoundException, IOException;
|
||||||
|
|
||||||
/** @return set of all known projects, sorted by natural NameKey order. */
|
/** @return set of all known projects, sorted by natural NameKey order. */
|
||||||
public abstract SortedSet<Project.NameKey> list();
|
SortedSet<Project.NameKey> list();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the {@code GIT_DIR/description} file for gitweb.
|
* Read the {@code GIT_DIR/description} file for gitweb.
|
||||||
@@ -94,7 +94,7 @@ public interface GitRepositoryManager {
|
|||||||
* @throws IOException the description file exists, but is not readable by
|
* @throws IOException the description file exists, but is not readable by
|
||||||
* this process.
|
* this process.
|
||||||
*/
|
*/
|
||||||
public abstract String getProjectDescription(Project.NameKey name)
|
String getProjectDescription(Project.NameKey name)
|
||||||
throws RepositoryNotFoundException, IOException;
|
throws RepositoryNotFoundException, IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -106,6 +106,6 @@ public interface GitRepositoryManager {
|
|||||||
* @param name the repository name, relative to the base directory.
|
* @param name the repository name, relative to the base directory.
|
||||||
* @param description new description text for the repository.
|
* @param description new description text for the repository.
|
||||||
*/
|
*/
|
||||||
public abstract void setProjectDescription(Project.NameKey name,
|
void setProjectDescription(Project.NameKey name,
|
||||||
final String description);
|
final String description);
|
||||||
}
|
}
|
||||||
|
@@ -19,5 +19,5 @@ public interface QueueProvider {
|
|||||||
INTERACTIVE, BATCH
|
INTERACTIVE, BATCH
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorkQueue.Executor getQueue(QueueType type);
|
WorkQueue.Executor getQueue(QueueType type);
|
||||||
}
|
}
|
||||||
|
@@ -32,5 +32,5 @@ public interface ReceivePackInitializer {
|
|||||||
* @param project project for which the ReceivePack is created
|
* @param project project for which the ReceivePack is created
|
||||||
* @param receivePack the ReceivePack instance which is being initialized
|
* @param receivePack the ReceivePack instance which is being initialized
|
||||||
*/
|
*/
|
||||||
public void init(Project.NameKey project, ReceivePack receivePack);
|
void init(Project.NameKey project, ReceivePack receivePack);
|
||||||
}
|
}
|
||||||
|
@@ -28,7 +28,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class TabFile {
|
public class TabFile {
|
||||||
public interface Parser {
|
public interface Parser {
|
||||||
public String parse(String str);
|
String parse(String str);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Parser TRIM = new Parser() {
|
public static Parser TRIM = new Parser() {
|
||||||
|
@@ -246,7 +246,7 @@ public class WorkQueue {
|
|||||||
/** Runnable needing to know it was canceled. */
|
/** Runnable needing to know it was canceled. */
|
||||||
public interface CancelableRunnable extends Runnable {
|
public interface CancelableRunnable extends Runnable {
|
||||||
/** Notifies the runnable it was canceled. */
|
/** Notifies the runnable it was canceled. */
|
||||||
public void cancel();
|
void cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A wrapper around a scheduled Runnable, as maintained in the queue. */
|
/** A wrapper around a scheduled Runnable, as maintained in the queue. */
|
||||||
|
@@ -34,6 +34,6 @@ public interface CommitValidationListener {
|
|||||||
* @return list of validation messages
|
* @return list of validation messages
|
||||||
* @throws CommitValidationException if validation fails
|
* @throws CommitValidationException if validation fails
|
||||||
*/
|
*/
|
||||||
public List<CommitValidationMessage> onCommitReceived(CommitReceivedEvent receiveEvent)
|
List<CommitValidationMessage> onCommitReceived(CommitReceivedEvent receiveEvent)
|
||||||
throws CommitValidationException;
|
throws CommitValidationException;
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ public interface MergeValidationListener {
|
|||||||
* @param patchSetId the patch set ID
|
* @param patchSetId the patch set ID
|
||||||
* @throws MergeValidationException if the commit fails to validate
|
* @throws MergeValidationException if the commit fails to validate
|
||||||
*/
|
*/
|
||||||
public void onPreMerge(Repository repo,
|
void onPreMerge(Repository repo,
|
||||||
CodeReviewCommit commit,
|
CodeReviewCommit commit,
|
||||||
ProjectState destProject,
|
ProjectState destProject,
|
||||||
Branch.NameKey destBranch,
|
Branch.NameKey destBranch,
|
||||||
|
@@ -51,7 +51,7 @@ public interface UploadValidationListener {
|
|||||||
* @throws ValidationException to block the upload and send a message
|
* @throws ValidationException to block the upload and send a message
|
||||||
* back to the end-user over the client's protocol connection.
|
* back to the end-user over the client's protocol connection.
|
||||||
*/
|
*/
|
||||||
public void onPreUpload(Repository repository, Project project,
|
void onPreUpload(Repository repository, Project project,
|
||||||
String remoteHost, UploadPack up, Collection<? extends ObjectId> wants,
|
String remoteHost, UploadPack up, Collection<? extends ObjectId> wants,
|
||||||
Collection<? extends ObjectId> haves)
|
Collection<? extends ObjectId> haves)
|
||||||
throws ValidationException;
|
throws ValidationException;
|
||||||
|
@@ -35,10 +35,10 @@ import java.io.IOException;
|
|||||||
*/
|
*/
|
||||||
public interface ChangeIndex {
|
public interface ChangeIndex {
|
||||||
/** @return the schema version used by this index. */
|
/** @return the schema version used by this index. */
|
||||||
public Schema<ChangeData> getSchema();
|
Schema<ChangeData> getSchema();
|
||||||
|
|
||||||
/** Close this index. */
|
/** Close this index. */
|
||||||
public void close();
|
void close();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update a change document in the index.
|
* Update a change document in the index.
|
||||||
@@ -52,7 +52,7 @@ public interface ChangeIndex {
|
|||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public void replace(ChangeData cd) throws IOException;
|
void replace(ChangeData cd) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a change document from the index by id.
|
* Delete a change document from the index by id.
|
||||||
@@ -61,14 +61,14 @@ public interface ChangeIndex {
|
|||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public void delete(Change.Id id) throws IOException;
|
void delete(Change.Id id) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete all change documents from the index.
|
* Delete all change documents from the index.
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public void deleteAll() throws IOException;
|
void deleteAll() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert the given operator predicate into a source searching the index and
|
* Convert the given operator predicate into a source searching the index and
|
||||||
@@ -90,7 +90,7 @@ public interface ChangeIndex {
|
|||||||
* @throws QueryParseException if the predicate could not be converted to an
|
* @throws QueryParseException if the predicate could not be converted to an
|
||||||
* indexed data source.
|
* indexed data source.
|
||||||
*/
|
*/
|
||||||
public ChangeDataSource getSource(Predicate<ChangeData> p, QueryOptions opts)
|
ChangeDataSource getSource(Predicate<ChangeData> p, QueryOptions opts)
|
||||||
throws QueryParseException;
|
throws QueryParseException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,5 +99,5 @@ public interface ChangeIndex {
|
|||||||
* @param ready whether the index is ready
|
* @param ready whether the index is ready
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public void markReady(boolean ready) throws IOException;
|
void markReady(boolean ready) throws IOException;
|
||||||
}
|
}
|
||||||
|
@@ -25,9 +25,9 @@ import java.util.List;
|
|||||||
|
|
||||||
public class AddKeySender extends OutgoingEmail {
|
public class AddKeySender extends OutgoingEmail {
|
||||||
public interface Factory {
|
public interface Factory {
|
||||||
public AddKeySender create(IdentifiedUser user, AccountSshKey sshKey);
|
AddKeySender create(IdentifiedUser user, AccountSshKey sshKey);
|
||||||
|
|
||||||
public AddKeySender create(IdentifiedUser user, List<String> gpgKey);
|
AddKeySender create(IdentifiedUser user, List<String> gpgKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final IdentifiedUser callingUser;
|
private final IdentifiedUser callingUser;
|
||||||
|
@@ -52,7 +52,7 @@ public class CommentSender extends ReplyToChangeSender {
|
|||||||
.getLogger(CommentSender.class);
|
.getLogger(CommentSender.class);
|
||||||
|
|
||||||
public static interface Factory {
|
public static interface Factory {
|
||||||
public CommentSender create(NotifyHandling notify, Change.Id id);
|
CommentSender create(NotifyHandling notify, Change.Id id);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final NotifyHandling notify;
|
private final NotifyHandling notify;
|
||||||
|
@@ -33,7 +33,7 @@ public class CreateChangeSender extends NewChangeSender {
|
|||||||
LoggerFactory.getLogger(CreateChangeSender.class);
|
LoggerFactory.getLogger(CreateChangeSender.class);
|
||||||
|
|
||||||
public static interface Factory {
|
public static interface Factory {
|
||||||
public CreateChangeSender create(Change.Id id);
|
CreateChangeSender create(Change.Id id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@@ -28,7 +28,7 @@ public interface EmailTokenVerifier {
|
|||||||
* the string provides proof the user has the ability to read messages
|
* the string provides proof the user has the ability to read messages
|
||||||
* sent to that address. Must not be null.
|
* sent to that address. Must not be null.
|
||||||
*/
|
*/
|
||||||
public String encode(Account.Id accountId, String emailAddress);
|
String encode(Account.Id accountId, String emailAddress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode a token previously created.
|
* Decode a token previously created.
|
||||||
@@ -36,7 +36,7 @@ public interface EmailTokenVerifier {
|
|||||||
* @return a pair of account id and email address.
|
* @return a pair of account id and email address.
|
||||||
* @throws InvalidTokenException the token is invalid, expired, malformed, etc.
|
* @throws InvalidTokenException the token is invalid, expired, malformed, etc.
|
||||||
*/
|
*/
|
||||||
public ParsedToken decode(String tokenString) throws InvalidTokenException;
|
ParsedToken decode(String tokenString) throws InvalidTokenException;
|
||||||
|
|
||||||
/** Exception thrown when a token does not parse correctly. */
|
/** Exception thrown when a token does not parse correctly. */
|
||||||
public static class InvalidTokenException extends Exception {
|
public static class InvalidTokenException extends Exception {
|
||||||
|
@@ -18,7 +18,7 @@ import com.google.gerrit.reviewdb.client.Account;
|
|||||||
|
|
||||||
/** Constructs an address to send email from. */
|
/** Constructs an address to send email from. */
|
||||||
public interface FromAddressGenerator {
|
public interface FromAddressGenerator {
|
||||||
public boolean isGenericAddress(Account.Id fromId);
|
boolean isGenericAddress(Account.Id fromId);
|
||||||
|
|
||||||
public Address from(Account.Id fromId);
|
Address from(Account.Id fromId);
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,7 @@ import com.google.inject.assistedinject.Assisted;
|
|||||||
/** Send notice about a change failing to merged. */
|
/** Send notice about a change failing to merged. */
|
||||||
public class MergeFailSender extends ReplyToChangeSender {
|
public class MergeFailSender extends ReplyToChangeSender {
|
||||||
public static interface Factory {
|
public static interface Factory {
|
||||||
public MergeFailSender create(Change.Id id);
|
MergeFailSender create(Change.Id id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@@ -31,7 +31,7 @@ import com.google.inject.assistedinject.Assisted;
|
|||||||
/** Send notice about a change successfully merged. */
|
/** Send notice about a change successfully merged. */
|
||||||
public class MergedSender extends ReplyToChangeSender {
|
public class MergedSender extends ReplyToChangeSender {
|
||||||
public static interface Factory {
|
public static interface Factory {
|
||||||
public MergedSender create(Change.Id id);
|
MergedSender create(Change.Id id);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final LabelTypes labelTypes;
|
private final LabelTypes labelTypes;
|
||||||
|
@@ -23,7 +23,7 @@ import com.google.inject.assistedinject.Assisted;
|
|||||||
|
|
||||||
public class RegisterNewEmailSender extends OutgoingEmail {
|
public class RegisterNewEmailSender extends OutgoingEmail {
|
||||||
public interface Factory {
|
public interface Factory {
|
||||||
public RegisterNewEmailSender create(String address);
|
RegisterNewEmailSender create(String address);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final EmailTokenVerifier tokenVerifier;
|
private final EmailTokenVerifier tokenVerifier;
|
||||||
|
@@ -31,7 +31,7 @@ import java.util.Set;
|
|||||||
/** Send notice of new patch sets for reviewers. */
|
/** Send notice of new patch sets for reviewers. */
|
||||||
public class ReplacePatchSetSender extends ReplyToChangeSender {
|
public class ReplacePatchSetSender extends ReplyToChangeSender {
|
||||||
public static interface Factory {
|
public static interface Factory {
|
||||||
public ReplacePatchSetSender create(Change.Id id);
|
ReplacePatchSetSender create(Change.Id id);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Set<Account.Id> reviewers = new HashSet<>();
|
private final Set<Account.Id> reviewers = new HashSet<>();
|
||||||
|
@@ -22,7 +22,7 @@ import com.google.gwtorm.server.OrmException;
|
|||||||
/** Alert a user to a reply to a change, usually commentary made during review. */
|
/** Alert a user to a reply to a change, usually commentary made during review. */
|
||||||
public abstract class ReplyToChangeSender extends ChangeEmail {
|
public abstract class ReplyToChangeSender extends ChangeEmail {
|
||||||
public static interface Factory<T extends ReplyToChangeSender> {
|
public static interface Factory<T extends ReplyToChangeSender> {
|
||||||
public T create(Change.Id id);
|
T create(Change.Id id);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ReplyToChangeSender(EmailArguments ea, String mc, ChangeData cd)
|
protected ReplyToChangeSender(EmailArguments ea, String mc, ChangeData cd)
|
||||||
|
@@ -31,7 +31,7 @@ public interface FileTypeRegistry {
|
|||||||
* or cannot be determined, {@link MimeUtil2#UNKNOWN_MIME_TYPE} which
|
* or cannot be determined, {@link MimeUtil2#UNKNOWN_MIME_TYPE} which
|
||||||
* is an alias for {@code application/octet-stream}.
|
* is an alias for {@code application/octet-stream}.
|
||||||
*/
|
*/
|
||||||
public abstract MimeType getMimeType(final String path, final byte[] content);
|
MimeType getMimeType(final String path, final byte[] content);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is this content type safe to transmit to a browser directly?
|
* Is this content type safe to transmit to a browser directly?
|
||||||
@@ -42,6 +42,6 @@ public interface FileTypeRegistry {
|
|||||||
* content type and wants it to be protected (typically by wrapping
|
* content type and wants it to be protected (typically by wrapping
|
||||||
* the data in a ZIP archive).
|
* the data in a ZIP archive).
|
||||||
*/
|
*/
|
||||||
public abstract boolean isSafeInline(final MimeType type);
|
boolean isSafeInline(final MimeType type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -20,12 +20,12 @@ import com.google.gerrit.reviewdb.client.Project;
|
|||||||
|
|
||||||
/** Provides a cached list of {@link PatchListEntry}. */
|
/** Provides a cached list of {@link PatchListEntry}. */
|
||||||
public interface PatchListCache {
|
public interface PatchListCache {
|
||||||
public PatchList get(PatchListKey key, Project.NameKey project)
|
PatchList get(PatchListKey key, Project.NameKey project)
|
||||||
throws PatchListNotAvailableException;
|
throws PatchListNotAvailableException;
|
||||||
|
|
||||||
public PatchList get(Change change, PatchSet patchSet)
|
PatchList get(Change change, PatchSet patchSet)
|
||||||
throws PatchListNotAvailableException;
|
throws PatchListNotAvailableException;
|
||||||
|
|
||||||
public IntraLineDiff getIntraLineDiff(IntraLineDiffKey key,
|
IntraLineDiff getIntraLineDiff(IntraLineDiffKey key,
|
||||||
IntraLineDiffArgs args);
|
IntraLineDiffArgs args);
|
||||||
}
|
}
|
||||||
|
@@ -16,5 +16,5 @@ package com.google.gerrit.server.plugins;
|
|||||||
|
|
||||||
/** Broadcasts event indicating a plugin was reloaded. */
|
/** Broadcasts event indicating a plugin was reloaded. */
|
||||||
public interface ReloadPluginListener {
|
public interface ReloadPluginListener {
|
||||||
public void onReloadPlugin(Plugin oldPlugin, Plugin newPlugin);
|
void onReloadPlugin(Plugin oldPlugin, Plugin newPlugin);
|
||||||
}
|
}
|
||||||
|
@@ -16,5 +16,5 @@ package com.google.gerrit.server.plugins;
|
|||||||
|
|
||||||
/** Broadcasts event indicating a plugin was loaded. */
|
/** Broadcasts event indicating a plugin was loaded. */
|
||||||
public interface StartPluginListener {
|
public interface StartPluginListener {
|
||||||
public void onStartPlugin(Plugin plugin);
|
void onStartPlugin(Plugin plugin);
|
||||||
}
|
}
|
||||||
|
@@ -16,5 +16,5 @@ package com.google.gerrit.server.plugins;
|
|||||||
|
|
||||||
/** Broadcasts event indicating a plugin was unloaded. */
|
/** Broadcasts event indicating a plugin was unloaded. */
|
||||||
public interface StopPluginListener {
|
public interface StopPluginListener {
|
||||||
public void onStopPlugin(Plugin plugin);
|
void onStopPlugin(Plugin plugin);
|
||||||
}
|
}
|
||||||
|
@@ -23,10 +23,10 @@ import java.util.Set;
|
|||||||
/** Cache of project information, including access rights. */
|
/** Cache of project information, including access rights. */
|
||||||
public interface ProjectCache {
|
public interface ProjectCache {
|
||||||
/** @return the parent state for all projects on this server. */
|
/** @return the parent state for all projects on this server. */
|
||||||
public ProjectState getAllProjects();
|
ProjectState getAllProjects();
|
||||||
|
|
||||||
/** @return the project state of the project storing meta data for all users. */
|
/** @return the project state of the project storing meta data for all users. */
|
||||||
public ProjectState getAllUsers();
|
ProjectState getAllUsers();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the cached data for a project by its unique name.
|
* Get the cached data for a project by its unique name.
|
||||||
@@ -35,7 +35,7 @@ public interface ProjectCache {
|
|||||||
* @return the cached data; null if no such project exists or a error occurred.
|
* @return the cached data; null if no such project exists or a error occurred.
|
||||||
* @see #checkedGet(com.google.gerrit.reviewdb.client.Project.NameKey)
|
* @see #checkedGet(com.google.gerrit.reviewdb.client.Project.NameKey)
|
||||||
*/
|
*/
|
||||||
public ProjectState get(Project.NameKey projectName);
|
ProjectState get(Project.NameKey projectName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the cached data for a project by its unique name.
|
* Get the cached data for a project by its unique name.
|
||||||
@@ -44,14 +44,14 @@ public interface ProjectCache {
|
|||||||
* @throws IOException when there was an error.
|
* @throws IOException when there was an error.
|
||||||
* @return the cached data; null if no such project exists.
|
* @return the cached data; null if no such project exists.
|
||||||
*/
|
*/
|
||||||
public ProjectState checkedGet(Project.NameKey projectName)
|
ProjectState checkedGet(Project.NameKey projectName)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/** Invalidate the cached information about the given project. */
|
/** Invalidate the cached information about the given project. */
|
||||||
public void evict(Project p);
|
void evict(Project p);
|
||||||
|
|
||||||
/** Invalidate the cached information about the given project. */
|
/** Invalidate the cached information about the given project. */
|
||||||
public void evict(Project.NameKey p);
|
void evict(Project.NameKey p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove information about the given project from the cache. It will no
|
* Remove information about the given project from the cache. It will no
|
||||||
@@ -60,14 +60,14 @@ public interface ProjectCache {
|
|||||||
void remove(Project p);
|
void remove(Project p);
|
||||||
|
|
||||||
/** @return sorted iteration of projects. */
|
/** @return sorted iteration of projects. */
|
||||||
public abstract Iterable<Project.NameKey> all();
|
Iterable<Project.NameKey> all();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return estimated set of relevant groups extracted from hot project access
|
* @return estimated set of relevant groups extracted from hot project access
|
||||||
* rules. If the cache is cold or too small for the entire project set
|
* rules. If the cache is cold or too small for the entire project set
|
||||||
* of the server, this set may be incomplete.
|
* of the server, this set may be incomplete.
|
||||||
*/
|
*/
|
||||||
public abstract Set<AccountGroup.UUID> guessRelevantGroupUUIDs();
|
Set<AccountGroup.UUID> guessRelevantGroupUUIDs();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the set of registered project names by common prefix.
|
* Filter the set of registered project names by common prefix.
|
||||||
@@ -75,8 +75,8 @@ public interface ProjectCache {
|
|||||||
* @param prefix common prefix.
|
* @param prefix common prefix.
|
||||||
* @return sorted iteration of projects sharing the same prefix.
|
* @return sorted iteration of projects sharing the same prefix.
|
||||||
*/
|
*/
|
||||||
public abstract Iterable<Project.NameKey> byName(String prefix);
|
Iterable<Project.NameKey> byName(String prefix);
|
||||||
|
|
||||||
/** Notify the cache that a new project was constructed. */
|
/** Notify the cache that a new project was constructed. */
|
||||||
public void onCreateProject(Project.NameKey newProjectName);
|
void onCreateProject(Project.NameKey newProjectName);
|
||||||
}
|
}
|
||||||
|
@@ -19,8 +19,8 @@ import com.google.gwtorm.server.ResultSet;
|
|||||||
|
|
||||||
public interface DataSource<T> {
|
public interface DataSource<T> {
|
||||||
/** @return an estimate of the number of results from {@link #read()}. */
|
/** @return an estimate of the number of results from {@link #read()}. */
|
||||||
public int getCardinality();
|
int getCardinality();
|
||||||
|
|
||||||
/** @return read from the database and return the results. */
|
/** @return read from the database and return the results. */
|
||||||
public ResultSet<T> read() throws OrmException;
|
ResultSet<T> read() throws OrmException;
|
||||||
}
|
}
|
||||||
|
@@ -18,5 +18,5 @@ import com.google.gerrit.server.query.DataSource;
|
|||||||
|
|
||||||
public interface ChangeDataSource extends DataSource<ChangeData> {
|
public interface ChangeDataSource extends DataSource<ChangeData> {
|
||||||
/** @return true if all returned ChangeData.hasChange() will be true. */
|
/** @return true if all returned ChangeData.hasChange() will be true. */
|
||||||
public boolean hasChange();
|
boolean hasChange();
|
||||||
}
|
}
|
||||||
|
@@ -18,8 +18,8 @@ import com.google.gerrit.common.Nullable;
|
|||||||
|
|
||||||
public interface ConflictsCache {
|
public interface ConflictsCache {
|
||||||
|
|
||||||
public void put(ConflictKey key, Boolean value);
|
void put(ConflictKey key, Boolean value);
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public Boolean getIfPresent(ConflictKey key);
|
Boolean getIfPresent(ConflictKey key);
|
||||||
}
|
}
|
||||||
|
@@ -20,11 +20,11 @@ import java.io.IOException;
|
|||||||
/** Abstraction of a supported database platform */
|
/** Abstraction of a supported database platform */
|
||||||
public interface DataSourceType {
|
public interface DataSourceType {
|
||||||
|
|
||||||
public String getDriver();
|
String getDriver();
|
||||||
|
|
||||||
public String getUrl();
|
String getUrl();
|
||||||
|
|
||||||
public boolean usePool();
|
boolean usePool();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a ScriptRunner that runs the index script. Must not return
|
* Return a ScriptRunner that runs the index script. Must not return
|
||||||
@@ -32,5 +32,5 @@ public interface DataSourceType {
|
|||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public ScriptRunner getIndexScript() throws IOException;
|
ScriptRunner getIndexScript() throws IOException;
|
||||||
}
|
}
|
||||||
|
@@ -19,8 +19,8 @@ import com.google.gerrit.reviewdb.client.AccountSshKey;
|
|||||||
|
|
||||||
/** Permits controlling the contents of the SSH key cache area. */
|
/** Permits controlling the contents of the SSH key cache area. */
|
||||||
public interface SshKeyCache {
|
public interface SshKeyCache {
|
||||||
public void evict(String username);
|
void evict(String username);
|
||||||
|
|
||||||
public AccountSshKey create(AccountSshKey.Id id, String encoded)
|
AccountSshKey create(AccountSshKey.Id id, String encoded)
|
||||||
throws InvalidSshKeyException;
|
throws InvalidSshKeyException;
|
||||||
}
|
}
|
||||||
|
@@ -20,9 +20,9 @@ import java.util.SortedSet;
|
|||||||
public class TreeFormatter {
|
public class TreeFormatter {
|
||||||
|
|
||||||
public static interface TreeNode {
|
public static interface TreeNode {
|
||||||
public String getDisplayName();
|
String getDisplayName();
|
||||||
public boolean isVisible();
|
boolean isVisible();
|
||||||
public SortedSet<? extends TreeNode> getChildren();
|
SortedSet<? extends TreeNode> getChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String NOT_VISIBLE_NODE = "(x)";
|
public static final String NOT_VISIBLE_NODE = "(x)";
|
||||||
|
@@ -30,6 +30,6 @@ public interface GroupCreationValidationListener {
|
|||||||
* @param args arguments for the group creation
|
* @param args arguments for the group creation
|
||||||
* @throws ValidationException if validation fails
|
* @throws ValidationException if validation fails
|
||||||
*/
|
*/
|
||||||
public void validateNewGroup(CreateGroupArgs args)
|
void validateNewGroup(CreateGroupArgs args)
|
||||||
throws ValidationException;
|
throws ValidationException;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,6 @@ public interface HashtagValidationListener {
|
|||||||
* @param toRemove the hashtags to be removed
|
* @param toRemove the hashtags to be removed
|
||||||
* @throws ValidationException if validation fails
|
* @throws ValidationException if validation fails
|
||||||
*/
|
*/
|
||||||
public void validateHashtags(Change change, Set<String> toAdd,
|
void validateHashtags(Change change, Set<String> toAdd,
|
||||||
Set<String> toRemove) throws ValidationException;
|
Set<String> toRemove) throws ValidationException;
|
||||||
}
|
}
|
||||||
|
@@ -55,6 +55,6 @@ public interface OutgoingEmailValidationListener {
|
|||||||
* @param args E-mail properties. Some are mutable.
|
* @param args E-mail properties. Some are mutable.
|
||||||
* @throws ValidationException if validation fails.
|
* @throws ValidationException if validation fails.
|
||||||
*/
|
*/
|
||||||
public void validateOutgoingEmail(OutgoingEmailValidationListener.Args args)
|
void validateOutgoingEmail(OutgoingEmailValidationListener.Args args)
|
||||||
throws ValidationException;
|
throws ValidationException;
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,6 @@ public interface ProjectCreationValidationListener {
|
|||||||
* @param args arguments for the project creation
|
* @param args arguments for the project creation
|
||||||
* @throws ValidationException if validation fails
|
* @throws ValidationException if validation fails
|
||||||
*/
|
*/
|
||||||
public void validateNewProject(CreateProjectArgs args)
|
void validateNewProject(CreateProjectArgs args)
|
||||||
throws ValidationException;
|
throws ValidationException;
|
||||||
}
|
}
|
||||||
|
@@ -489,16 +489,16 @@ public abstract class BaseCommand implements Command {
|
|||||||
|
|
||||||
/** Runnable function which can throw an exception. */
|
/** Runnable function which can throw an exception. */
|
||||||
public static interface CommandRunnable {
|
public static interface CommandRunnable {
|
||||||
public void run() throws Exception;
|
void run() throws Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Runnable function which can retrieve a project name related to the task */
|
/** Runnable function which can retrieve a project name related to the task */
|
||||||
public static interface ProjectCommandRunnable extends CommandRunnable {
|
public static interface ProjectCommandRunnable extends CommandRunnable {
|
||||||
// execute parser command before running, in order to be able to retrieve
|
// execute parser command before running, in order to be able to retrieve
|
||||||
// project name
|
// project name
|
||||||
public void executeParseCommand() throws Exception;
|
void executeParseCommand() throws Exception;
|
||||||
|
|
||||||
public Project.NameKey getProjectName();
|
Project.NameKey getProjectName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Thrown from {@link CommandRunnable#run()} with client message and code. */
|
/** Thrown from {@link CommandRunnable#run()} with client message and code. */
|
||||||
|
Reference in New Issue
Block a user