Interface ProviderService


  • public interface ProviderService
    This interface methods are returning either Optional or List. When the underlying Adobe IO http API endpoints are responding with `404`, these methods will return empty Optional or empty List. When the underlying Adobe IO http API endpoints are responding with other `4xx` or `5xx` errors, these methods will throw runtime FeignException exposing these error codes. We may work on a more specific error handling as part of https://github.com/adobe/aio-lib-java/issues/7.
    • Method Detail

      • deleteProvider

        void deleteProvider​(String providerId)
      • createOrUpdateProvider

        Optional<Provider> createOrUpdateProvider​(ProviderInputModel providerInputModel)
        Parameters:
        providerInputModel - the input payload
        Returns:
        create and if conflict/409 arises, instead, update a provider using the provided payload
      • findCustomEventsProviderByInstanceId

        Optional<Provider> findCustomEventsProviderByInstanceId​(String instanceId)
        Parameters:
        instanceId - the AIO Events Provider instance identifier (either chosen by the user or generated by AIO Events backend), note the triple (provider_metadata_id, instanceId, imsOrgId) is unique
        Returns:
        the `Custom Events` Provider associated with the provided instanceId
      • findProviderBy

        Optional<Provider> findProviderBy​(String providerMetadataId,
                                          String instanceId)
        Parameters:
        providerMetadataId - indicating the type of provider, if you are interested in `Custom Events`provider use findCustomEventsProviderByInstanceId
        instanceId - the AIO Events Provider instance identifier (either chosen by the user or generated by AIO Events backend), * note the triple (provider_metadata_id, instanceId, imsOrgId) is unique
        Returns:
        the providers list matching the provided criteria and with non-empty event metadata list
        See Also:
        findCustomEventsProviderByInstanceId(String)
      • deleteEventMetadata

        void deleteEventMetadata​(String providerId,
                                 String eventCode)
      • deleteAllEventMetadata

        void deleteAllEventMetadata​(String providerId)