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 2.9KB

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