public final class TypeSyncUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.types.Type>> |
buildActions(io.sphere.sdk.types.Type oldType,
io.sphere.sdk.types.TypeDraft newType,
TypeSyncOptions syncOptions)
Compares all the fields (including the field definitions see
TypeUpdateActionUtils.buildFieldDefinitionsUpdateActions(Type, TypeDraft, TypeSyncOptions)) of
a Type and a TypeDraft. |
@Nonnull
public static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.types.Type>> buildActions(@Nonnull
io.sphere.sdk.types.Type oldType,
@Nonnull
io.sphere.sdk.types.TypeDraft newType,
@Nonnull
TypeSyncOptions syncOptions)
TypeUpdateActionUtils.buildFieldDefinitionsUpdateActions(Type, TypeDraft, TypeSyncOptions)) of
a Type and a TypeDraft. It returns a List of UpdateAction<Type> as a result. If no update actions are needed, for example in
case where both the Type and the TypeDraft have the same fields, an empty
List is returned.
Note: Currently this util doesn't support the following:
oldType - the Type which should be updated.newType - the TypeDraft 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 TypeSyncOptions for more info.