Package org.silverpeas.components.kmelia.service

# Class KmeliaOperationContext

java.lang.Object
org.silverpeas.components.kmelia.service.KmeliaOperationContext

public class KmeliaOperationContext extends Object
Defines the context of a mutable operation on publications that is currently invoked in Kmelia. Useful to maintain the operation state along different invocations, mainly with system notifications that are processed by different transverse services.

Author:
  mmoquillon

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `KmeliaOperationContext.OperationType`
  Different kinds of operations.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `about(KmeliaOperationContext.OperationType type)`
  Spawn a new Kmelia context about the given operation on publications.
  `static Optional<KmeliaOperationContext>`
  `current()`
  Gets the current operation context.
  `org.silverpeas.core.admin.user.model.User`
  `getInvoker()`
  `boolean`
  `isAbout(KmeliaOperationContext.OperationType type)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### current

    public static Optional<KmeliaOperationContext> current()
    Gets the current operation context. None if no such a context has been set.
    Returns:
      optionally the current operation context if any.

  - ### about

    public static void about(KmeliaOperationContext.OperationType type)
    Spawn a new Kmelia context about the given operation on publications.
    Parameters:
      `type` - the type of the operation.

  - ### isAbout

    public boolean isAbout(KmeliaOperationContext.OperationType type)

  - ### getInvoker

    public org.silverpeas.core.admin.user.model.User getInvoker()