public final class CategorySyncUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildActions(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory,
CategorySyncOptions syncOptions)
Compares all the fields of a
Category and a CategoryDraft . |
@Nonnull public static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildActions(@Nonnull io.sphere.sdk.categories.Category oldCategory, @Nonnull io.sphere.sdk.categories.CategoryDraft newCategory, @Nonnull CategorySyncOptions syncOptions)
Category
and a CategoryDraft
. It returns a List
of UpdateAction
<Category
> as a result. If no update action is
needed, for example in case where both the Category
and the CategoryDraft
have
the same parents, an empty List
is returned.oldCategory
- the category which should be updated.newCategory
- the category draft where we get the new data.syncOptions
- the sync options wrapper which contains options related to the sync process
supplied by the user. For example, custom callbacks to call in case of warnings or errors
occurring on the build update action process. And other options (See BaseSyncOptions
for more info.