| | |
| | | } |
| | | |
| | | /** |
| | | * 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 |
| | | */ |
| | | public static boolean isServingRepositories() { |
| | | return getBoolean(Keys.git.enableGitServlet, true) || (getInteger(Keys.git.daemonPort, 0) > 0); |
| | | } |
| | | |
| | | /** |
| | | * 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 |
| | | */ |
| | | public static boolean isSendingMail() { |
| | | return self().mailExecutor.isReady(); |
| | | } |
| | | |
| | | /** |
| | | * Returns the preferred timezone for the Gitblit instance. |
| | | * |
| | | * @return a timezone |
| | |
| | | public static int getInteger(String key, int defaultValue) { |
| | | return self().settings.getInteger(key, defaultValue); |
| | | } |
| | | |
| | | /** |
| | | * Returns the integer list for the specified key. If the key does not |
| | | * exist or the value for the key can not be interpreted as an integer, an |
| | | * empty list is returned. |
| | | * |
| | | * @see IStoredSettings.getIntegers(String key) |
| | | * @param key |
| | | * @return key value or defaultValue |
| | | */ |
| | | public static List<Integer> getIntegers(String key) { |
| | | return self().settings.getIntegers(key); |
| | | } |
| | | |
| | | /** |
| | | * Returns the value in bytes for the specified key. If the key does not |