Class AttributeDefinitionReferenceResolver

    • Method Detail

      • resolveReferences

        @Nonnull
        public java.util.concurrent.CompletionStage<io.sphere.sdk.products.attributes.AttributeDefinitionDraft> resolveReferences​(@Nonnull
                                                                                                                                  io.sphere.sdk.products.attributes.AttributeDefinitionDraft attributeDefinitionDraft)
        Given an AttributeDefinitionDraft this method attempts to resolve the ProductType references, which can exist on attributeDefinition with an AttributeType: NestedType or SetType of NestedType, to return a CompletionStage which contains a new instance of the draft with the resolved references.
        Specified by:
        resolveReferences in class BaseReferenceResolver<io.sphere.sdk.products.attributes.AttributeDefinitionDraft,​ProductTypeSyncOptions>
        Parameters:
        attributeDefinitionDraft - the attributeDefinitionDraft to resolve its references.
        Returns:
        a CompletionStage that contains as a result a new attributeDefinitionDraft instance with resolved references or if there is no productType existing with the given key the draft will be returned as is without the reference resolved. In case an error occurs during reference resolution, a ReferenceResolutionException is thrown.