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.

IProjectManager.java 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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.List;
  18. import com.gitblit.models.ProjectModel;
  19. import com.gitblit.models.RepositoryModel;
  20. import com.gitblit.models.UserModel;
  21. public interface IProjectManager {
  22. /**
  23. * Returns a list of project models for the user.
  24. *
  25. * @param user
  26. * @param includeUsers
  27. * @return list of projects that are accessible to the user
  28. */
  29. List<ProjectModel> getProjectModels(UserModel user, boolean includeUsers);
  30. /**
  31. * Returns the project model for the specified user.
  32. *
  33. * @param name
  34. * @param user
  35. * @return a project model, or null if it does not exist
  36. */
  37. ProjectModel getProjectModel(String name, UserModel user);
  38. /**
  39. * Returns a project model for the Gitblit/system user.
  40. *
  41. * @param name a project name
  42. * @return a project model or null if the project does not exist
  43. */
  44. ProjectModel getProjectModel(String name);
  45. /**
  46. * Returns the list of project models that are referenced by the supplied
  47. * repository model list. This is an alternative method exists to ensure
  48. * Gitblit does not call getRepositoryModels(UserModel) twice in a request.
  49. *
  50. * @param repositoryModels
  51. * @param includeUsers
  52. * @return a list of project models
  53. */
  54. List<ProjectModel> getProjectModels(List<RepositoryModel> repositoryModels, boolean includeUsers);
  55. }