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.StringDESTINATION_NOT_FOUNDstatic java.lang.StringEVENTS_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.StringextractServiceIdFromResponseBody(java.lang.String responseBody)protected AbstractDestinationModelgetApiDestination()Deprecated, for removal: This API element is subject to removal in a future version.since 1905.protected AbstractDestinationModelgetApiDestination(java.lang.String destinationTargetId)protected ConfigurationServicegetConfigurationService()protected DestinationService<AbstractDestinationModel>getDestinationService()protected EventConfigurationDaogetEventConfigurationDao()protected Converter<EventsSpecificationSourceData,ServiceRegistrationData>getEventsSpecificationConverter()protected com.fasterxml.jackson.databind.ObjectMappergetJacksonObjectMapper()protected ModelServicegetModelService()protected RestTemplateWrappergetRestTemplate()protected Converter<ExposedDestinationModel,ServiceRegistrationData>getWebserviceSpecificationConverter()protected ApiRegistrationExceptionlogAndCreateApiRegistrationException(java.lang.String errorMessage, java.lang.Exception e)voidregisterExposedDestination(ExposedDestinationModel exposedDestination)Send api specification to register exposed destinationprotected voidregisterNewSpecAtKyma(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 systemvoidsetConfigurationService(ConfigurationService configurationService)voidsetDestinationService(DestinationService<AbstractDestinationModel> destinationService)voidsetEventConfigurationDao(EventConfigurationDao eventConfigurationDao)voidsetEventsSpecificationConverter(Converter<EventsSpecificationSourceData,ServiceRegistrationData> eventsSpecificationConverter)voidsetJacksonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper jacksonObjectMapper)voidsetModelService(ModelService modelService)voidsetRestTemplate(RestTemplateWrapper restTemplate)voidsetWebserviceSpecificationConverter(Converter<ExposedDestinationModel,ServiceRegistrationData> webserviceSpecificationConverter)voidunregisterExposedDestination(ExposedDestinationModel destination)Send api specification to unregister exposed destinationvoidunregisterExposedDestinationByTargetId(java.lang.String targetId, java.lang.String destinationTargetId)Unregister exposed destination from target systemprotected voidupdateApiConfigurationUid(java.lang.String systemId, ExposedDestinationModel destination)protected voidupdateExistingSpecAtKyma(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:ApiRegistrationStrategySend api specification to register exposed destination- Specified by:
registerExposedDestinationin interfaceApiRegistrationStrategy- Throws:
ApiRegistrationException
-
unregisterExposedDestination
public void unregisterExposedDestination(ExposedDestinationModel destination) throws ApiRegistrationException
Description copied from interface:ApiRegistrationStrategySend api specification to unregister exposed destination- Specified by:
unregisterExposedDestinationin interfaceApiRegistrationStrategy- Throws:
ApiRegistrationException
-
unregisterExposedDestinationByTargetId
public void unregisterExposedDestinationByTargetId(java.lang.String targetId, java.lang.String destinationTargetId) throws ApiRegistrationExceptionDescription copied from interface:ApiRegistrationStrategyUnregister exposed destination from target system- Specified by:
unregisterExposedDestinationByTargetIdin 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:ApiRegistrationStrategyRetrieves all registered exposed destination from target system- Specified by:
retrieveRegisteredExposedDestinationsin 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 ApiRegistrationExceptionDeprecated, 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)
-
-