Send event and execute hooks when topic is changed

When the topic is changed via the web UI or the REST API, send
an event to the event stream and execute a hook.

Bug: Issue 1992
Change-Id: Iba55469d50762478478eb07d9e2d8b0222ee3fd5
This commit is contained in:
David Pursehouse
2013-07-12 14:48:51 +09:00
parent 68ba072e48
commit ba3e28d29d
8 changed files with 96 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
// 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.server.events;
import com.google.gerrit.server.data.AccountAttribute;
import com.google.gerrit.server.data.ChangeAttribute;
public class TopicChangedEvent extends ChangeEvent {
public final String type = "topic-changed";
public ChangeAttribute change;
public AccountAttribute changer;
public String oldTopic;
}