public final class Publish extends UpdateActionImpl<Product>
See also ProductUpdateCommand.
withUpdateableProduct(client(), product -> {
assertThat(product.getMasterData().isPublished()).isFalse();
final Product publishedProduct = client().executeBlocking(ProductUpdateCommand.of(product, Publish.of()));
assertThat(publishedProduct.getMasterData().isPublished()).isTrue();
final Product unpublishedProduct = client().executeBlocking(ProductUpdateCommand.of(publishedProduct, Unpublish.of()));
assertThat(unpublishedProduct.getMasterData().isPublished()).isFalse();
return unpublishedProduct;
});
See the test code.
ProductPublishedMessage
Modifier and Type | Method and Description |
---|---|
PublishScope |
getScope() |
static Publish |
of() |
static Publish |
ofScope(PublishScope scope) |
getAction
public static Publish of()
public static Publish ofScope(@Nullable PublishScope scope)
@Nullable public PublishScope getScope()