Class OperationContribution

java.lang.Object
org.nuxeo.ecm.automation.core.OperationContribution
All Implemented Interfaces:
OperationDescriptor, Descriptor

public class OperationContribution extends Object implements OperationDescriptor
Author:
Bogdan Stefanescu, Guillaume Renard
  • Field Details

    • type

      public String type
      The operation class that must be annotated using Operation annotation.
    • replace

      public boolean replace
      Put it to true to override an existing contribution having the same ID. By default, overriding is not permitted and an exception is thrown when this flag is on false.
    • contributingComponent

      protected ComponentInstance contributingComponent
  • Constructor Details

    • OperationContribution

      public OperationContribution()
  • Method Details

    • getId

      public String getId()
      Description copied from interface: Descriptor
      The descriptor id, descriptors with same id are merged.

      To forbid multiple descriptors use UNIQUE_DESCRIPTOR_ID.

      To forbid merge use a unique value, non-overriden toString() for exemple.

      Specified by:
      getId in interface Descriptor
      Since:
      2025.0
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface OperationDescriptor
      Returns:
      whether this operation is enabled or not
      Since:
      2025.0
    • replace

      public boolean replace()
      Specified by:
      replace in interface OperationDescriptor
      Returns:
      whether this operation replaces an existing one
      Since:
      2025.0
    • toType

      public OperationType toType()
      Specified by:
      toType in interface OperationDescriptor
      Returns:
      the OperationType for this descriptor
      Since:
      2025.0
    • getOperationAnnotation

      protected Operation getOperationAnnotation()
    • getTypeClass

      protected Class<?> getTypeClass()