You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IGitblit.java 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. import com.gitblit.tickets.ITicketService;
  27. public interface IGitblit extends IManager,
  28. IRuntimeManager,
  29. INotificationManager,
  30. IUserManager,
  31. IAuthenticationManager,
  32. IRepositoryManager,
  33. IProjectManager,
  34. IFederationManager {
  35. /**
  36. * Returns a list of repository URLs and the user access permission.
  37. *
  38. * @param request
  39. * @param user
  40. * @param repository
  41. * @return a list of repository urls
  42. */
  43. List<RepositoryUrl> getRepositoryUrls(HttpServletRequest request, UserModel user, RepositoryModel repository);
  44. /**
  45. * Creates a complete user object.
  46. *
  47. * @param user
  48. * @param isCreate
  49. * @throws GitBlitException
  50. */
  51. void addUser(UserModel user) throws GitBlitException;
  52. /**
  53. * Updates a complete user object keyed by username. This method allows
  54. * for renaming a user.
  55. *
  56. * @param username
  57. * @param user
  58. * @throws GitBlitException
  59. */
  60. void reviseUser(String username, UserModel user) throws GitBlitException;
  61. /**
  62. * Creates a TeamModel object.
  63. *
  64. * @param team
  65. * @param isCreate
  66. */
  67. void addTeam(TeamModel team) throws GitBlitException;
  68. /**
  69. * Updates the TeamModel object for the specified name.
  70. *
  71. * @param teamname
  72. * @param team
  73. */
  74. void reviseTeam(String teamname, TeamModel team) throws GitBlitException;
  75. /**
  76. * Creates a personal fork of the specified repository. The clone is view
  77. * restricted by default and the owner of the source repository is given
  78. * access to the clone.
  79. *
  80. * @param repository
  81. * @param user
  82. * @return the repository model of the fork, if successful
  83. * @throws GitBlitException
  84. */
  85. RepositoryModel fork(RepositoryModel repository, UserModel user) throws GitBlitException;
  86. /**
  87. * Returns the list of custom client applications to be used for the
  88. * repository url panel;
  89. *
  90. * @return a collection of client applications
  91. */
  92. Collection<GitClientApplication> getClientApplications();
  93. /**
  94. * Returns the ticket service.
  95. *
  96. * @return a ticket service
  97. */
  98. ITicketService getTicketService();
  99. }