diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java b/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java index 5350a2a9..24b842fd 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java @@ -13,12 +13,12 @@ import com.google.common.eventbus.AsyncEventBus; import com.google.common.eventbus.EventBus; import com.sismics.docs.core.constant.ConfigType; import com.sismics.docs.core.dao.jpa.ConfigDao; -import com.sismics.docs.core.event.OcrFileAsyncEvent; import com.sismics.docs.core.listener.async.DocumentCreatedAsyncListener; import com.sismics.docs.core.listener.async.DocumentDeletedAsyncListener; import com.sismics.docs.core.listener.async.DocumentUpdatedAsyncListener; import com.sismics.docs.core.listener.async.FileCreatedAsyncListener; import com.sismics.docs.core.listener.async.FileDeletedAsyncListener; +import com.sismics.docs.core.listener.async.OcrFileAsyncListener; import com.sismics.docs.core.listener.async.RebuildIndexAsyncListener; import com.sismics.docs.core.listener.sync.DeadEventListener; import com.sismics.docs.core.model.jpa.Config; @@ -91,7 +91,7 @@ public class AppContext { asyncEventBus.register(new DocumentUpdatedAsyncListener()); asyncEventBus.register(new DocumentDeletedAsyncListener()); asyncEventBus.register(new RebuildIndexAsyncListener()); - asyncEventBus.register(new OcrFileAsyncEvent()); + asyncEventBus.register(new OcrFileAsyncListener()); } /** diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java index 05749db2..655fbdbe 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/AppResource.java @@ -155,8 +155,7 @@ public class AppResource extends BaseResource { checkBaseFunction(BaseFunction.ADMIN); // Raise a OCR file event - OcrFileAsyncEvent ocrFileAsyncEvent = new OcrFileAsyncEvent(); - AppContext.getInstance().getAsyncEventBus().post(ocrFileAsyncEvent); + AppContext.getInstance().getAsyncEventBus().post(new OcrFileAsyncEvent()); JSONObject response = new JSONObject(); response.put("status", "ok");