Class StateSyncUtils
- java.lang.Object
-
- com.commercetools.sync.states.utils.StateSyncUtils
-
public final class StateSyncUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<com.commercetools.api.models.state.StateUpdateAction>buildActions(com.commercetools.api.models.state.State oldState, com.commercetools.api.models.state.StateDraft newState)Compares all the fields (including the roles seeStateUpdateActionUtils.buildRolesUpdateActions(com.commercetools.api.models.state.State, com.commercetools.api.models.state.StateDraft)) of aStateand aStateDraft.
-
-
-
Method Detail
-
buildActions
@Nonnull public static java.util.List<com.commercetools.api.models.state.StateUpdateAction> buildActions(@Nonnull com.commercetools.api.models.state.State oldState, @Nonnull com.commercetools.api.models.state.StateDraft newState)Compares all the fields (including the roles seeStateUpdateActionUtils.buildRolesUpdateActions(com.commercetools.api.models.state.State, com.commercetools.api.models.state.StateDraft)) of aStateand aStateDraft. It returns aListofStateUpdateActionas a result. If no update action is needed, for example in case where both theStateand theStateDrafthave the same fields, an emptyListis returned.- Parameters:
oldState- theStatewhich should be updated.newState- theStateDraftwhere we get the new data.- Returns:
- A list of state-specific update actions.
-
-