Class KymaApiRegistrationStrategy
- java.lang.Object
-
- de.hybris.platform.kymaintegrationservices.strategies.impl.KymaApiRegistrationStrategy
-
- All Implemented Interfaces:
ApiRegistrationStrategy
public class KymaApiRegistrationStrategy extends java.lang.Object implements ApiRegistrationStrategy
Kyma impl of @ApiRegistrationStrategy
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DESTINATION_NOT_FOUND
static java.lang.String
EVENTS_ED_ID
-
Constructor Summary
Constructors Constructor Description KymaApiRegistrationStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected java.lang.String
extractServiceIdFromResponseBody(java.lang.String responseBody)
protected AbstractDestinationModel
getApiDestination()
Deprecated, for removal: This API element is subject to removal in a future version.since 1905.protected AbstractDestinationModel
getApiDestination(java.lang.String destinationTargetId)
protected ConfigurationService
getConfigurationService()
protected DestinationService<AbstractDestinationModel>
getDestinationService()
protected EventConfigurationDao
getEventConfigurationDao()
protected Converter<EventsSpecificationSourceData,ServiceRegistrationData>
getEventsSpecificationConverter()
protected com.fasterxml.jackson.databind.ObjectMapper
getJacksonObjectMapper()
protected ModelService
getModelService()
protected RestTemplateWrapper
getRestTemplate()
protected Converter<ExposedDestinationModel,ServiceRegistrationData>
getWebserviceSpecificationConverter()
protected ApiRegistrationException
logAndCreateApiRegistrationException(java.lang.String errorMessage, java.lang.Exception e)
void
registerExposedDestination(ExposedDestinationModel exposedDestination)
Send api specification to register exposed destinationprotected void
registerNewSpecAtKyma(ServiceRegistrationData serviceRegistrationData, ExposedDestinationModel exposedDestination, org.springframework.http.HttpEntity<java.lang.String> request)
java.util.List<RegisteredDestinationData>
retrieveRegisteredExposedDestinations(DestinationTargetModel destinationTarget)
Retrieves all registered exposed destination from target systemvoid
setConfigurationService(ConfigurationService configurationService)
void
setDestinationService(DestinationService<AbstractDestinationModel> destinationService)
void
setEventConfigurationDao(EventConfigurationDao eventConfigurationDao)
void
setEventsSpecificationConverter(Converter<EventsSpecificationSourceData,ServiceRegistrationData> eventsSpecificationConverter)
void
setJacksonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper jacksonObjectMapper)
void
setModelService(ModelService modelService)
void
setRestTemplate(RestTemplateWrapper restTemplate)
void
setWebserviceSpecificationConverter(Converter<ExposedDestinationModel,ServiceRegistrationData> webserviceSpecificationConverter)
void
unregisterExposedDestination(ExposedDestinationModel destination)
Send api specification to unregister exposed destinationvoid
unregisterExposedDestinationByTargetId(java.lang.String targetId, java.lang.String destinationTargetId)
Unregister exposed destination from target systemprotected void
updateApiConfigurationUid(java.lang.String systemId, ExposedDestinationModel destination)
protected void
updateExistingSpecAtKyma(ServiceRegistrationData serviceRegistrationData, ExposedDestinationModel apiConfiguration, org.springframework.http.HttpEntity<java.lang.String> request)
-
-
-
Field Detail
-
EVENTS_ED_ID
public static final java.lang.String EVENTS_ED_ID
- See Also:
- Constant Field Values
-
DESTINATION_NOT_FOUND
public static final java.lang.String DESTINATION_NOT_FOUND
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerExposedDestination
public void registerExposedDestination(ExposedDestinationModel exposedDestination) throws ApiRegistrationException
Description copied from interface:ApiRegistrationStrategy
Send api specification to register exposed destination- Specified by:
registerExposedDestination
in interfaceApiRegistrationStrategy
- Throws:
ApiRegistrationException
-
unregisterExposedDestination
public void unregisterExposedDestination(ExposedDestinationModel destination) throws ApiRegistrationException
Description copied from interface:ApiRegistrationStrategy
Send api specification to unregister exposed destination- Specified by:
unregisterExposedDestination
in interfaceApiRegistrationStrategy
- Throws:
ApiRegistrationException
-
unregisterExposedDestinationByTargetId
public void unregisterExposedDestinationByTargetId(java.lang.String targetId, java.lang.String destinationTargetId) throws ApiRegistrationException
Description copied from interface:ApiRegistrationStrategy
Unregister exposed destination from target system- Specified by:
unregisterExposedDestinationByTargetId
in interfaceApiRegistrationStrategy
- Parameters:
targetId
- target id of the registered destinationdestinationTargetId
- id of the destination target- Throws:
ApiRegistrationException
-
logAndCreateApiRegistrationException
protected ApiRegistrationException logAndCreateApiRegistrationException(java.lang.String errorMessage, java.lang.Exception e)
-
retrieveRegisteredExposedDestinations
public java.util.List<RegisteredDestinationData> retrieveRegisteredExposedDestinations(DestinationTargetModel destinationTarget) throws ApiRegistrationException
Description copied from interface:ApiRegistrationStrategy
Retrieves all registered exposed destination from target system- Specified by:
retrieveRegisteredExposedDestinations
in interfaceApiRegistrationStrategy
- Returns:
- list of destination data
- Throws:
ApiRegistrationException
- in case when retrieving destinations fails
-
registerNewSpecAtKyma
protected void registerNewSpecAtKyma(ServiceRegistrationData serviceRegistrationData, ExposedDestinationModel exposedDestination, org.springframework.http.HttpEntity<java.lang.String> request) throws ApiRegistrationException
- Throws:
ApiRegistrationException
-
getApiDestination
@Deprecated(since="1905", forRemoval=true) protected AbstractDestinationModel getApiDestination() throws ApiRegistrationException
Deprecated, for removal: This API element is subject to removal in a future version.since 1905. UsegetApiDestination(String)
- Throws:
ApiRegistrationException
-
getApiDestination
protected AbstractDestinationModel getApiDestination(java.lang.String destinationTargetId) throws ApiRegistrationException
- Throws:
ApiRegistrationException
-
updateExistingSpecAtKyma
protected void updateExistingSpecAtKyma(ServiceRegistrationData serviceRegistrationData, ExposedDestinationModel apiConfiguration, org.springframework.http.HttpEntity<java.lang.String> request) throws ApiRegistrationException
- Throws:
ApiRegistrationException
-
extractServiceIdFromResponseBody
protected java.lang.String extractServiceIdFromResponseBody(java.lang.String responseBody)
-
updateApiConfigurationUid
protected void updateApiConfigurationUid(java.lang.String systemId, ExposedDestinationModel destination)
-
getJacksonObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getJacksonObjectMapper()
-
setJacksonObjectMapper
public void setJacksonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper jacksonObjectMapper)
-
getRestTemplate
protected RestTemplateWrapper getRestTemplate()
-
setRestTemplate
public void setRestTemplate(RestTemplateWrapper restTemplate)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getConfigurationService
protected ConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
getWebserviceSpecificationConverter
protected Converter<ExposedDestinationModel,ServiceRegistrationData> getWebserviceSpecificationConverter()
-
setWebserviceSpecificationConverter
public void setWebserviceSpecificationConverter(Converter<ExposedDestinationModel,ServiceRegistrationData> webserviceSpecificationConverter)
-
getEventsSpecificationConverter
protected Converter<EventsSpecificationSourceData,ServiceRegistrationData> getEventsSpecificationConverter()
-
setEventsSpecificationConverter
public void setEventsSpecificationConverter(Converter<EventsSpecificationSourceData,ServiceRegistrationData> eventsSpecificationConverter)
-
getEventConfigurationDao
protected EventConfigurationDao getEventConfigurationDao()
-
setEventConfigurationDao
public void setEventConfigurationDao(EventConfigurationDao eventConfigurationDao)
-
getDestinationService
protected DestinationService<AbstractDestinationModel> getDestinationService()
-
setDestinationService
public void setDestinationService(DestinationService<AbstractDestinationModel> destinationService)
-
-