commit | author | age
|
ca4d98
|
1 |
/* |
JM |
2 |
* Copyright 2014 gitblit.com. |
|
3 |
* |
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
*/ |
|
16 |
package com.gitblit.extensions; |
|
17 |
|
|
18 |
import ro.fortsoft.pf4j.ExtensionPoint; |
|
19 |
|
|
20 |
import com.gitblit.models.RepositoryModel; |
|
21 |
|
|
22 |
/** |
|
23 |
* Extension point to allow plugins to listen to major repository lifecycle events. |
|
24 |
* |
|
25 |
* @author James Moger |
|
26 |
* @since 1.6.0 |
|
27 |
*/ |
|
28 |
public abstract class RepositoryLifeCycleListener implements ExtensionPoint { |
|
29 |
|
|
30 |
/** |
|
31 |
* Called after a repository has been created. |
|
32 |
* |
|
33 |
* @param repository |
|
34 |
* @since 1.6.0 |
|
35 |
*/ |
|
36 |
public abstract void onCreation(RepositoryModel repository); |
|
37 |
|
|
38 |
/** |
8a28d0
|
39 |
* Called after a repository has been forked. |
JM |
40 |
* |
|
41 |
* @param origin |
|
42 |
* @param fork |
|
43 |
* @since 1.7.0 |
|
44 |
*/ |
|
45 |
public abstract void onFork(RepositoryModel origin, RepositoryModel fork); |
|
46 |
|
|
47 |
/** |
|
48 |
* Called after a repository has been renamed. |
|
49 |
* |
|
50 |
* @param oldName |
|
51 |
* @param repository |
|
52 |
* @since 1.7.0 |
|
53 |
*/ |
|
54 |
public abstract void onRename(String oldName, RepositoryModel repository); |
|
55 |
|
|
56 |
/** |
ca4d98
|
57 |
* Called after a repository has been deleted. |
JM |
58 |
* |
|
59 |
* @param repository |
|
60 |
* @since 1.6.0 |
|
61 |
*/ |
|
62 |
public abstract void onDeletion(RepositoryModel repository); |
|
63 |
} |