James Moger
2015-11-22 ed552ba47c02779c270ffd62841d6d1048dade70
src/main/java/com/gitblit/manager/RuntimeManager.java
@@ -33,7 +33,11 @@
import com.gitblit.models.SettingModel;
import com.gitblit.utils.StringUtils;
import com.gitblit.utils.XssFilter;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Singleton;
@Singleton
public class RuntimeManager implements IRuntimeManager {
   private final Logger logger = LoggerFactory.getLogger(getClass());
@@ -50,6 +54,10 @@
   private TimeZone timezone;
   @Inject
   private Injector injector;
   @Inject
   public RuntimeManager(IStoredSettings settings, XssFilter xssFilter) {
      this(settings, xssFilter, null);
   }
@@ -76,6 +84,11 @@
   @Override
   public RuntimeManager stop() {
      return this;
   }
   @Override
   public Injector getInjector() {
      return injector;
   }
   @Override
@@ -113,52 +126,6 @@
      }
//      settingsModel.pushScripts = getAllScripts();
      return settingsModel;
   }
   /**
    * Determine if this Gitblit instance is actively serving git repositories
    * or if it is merely a repository viewer.
    *
    * @return true if Gitblit is serving repositories
    */
   @Override
   public boolean isServingRepositories() {
      return isServingHTTP()
            || isServingGIT()
            || isServingSSH();
   }
   /**
    * Determine if this Gitblit instance is actively serving git repositories
    * over the HTTP protocol.
    *
    * @return true if Gitblit is serving repositories over the HTTP protocol
    */
   @Override
   public boolean isServingHTTP() {
      return settings.getBoolean(Keys.git.enableGitServlet, true);
   }
   /**
    * Determine if this Gitblit instance is actively serving git repositories
    * over the Git Daemon protocol.
    *
    * @return true if Gitblit is serving repositories over the Git Daemon protocol
    */
   @Override
   public boolean isServingGIT() {
      return settings.getInteger(Keys.git.daemonPort, 0) > 0;
   }
   /**
    * Determine if this Gitblit instance is actively serving git repositories
    * over the SSH protocol.
    *
    * @return true if Gitblit is serving repositories over the SSH protocol
    */
   @Override
   public boolean isServingSSH() {
      return settings.getInteger(Keys.git.sshPort, 0) > 0;
   }
   /**