Class DecoratorContext
java.lang.Object
de.hybris.platform.outboundservices.decorator.DecoratorContext
Context that is used to hold & transfer data pertaining to outbound requests.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DecoratorContextBuilder@NotNull ConsumedDestinationModelRetrieves destination, to which the item should be sent.@NotNull Collection<String>Retrieves a list of errors that indicate why this context is not valid or returns an empty list.RetrievesEventTypeof the value@NotNull HttpMethodRetrieves httpMethod of the item synchronization.@NotNull IntegrationObjectDescriptorRetrieves theGeneratedIntegrationObject.getCode()value.A convenience/shortcut method for retrieving the context integration object code.Retrieves integration object item type descriptor for the context integration object and item model.Deprecated, for removal: This API element is subject to removal in a future version.This will return the payload object according to the integration object specs.@NotNull OutboundSourceRetrieves source of the item synchronization.@javax.validation.constraints.NotNull booleanRetrieves a value indicating if this context is valid based off the presence of errors.
-
Method Details
-
decoratorContextBuilder
-
getItemModel
Deprecated, for removal: This API element is subject to removal in a future version.usegetPayloadObject()instead.This will return theItemModelas the payload object.- Returns:
- the item model or
nullwhen the payload object is not of typeItemModel.
-
getPayloadObject
This will return the payload object according to the integration object specs. It can be traditionalItemModelor any POJO.- Returns:
- the payload object.
-
getIntegrationObject
Retrieves theGeneratedIntegrationObject.getCode()value.- Returns:
- integration object code
-
getIntegrationObjectCode
A convenience/shortcut method for retrieving the context integration object code. Calling this method is same asgetIntegrationObject().getCode()- Returns:
- code of the context integration object.
-
getIntegrationObjectItem
Retrieves integration object item type descriptor for the context integration object and item model.- Returns:
- an
Optionalcontaining aTypeDescriptor, if the integration object contains at least one item for the context item model type. I.e. there is a integration object item model matching thegetItemModel().getItemtype(). Otherwise, anOptional.empty()is returned.
-
getDestinationModel
Retrieves destination, to which the item should be sent.- Returns:
- consumed destination
-
getErrors
Retrieves a list of errors that indicate why this context is not valid or returns an empty list.- Returns:
- a list of errors
-
hasErrors
@NotNull public @javax.validation.constraints.NotNull boolean hasErrors()Retrieves a value indicating if this context is valid based off the presence of errors.- Returns:
trueif this context has errors, elsefalse
-
getSource
Retrieves source of the item synchronization.- Returns:
- a platform module that sends the item to external system.
-
getEventType
RetrievesEventTypeof the value- Returns:
- value of event type
-
getHttpMethod
Retrieves httpMethod of the item synchronization.- Returns:
- httpMethod for the delta being sent
-
getIntegrationKey
-
getPayloadObject()instead.