Add an event for the update of a project's HEAD
When the HEAD of a project is updated Gerrit now informs about this by sending an event. Plugins can implement a listener to be notified about this event. Having this new event enables the replication plugin to replicate HEAD updates. Change-Id: I4dd7969020880190668190e8345197a23dbc92f1 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// Copyright (C) 2013 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;
|
||||
|
||||
/** Notified whenever the HEAD of a project is updated. */
|
||||
@ExtensionPoint
|
||||
public interface HeadUpdatedListener {
|
||||
public interface Event {
|
||||
String getProjectName();
|
||||
String getOldHeadName();
|
||||
String getNewHeadName();
|
||||
}
|
||||
|
||||
void onHeadUpdated(Event event);
|
||||
}
|
Reference in New Issue
Block a user