From 821eb4bbe1a4fac8d17b4df96ab6441985df58d7 Mon Sep 17 00:00:00 2001
From: David Ostrovsky <david@ostrovsky.org>
Date: Thu, 10 Apr 2014 18:58:09 -0400
Subject: [PATCH] Expose SSH command as plugin extension point
---
src/main/java/com/gitblit/manager/IGitblit.java | 47 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/gitblit/manager/IGitblit.java b/src/main/java/com/gitblit/manager/IGitblit.java
index c0167f0..7961a06 100644
--- a/src/main/java/com/gitblit/manager/IGitblit.java
+++ b/src/main/java/com/gitblit/manager/IGitblit.java
@@ -26,6 +26,8 @@
import com.gitblit.models.RepositoryUrl;
import com.gitblit.models.TeamModel;
import com.gitblit.models.UserModel;
+import com.gitblit.tickets.ITicketService;
+import com.gitblit.transport.ssh.IPublicKeyManager;
public interface IGitblit extends IManager,
IRuntimeManager,
@@ -34,7 +36,8 @@
IAuthenticationManager,
IRepositoryManager,
IProjectManager,
- IFederationManager {
+ IFederationManager,
+ IPluginManager {
/**
* Returns a list of repository URLs and the user access permission.
@@ -47,25 +50,39 @@
List<RepositoryUrl> getRepositoryUrls(HttpServletRequest request, UserModel user, RepositoryModel repository);
/**
- * Adds/updates a complete user object keyed by username. This method allows
- * for renaming a user.
+ * Creates a complete user object.
*
- * @see IUserService.updateUserModel(String, UserModel)
- * @param username
* @param user
* @param isCreate
* @throws GitBlitException
*/
- void updateUserModel(String username, UserModel user, boolean isCreate) throws GitBlitException;
+ void addUser(UserModel user) throws GitBlitException;
+
+ /**
+ * Updates a complete user object keyed by username. This method allows
+ * for renaming a user.
+ *
+ * @param username
+ * @param user
+ * @throws GitBlitException
+ */
+ void reviseUser(String username, UserModel user) throws GitBlitException;
+
+ /**
+ * Creates a TeamModel object.
+ *
+ * @param team
+ * @param isCreate
+ */
+ void addTeam(TeamModel team) throws GitBlitException;
/**
* Updates the TeamModel object for the specified name.
*
* @param teamname
* @param team
- * @param isCreate
*/
- void updateTeamModel(String teamname, TeamModel team, boolean isCreate) throws GitBlitException;
+ void reviseTeam(String teamname, TeamModel team) throws GitBlitException;
/**
* Creates a personal fork of the specified repository. The clone is view
@@ -87,4 +104,18 @@
*/
Collection<GitClientApplication> getClientApplications();
+ /**
+ * Returns the ticket service.
+ *
+ * @return a ticket service
+ */
+ ITicketService getTicketService();
+
+ /**
+ * Returns the SSH public key manager.
+ *
+ * @return the SSH public key manager
+ */
+ IPublicKeyManager getPublicKeyManager();
+
}
\ No newline at end of file
--
Gitblit v1.9.1