Class DocumentHistoryService

java.lang.Object
fr.paris.lutece.plugins.document.service.history.DocumentHistoryService

@ApplicationScoped @Named("document.DocumentHistoryService") public class DocumentHistoryService extends Object
This service logs document changes history
  • Constructor Details

    • DocumentHistoryService

      public DocumentHistoryService()
      Creates a new instance of WorkflowEngine
  • Method Details

    • getInstance

      @Deprecated(since="8.0", forRemoval=true) public static DocumentHistoryService getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use @Inject to obtain the DocumentHistoryService instance. This method will be removed in future versions.
      Returns the unique instance of the DocumentHistoryService service.

      This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with @Inject to obtain the DocumentHistoryService instance instead.

      Returns:
      The unique instance of DocumentHistoryService.
    • onDocumentEvent

      public void onDocumentEvent(@Observes DocumentEvent event) throws DocumentException
      Observe document events via CDI
      Parameters:
      event - The document event
      Throws:
      DocumentException - if error occurs
    • processDocumentEvent

      public void processDocumentEvent(DocumentEvent event) throws DocumentException
      Process a document event
      Parameters:
      event - The event to process
      Throws:
      DocumentException - Exception occurs when error in event or rule
    • initializedService

      public void initializedService(@Observes @Initialized(jakarta.enterprise.context.ApplicationScoped.class) jakarta.servlet.ServletContext context)
      This method observes the initialization of the ApplicationScoped context. It ensures that this CDI beans are instantiated at the application startup.

      This method is triggered automatically by CDI when the ApplicationScoped context is initialized, which typically occurs during the startup of the application server.

      Parameters:
      context - the ServletContext that is initialized. This parameter is observed and injected automatically by CDI when the ApplicationScoped context is initialized.