Class DefaultPersistenceHookRegistry

java.lang.Object
de.hybris.platform.odata2services.odata.persistence.hook.impl.DefaultPersistenceHookRegistry
All Implemented Interfaces:
PersistenceHookProvider, PersistenceHookRegistry, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Deprecated(since="2205", forRemoval=true) public class DefaultPersistenceHookRegistry extends Object implements PersistenceHookRegistry, org.springframework.context.ApplicationContextAware, PersistenceHookProvider
Deprecated, for removal: This API element is subject to removal in a future version.
An implementation of the PersistenceHookRegistry, which loads persistence hooks from the Spring application context. Spring Bean names/ids become names of the hooks in this registry.
  • Constructor Details

    • DefaultPersistenceHookRegistry

      public DefaultPersistenceHookRegistry()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getPrePersistHook

      public PrePersistHook getPrePersistHook(String hookName, String integrationKey)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PersistenceHookRegistry
      Retrieves a PrePersistHook by the hook name.
      Specified by:
      getPrePersistHook in interface PersistenceHookRegistry
      Parameters:
      hookName - name of the hook to retrieve. It's up to the implementation what that name means and how hooks are named.
      integrationKey - for the current item that is being created or updated
      Returns:
      a hook matching the name.
    • getPostPersistHook

      public PostPersistHook getPostPersistHook(String hookName, String integrationKey)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PersistenceHookRegistry
      Retrieves a PostPersistHook by the hook name.
      Specified by:
      getPostPersistHook in interface PersistenceHookRegistry
      Parameters:
      hookName - name of the hook to retrieve. It's up to implementation what that name means and how hooks are named.
      integrationKey - for the current item that is being created or updated
      Returns:
      a hook matching the name.
    • addHook

      public void addHook(String hookName, PrePersistHook hook)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • addHook

      public void addHook(String hookName, PostPersistHook hook)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getHook

      protected <T> T getHook(Map<String,T> hooks, String prefix, String hookName, String integrationKey)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
    • getPrePersistHook

      public Optional<PrePersistHook> getPrePersistHook(@NotNull @NotNull PersistenceContext context)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PersistenceHookProvider
      Retrieves a PrePersistHook by the hook name.
      Specified by:
      getPrePersistHook in interface PersistenceHookProvider
      Parameters:
      context - context of the data being persisted.
      Returns:
      a hook matching the persistence context or an Optional.empty(), if there is no hook for the provided context.
    • getPostPersistHook

      public Optional<PostPersistHook> getPostPersistHook(@NotNull @NotNull PersistenceContext context)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PersistenceHookProvider
      Retrieves a PostPersistHook by the hook name.
      Specified by:
      getPostPersistHook in interface PersistenceHookProvider
      Parameters:
      context - context of the data being persisted.
      Returns:
      a hook matching the persistence context or an Optional.empty(), if there is no hook for the provided context..