James Moger
2015-10-10 a3a18a0ebfeb65777ad5bd065e26fa9c00e8100c
commit | author | age
db4f6b 1 /*
JM 2  * Copyright 2013 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.manager;
17
18 import java.util.Collection;
19
20 import com.gitblit.GitBlitException;
21 import com.gitblit.models.GitClientApplication;
22 import com.gitblit.models.RepositoryModel;
23 import com.gitblit.models.TeamModel;
24 import com.gitblit.models.UserModel;
5e3521 25 import com.gitblit.tickets.ITicketService;
245836 26 import com.gitblit.transport.ssh.IPublicKeyManager;
db4f6b 27
3a9e76 28 public interface IGitblit extends IManager,
JM 29                                     IRuntimeManager,
41a7e4 30                                     IPluginManager,
3a9e76 31                                     INotificationManager,
JM 32                                     IUserManager,
33                                     IAuthenticationManager,
34                                     IRepositoryManager,
35                                     IProjectManager,
bd0e83 36                                     IFederationManager,
PM 37                                     IFilestoreManager {
db4f6b 38
JM 39     /**
5ae529 40      * Creates a complete user object.
db4f6b 41      *
JM 42      * @param user
43      * @param isCreate
44      * @throws GitBlitException
3a6499 45      * @since 1.4.0
db4f6b 46      */
5ae529 47     void addUser(UserModel user) throws GitBlitException;
JM 48
49     /**
50      * Updates a complete user object keyed by username. This method allows
51      * for renaming a user.
52      *
53      * @param username
54      * @param user
55      * @throws GitBlitException
3a6499 56      * @since 1.4.0
5ae529 57      */
JM 58     void reviseUser(String username, UserModel user) throws GitBlitException;
59
60     /**
61      * Creates a TeamModel object.
62      *
63      * @param team
64      * @param isCreate
3a6499 65      * @since 1.4.0
5ae529 66      */
JM 67     void addTeam(TeamModel team) throws GitBlitException;
db4f6b 68
JM 69     /**
70      * Updates the TeamModel object for the specified name.
71      *
72      * @param teamname
73      * @param team
3a6499 74      * @since 1.4.0
db4f6b 75      */
5ae529 76     void reviseTeam(String teamname, TeamModel team) throws GitBlitException;
db4f6b 77
JM 78     /**
79      * Creates a personal fork of the specified repository. The clone is view
80      * restricted by default and the owner of the source repository is given
81      * access to the clone.
82      *
83      * @param repository
84      * @param user
85      * @return the repository model of the fork, if successful
86      * @throws GitBlitException
3a6499 87      * @since 1.4.0
db4f6b 88      */
JM 89     RepositoryModel fork(RepositoryModel repository, UserModel user) throws GitBlitException;
90
91     /**
92      * Returns the list of custom client applications to be used for the
93      * repository url panel;
94      *
95      * @return a collection of client applications
3a6499 96      * @since 1.4.0
db4f6b 97      */
JM 98     Collection<GitClientApplication> getClientApplications();
99
5e3521 100     /**
JM 101      * Returns the ticket service.
102      *
103      * @return a ticket service
3a6499 104      * @since 1.4.0
5e3521 105      */
JM 106     ITicketService getTicketService();
107
245836 108     /**
JM 109      * Returns the SSH public key manager.
110      *
111      * @return the SSH public key manager
3a6499 112      * @since 1.5.0
245836 113      */
JM 114     IPublicKeyManager getPublicKeyManager();
115
db4f6b 116 }