Define missing Change API events

Core gerrit has defined a place for events which are to be exposed
as an API, and newer events have often been defined there.  Gerrit also
has older events that it fires for most important things which were
designed for the stream events.  Define newer events in the API
to mirror the older events that were only defined for stream events.
Use the new API objects (ChangeInfo...) when appropriate in these newer
events.

If we want to move the hooks and stream events to plugins, we want them
to listen to modern API events. This change helps define these modern
events.

Change-Id: Ic1fe0743d048707a9a28f467b249dab70836f79c
This commit is contained in:
Martin Fick
2015-11-09 16:33:19 -07:00
committed by David Pursehouse
parent 301a3cbf3e
commit 32c126204b
19 changed files with 379 additions and 8 deletions

View File

@@ -0,0 +1,28 @@
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.extensions.events;
import com.google.gerrit.extensions.annotations.ExtensionPoint;
import com.google.gerrit.extensions.common.AccountInfo;
/** Notified whenever a Draft is published. */
@ExtensionPoint
public interface DraftPublishedListener {
interface Event extends RevisionEvent {
AccountInfo getPublisher();
}
void onDraftPublished(Event event);
}