James Moger
2014-03-26 617909819cd1b955647dd8584036fc7b2a014265
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
5bed29 26     protected void setup(UserModel user) {
eec333 27         // commands in this dispatcher
5bed29 28         register(user, VersionCommand.class);
JM 29         register(user, ConfigCommand.class);
eec333 30
JM 31         // nested dispatchers
5bed29 32         register(user, ListDispatcher.class);
JM 33         register(user, KeysDispatcher.class);
34         register(user, TicketsDispatcher.class);
35         register(user, UsersDispatcher.class);
36         register(user, ProjectsDispatcher.class);
37         register(user, RepositoriesDispatcher.class);
9d44ad 38     }
JM 39 }