public final class SetSearchKeywords extends UpdateActionImpl<T>
See also ProductUpdateCommand.
withUpdateableProduct(client(), product -> { assertThat(product.getMasterData().hasStagedChanges()).isFalse(); final SearchKeywords searchKeywords = SearchKeywords.of(Locale.ENGLISH, asList(SearchKeyword.of("Raider", CustomSuggestTokenizer.of(singletonList("Twix"))))); final ProductUpdateCommand command = ProductUpdateCommand.of(product, SetSearchKeywords.of(searchKeywords)); final Product updatedProduct = client().executeBlocking(command); final SearchKeywords actualKeywords = updatedProduct.getMasterData().getStaged().getSearchKeywords(); assertThat(actualKeywords).isEqualTo(searchKeywords); assertThat(updatedProduct.getMasterData().hasStagedChanges()).isTrue(); return updatedProduct; });
See the test code.
Modifier and Type | Method and Description |
---|---|
SearchKeywords |
getSearchKeywords() |
Boolean |
isStaged() |
static SetSearchKeywords |
of(SearchKeywords searchKeywords) |
static SetSearchKeywords |
of(SearchKeywords searchKeywords,
Boolean staged) |
getAction
public SearchKeywords getSearchKeywords()
public static SetSearchKeywords of(SearchKeywords searchKeywords)
public static SetSearchKeywords of(SearchKeywords searchKeywords, @Nullable Boolean staged)