commit | author | age
|
9d44ad
|
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.transport.ssh.gitblit; |
|
17 |
|
|
18 |
import com.gitblit.models.UserModel; |
261ddf
|
19 |
import com.gitblit.transport.ssh.commands.CommandMetaData; |
9d44ad
|
20 |
import com.gitblit.transport.ssh.commands.DispatchCommand; |
JM |
21 |
|
|
22 |
@CommandMetaData(name = "gitblit", description = "Gitblit server commands") |
261ddf
|
23 |
public class GitblitDispatcher extends DispatchCommand { |
9d44ad
|
24 |
|
JM |
25 |
@Override |
|
26 |
protected void registerCommands(UserModel user) { |
eec333
|
27 |
// commands in this dispatcher |
9d44ad
|
28 |
registerCommand(user, VersionCommand.class); |
JM |
29 |
registerCommand(user, CreateRepository.class); |
|
30 |
registerCommand(user, SetAccountCommand.class); |
eec333
|
31 |
|
JM |
32 |
// nested dispatchers |
|
33 |
registerDispatcher(user, ListDispatcher.class); |
|
34 |
registerDispatcher(user, KeysDispatcher.class); |
|
35 |
registerDispatcher(user, TicketsDispatcher.class); |
9d44ad
|
36 |
} |
JM |
37 |
} |