summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/GitBlit.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-03-06 18:02:42 -0500
committerJames Moger <james.moger@gitblit.com>2014-03-06 18:02:42 -0500
commit63fbcc2b3b9c83f41298ee2822e98b0de418e013 (patch)
tree8c1d2e373e5223117d58b6339b5a5ea97550539f /src/main/java/com/gitblit/GitBlit.java
parent8d11fa04838c850aaa92895805d39d0a2845300c (diff)
downloadgitblit-63fbcc2b3b9c83f41298ee2822e98b0de418e013.tar.gz
gitblit-63fbcc2b3b9c83f41298ee2822e98b0de418e013.zip
Do not use @Inject on the ticket service constructors
Diffstat (limited to 'src/main/java/com/gitblit/GitBlit.java')
-rw-r--r--src/main/java/com/gitblit/GitBlit.java36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java
index a1abfcd1..b706874a 100644
--- a/src/main/java/com/gitblit/GitBlit.java
+++ b/src/main/java/com/gitblit/GitBlit.java
@@ -205,7 +205,9 @@ public class GitBlit extends GitblitManager {
try {
Class<? extends ITicketService> serviceClass = (Class<? extends ITicketService>) Class.forName(clazz);
ticketService = injector.get(serviceClass).start();
- if (ticketService.isReady()) {
+ if (ticketService instanceof NullTicketService) {
+ logger.warn("No ticket service configured.");
+ } else if (ticketService.isReady()) {
logger.info("{} is ready.", ticketService);
} else {
logger.warn("{} is disabled.", ticketService);
@@ -284,5 +286,37 @@ public class GitBlit extends GitblitManager {
@Provides @Singleton IGitblit provideGitblit() {
return GitBlit.this;
}
+
+ @Provides @Singleton NullTicketService provideNullTicketService() {
+ return new NullTicketService(
+ runtimeManager,
+ notificationManager,
+ userManager,
+ repositoryManager);
+ }
+
+ @Provides @Singleton FileTicketService provideFileTicketService() {
+ return new FileTicketService(
+ runtimeManager,
+ notificationManager,
+ userManager,
+ repositoryManager);
+ }
+
+ @Provides @Singleton BranchTicketService provideBranchTicketService() {
+ return new BranchTicketService(
+ runtimeManager,
+ notificationManager,
+ userManager,
+ repositoryManager);
+ }
+
+ @Provides @Singleton RedisTicketService provideRedisTicketService() {
+ return new RedisTicketService(
+ runtimeManager,
+ notificationManager,
+ userManager,
+ repositoryManager);
+ }
}
}