James Moger
2014-03-22 bcc8a015ae552726742b4f437b2cb9e809270f96
src/main/java/com/gitblit/manager/GitblitManager.java
@@ -22,7 +22,6 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Type;
import java.security.PublicKey;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
@@ -42,6 +41,8 @@
import org.eclipse.jgit.transport.RefSpec;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.PluginWrapper;
import com.gitblit.Constants;
import com.gitblit.Constants.AccessPermission;
@@ -69,6 +70,8 @@
import com.gitblit.models.TeamModel;
import com.gitblit.models.UserModel;
import com.gitblit.tickets.ITicketService;
import com.gitblit.transport.ssh.IPublicKeyManager;
import com.gitblit.transport.ssh.SshKey;
import com.gitblit.utils.ArrayUtils;
import com.gitblit.utils.HttpUtils;
import com.gitblit.utils.JsonUtils;
@@ -101,11 +104,15 @@
   protected final IRuntimeManager runtimeManager;
   protected final IPluginManager pluginManager;
   protected final INotificationManager notificationManager;
   protected final IUserManager userManager;
   protected final IAuthenticationManager authenticationManager;
   protected final IPublicKeyManager publicKeyManager;
   protected final IRepositoryManager repositoryManager;
@@ -115,18 +122,22 @@
   public GitblitManager(
         IRuntimeManager runtimeManager,
         IPluginManager pluginManager,
         INotificationManager notificationManager,
         IUserManager userManager,
         IAuthenticationManager authenticationManager,
         IPublicKeyManager publicKeyManager,
         IRepositoryManager repositoryManager,
         IProjectManager projectManager,
         IFederationManager federationManager) {
      this.settings = runtimeManager.getSettings();
      this.runtimeManager = runtimeManager;
      this.pluginManager = pluginManager;
      this.notificationManager = notificationManager;
      this.userManager = userManager;
      this.authenticationManager = authenticationManager;
      this.publicKeyManager = publicKeyManager;
      this.repositoryManager = repositoryManager;
      this.projectManager = projectManager;
      this.federationManager = federationManager;
@@ -524,6 +535,11 @@
      throw new RuntimeException("This class does not have a ticket service!");
   }
   @Override
   public IPublicKeyManager getPublicKeyManager() {
      return publicKeyManager;
   }
   /*
    * ISTOREDSETTINGS
    *
@@ -654,7 +670,7 @@
   }
   @Override
   public UserModel authenticate(String username, PublicKey key) {
   public UserModel authenticate(String username, SshKey key) {
      return authenticationManager.authenticate(username, key);
   }
@@ -1161,4 +1177,14 @@
   public boolean isIdle(Repository repository) {
      return repositoryManager.isIdle(repository);
   }
   @Override
   public <T> List<T> getExtensions(Class<T> clazz) {
      return pluginManager.getExtensions(clazz);
   }
   @Override
   public PluginWrapper whichPlugin(Class<?> clazz) {
      return pluginManager.whichPlugin(clazz);
   }
}