Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

IGitblitManager.java 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  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. import java.util.Collection;
  18. import java.util.List;
  19. import javax.servlet.http.HttpServletRequest;
  20. import com.gitblit.GitBlitException;
  21. import com.gitblit.models.GitClientApplication;
  22. import com.gitblit.models.RepositoryModel;
  23. import com.gitblit.models.RepositoryUrl;
  24. import com.gitblit.models.TeamModel;
  25. import com.gitblit.models.UserModel;
  26. public interface IGitblitManager {
  27. /**
  28. * Returns a list of repository URLs and the user access permission.
  29. *
  30. * @param request
  31. * @param user
  32. * @param repository
  33. * @return a list of repository urls
  34. */
  35. List<RepositoryUrl> getRepositoryUrls(HttpServletRequest request, UserModel user, RepositoryModel repository);
  36. /**
  37. * Adds/updates a complete user object keyed by username. This method allows
  38. * for renaming a user.
  39. *
  40. * @see IUserService.updateUserModel(String, UserModel)
  41. * @param username
  42. * @param user
  43. * @param isCreate
  44. * @throws GitBlitException
  45. */
  46. void updateUserModel(String username, UserModel user, boolean isCreate) throws GitBlitException;
  47. /**
  48. * Updates the TeamModel object for the specified name.
  49. *
  50. * @param teamname
  51. * @param team
  52. * @param isCreate
  53. */
  54. void updateTeamModel(String teamname, TeamModel team, boolean isCreate) throws GitBlitException;
  55. /**
  56. * Creates a personal fork of the specified repository. The clone is view
  57. * restricted by default and the owner of the source repository is given
  58. * access to the clone.
  59. *
  60. * @param repository
  61. * @param user
  62. * @return the repository model of the fork, if successful
  63. * @throws GitBlitException
  64. */
  65. RepositoryModel fork(RepositoryModel repository, UserModel user) throws GitBlitException;
  66. /**
  67. * Returns the list of custom client applications to be used for the
  68. * repository url panel;
  69. *
  70. * @return a collection of client applications
  71. */
  72. Collection<GitClientApplication> getClientApplications();
  73. }