Class DecoratorContext
java.lang.Object
de.hybris.platform.outboundservices.decorator.DecoratorContext
Context that is used to hold & transfer data pertaining to outbound requests.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated, for removal: This API element is subject to removal in a future version.protectedDecoratorContext(ItemModel item, @NotNull IntegrationObjectDescriptor io, @NotNull ConsumedDestinationModel destination, OutboundSource source, Collection<String> errors) Deprecated, for removal: This API element is subject to removal in a future version.UseDecoratorContextBuilderto create instances. -
Method Summary
Modifier and TypeMethodDescription@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.No longer used.Retrieves the item model under concern.@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.
-
Constructor Details
-
DecoratorContext
Deprecated, for removal: This API element is subject to removal in a future version. -
DecoratorContext
@Deprecated(since="2105", forRemoval=true) protected DecoratorContext(ItemModel item, @NotNull @NotNull IntegrationObjectDescriptor io, @NotNull @NotNull ConsumedDestinationModel destination, OutboundSource source, Collection<String> errors) Deprecated, for removal: This API element is subject to removal in a future version.UseDecoratorContextBuilderto create instances.Instantiates a new context.- Parameters:
item- item model being synchronized to an external system.io- integration object that governs theitempresentation in the external systemdestination- destination where theitemis being sent.source- platform module that is performing theitemsynchronization. If value is not provided, i.e. it isnull, then a default value ofOutboundSource.UNKNOWNis used.errors- errors that will be included in the monitoring request if any are present
-
-
Method Details
-
decoratorContextBuilder
-
getItemModel
Retrieves the item model under concern.- Returns:
- item model
-
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.
-
getIntegrationObjectItemCode
Deprecated, for removal: This API element is subject to removal in a future version.No longer used. UsegetIntegrationObjectItem()instead. -
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
-
DecoratorContextBuilderinstead