Class Webhooks

  • All Implemented Interfaces:
    com.unboundid.directory.sdk.common.internal.Configurable, com.unboundid.directory.sdk.common.internal.ExampleUsageProvider, com.unboundid.directory.sdk.common.internal.UnboundIDExtension

    public class Webhooks
    extends com.unboundid.directory.sdk.sync.api.SyncDestination
    This class provides a simple Webhooks destination
    • Constructor Summary

      Constructors 
      Constructor Description
      Webhooks()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createEntry​(com.unboundid.ldap.sdk.Entry entryToCreate, com.unboundid.directory.sdk.sync.types.SyncOperation operation)
      Performs the necessary processing to publish a creation event to a webhook target
      void defineConfigArguments​(com.unboundid.util.args.ArgumentParser parser)
      Performs the necessary processing to declare the arguments the extension requires in order to perform its task.
      void deleteEntry​(com.unboundid.ldap.sdk.Entry entryToDelete, com.unboundid.directory.sdk.sync.types.SyncOperation operation)
      Performs the necessary processing to publish a deleting to a webhook target
      String getCurrentEndpointURL()
      Provides a descriptive endpoint URL for the instance of the extension
      String[] getExtensionDescription()
      Provides a description for the extension for display purpose such as in manage-extension and dsconfig
      String getExtensionName()
      Provides the extension name for display purpose such as in manage-extension and dsconfig
      void initializeSyncDestination​(com.unboundid.directory.sdk.sync.types.SyncServerContext serverContext, com.unboundid.directory.sdk.sync.config.SyncDestinationConfig config, com.unboundid.util.args.ArgumentParser parser)  
      void modifyEntry​(com.unboundid.ldap.sdk.Entry entryToModify, List<com.unboundid.ldap.sdk.Modification> modsToApply, com.unboundid.directory.sdk.sync.types.SyncOperation operation)
      Performs the necessary processing to publish a modification even to a webhook target
      • Methods inherited from class com.unboundid.directory.sdk.sync.api.SyncDestination

        fetchEntry, finalizeSyncDestination, getExamplesArgumentSets
    • Method Detail

      • getExtensionName

        public String getExtensionName()
        Provides the extension name for display purpose such as in manage-extension and dsconfig
        Specified by:
        getExtensionName in interface com.unboundid.directory.sdk.common.internal.UnboundIDExtension
        Specified by:
        getExtensionName in class com.unboundid.directory.sdk.sync.api.SyncDestination
        Returns:
        the extension name
      • getExtensionDescription

        public String[] getExtensionDescription()
        Provides a description for the extension for display purpose such as in manage-extension and dsconfig
        Specified by:
        getExtensionDescription in interface com.unboundid.directory.sdk.common.internal.UnboundIDExtension
        Specified by:
        getExtensionDescription in class com.unboundid.directory.sdk.sync.api.SyncDestination
        Returns:
        a list of descriptive paragraphs
      • getCurrentEndpointURL

        public String getCurrentEndpointURL()
        Provides a descriptive endpoint URL for the instance of the extension
        Specified by:
        getCurrentEndpointURL in class com.unboundid.directory.sdk.sync.api.SyncDestination
        Returns:
        the instance URL
      • defineConfigArguments

        public void defineConfigArguments​(com.unboundid.util.args.ArgumentParser parser)
                                   throws com.unboundid.util.args.ArgumentException
        Performs the necessary processing to declare the arguments the extension requires in order to perform its task.
        Specified by:
        defineConfigArguments in interface com.unboundid.directory.sdk.common.internal.Configurable
        Overrides:
        defineConfigArguments in class com.unboundid.directory.sdk.sync.api.SyncDestination
        Parameters:
        parser - the argument parse to which arguments are to be registered
        Throws:
        com.unboundid.util.args.ArgumentException - in case any argument could not be registered
      • initializeSyncDestination

        public void initializeSyncDestination​(com.unboundid.directory.sdk.sync.types.SyncServerContext serverContext,
                                              com.unboundid.directory.sdk.sync.config.SyncDestinationConfig config,
                                              com.unboundid.util.args.ArgumentParser parser)
                                       throws com.unboundid.directory.sdk.sync.types.EndpointException
        Overrides:
        initializeSyncDestination in class com.unboundid.directory.sdk.sync.api.SyncDestination
        Throws:
        com.unboundid.directory.sdk.sync.types.EndpointException
      • createEntry

        public void createEntry​(com.unboundid.ldap.sdk.Entry entryToCreate,
                                com.unboundid.directory.sdk.sync.types.SyncOperation operation)
                         throws com.unboundid.directory.sdk.sync.types.EndpointException
        Performs the necessary processing to publish a creation event to a webhook target
        Specified by:
        createEntry in class com.unboundid.directory.sdk.sync.api.SyncDestination
        Parameters:
        entryToCreate - the entry to create
        operation - the sync operation
        Throws:
        com.unboundid.directory.sdk.sync.types.EndpointException - if any issue is encountered in the process of publishing the event
      • modifyEntry

        public void modifyEntry​(com.unboundid.ldap.sdk.Entry entryToModify,
                                List<com.unboundid.ldap.sdk.Modification> modsToApply,
                                com.unboundid.directory.sdk.sync.types.SyncOperation operation)
                         throws com.unboundid.directory.sdk.sync.types.EndpointException
        Performs the necessary processing to publish a modification even to a webhook target
        Specified by:
        modifyEntry in class com.unboundid.directory.sdk.sync.api.SyncDestination
        Parameters:
        entryToModify - the entry to modify
        modsToApply - the modifications to publish
        operation - the sync operation
        Throws:
        com.unboundid.directory.sdk.sync.types.EndpointException - if any issue is encountered in the process of publishing the event
      • deleteEntry

        public void deleteEntry​(com.unboundid.ldap.sdk.Entry entryToDelete,
                                com.unboundid.directory.sdk.sync.types.SyncOperation operation)
                         throws com.unboundid.directory.sdk.sync.types.EndpointException
        Performs the necessary processing to publish a deleting to a webhook target
        Specified by:
        deleteEntry in class com.unboundid.directory.sdk.sync.api.SyncDestination
        Parameters:
        entryToDelete - the entry to delete
        operation - the sync operation
        Throws:
        com.unboundid.directory.sdk.sync.types.EndpointException - if any issue is encountered in the process of publishing the event