public final class CategoryUpdateActionUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildAssetsUpdateActions(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory,
CategorySyncOptions syncOptions)
Compares the assets of a
Category and a CategoryDraft and returns a list of
UpdateAction<Category> as a result. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildChangeNameUpdateAction(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory)
Compares the
LocalizedString names of a Category and a CategoryDraft and returns an
UpdateAction<Category> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildChangeOrderHintUpdateAction(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory,
CategorySyncOptions syncOptions)
Compares the orderHint values of a
Category and a CategoryDraft and returns an
UpdateAction<Category> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildChangeParentUpdateAction(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory,
CategorySyncOptions syncOptions)
Compares the parents
Reference<Category> of a Category and a CategoryDraft
and returns an UpdateAction<Category> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildChangeSlugUpdateAction(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory)
Compares the
LocalizedString slugs of a Category and a CategoryDraft and returns an
UpdateAction<Category> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildSetDescriptionUpdateAction(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory)
Compares the
LocalizedString descriptions of a Category and a CategoryDraft and
returns an UpdateAction<Category> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildSetExternalIdUpdateAction(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory)
Compares the externalId values of a
Category and a CategoryDraft and returns an
UpdateAction<Category> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildSetMetaDescriptionUpdateAction(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory)
Compares the
LocalizedString meta description of a Category and a CategoryDraft and
returns an UpdateAction<Category> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildSetMetaKeywordsUpdateAction(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory)
Compares the
LocalizedString meta keywords of a Category and a CategoryDraft and
returns an UpdateAction<Category> as a result in an Optional. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> |
buildSetMetaTitleUpdateAction(io.sphere.sdk.categories.Category oldCategory,
io.sphere.sdk.categories.CategoryDraft newCategory)
Compares the
LocalizedString meta title of a Category and a CategoryDraft and returns an
UpdateAction<Category> as a result in an Optional. |
@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildChangeNameUpdateAction(@Nonnull
io.sphere.sdk.categories.Category oldCategory,
@Nonnull
io.sphere.sdk.categories.CategoryDraft newCategory)
LocalizedString names of a Category and a CategoryDraft and returns an
UpdateAction<Category> as a result in an Optional. If both the Category and
the CategoryDraft have the same name, then no update action is needed and hence an empty Optional
is returned.oldCategory - the category which should be updated.newCategory - the category draft where we get the new name.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildChangeSlugUpdateAction(@Nonnull
io.sphere.sdk.categories.Category oldCategory,
@Nonnull
io.sphere.sdk.categories.CategoryDraft newCategory)
LocalizedString slugs of a Category and a CategoryDraft and returns an
UpdateAction<Category> as a result in an Optional. If both the Category and
the CategoryDraft have the same slug, then no update action is needed and hence an empty Optional
is returned.oldCategory - the category which should be updated.newCategory - the category draft where we get the new slug.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildSetDescriptionUpdateAction(@Nonnull
io.sphere.sdk.categories.Category oldCategory,
@Nonnull
io.sphere.sdk.categories.CategoryDraft newCategory)
LocalizedString descriptions of a Category and a CategoryDraft and
returns an UpdateAction<Category> as a result in an Optional. If both the
Category and the CategoryDraft have the same description, then no update action is needed and
hence an empty Optional is returned.oldCategory - the category which should be updated.newCategory - the category draft where we get the new description.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildChangeParentUpdateAction(@Nonnull
io.sphere.sdk.categories.Category oldCategory,
@Nonnull
io.sphere.sdk.categories.CategoryDraft newCategory,
@Nonnull
CategorySyncOptions syncOptions)
Reference<Category> of a Category and a CategoryDraft
and returns an UpdateAction<Category> as a result in an Optional. If both the
Category and the CategoryDraft have the same parents, then no update action is needed and hence
an empty Optional is returned.
Note: If the parent Reference<Category> of the new CategoryDraft is null, an
empty Optional is returned with no update actions and a custom callback function, if set on the
supplied CategorySyncOptions, is called.
oldCategory - the category which should be updated.newCategory - the category draft where we get the new parent.syncOptions - the sync syncOptions with which a custom callback function is called in case the parent
is null.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildChangeOrderHintUpdateAction(@Nonnull
io.sphere.sdk.categories.Category oldCategory,
@Nonnull
io.sphere.sdk.categories.CategoryDraft newCategory,
@Nonnull
CategorySyncOptions syncOptions)
Category and a CategoryDraft and returns an
UpdateAction<Category> as a result in an Optional. If both the Category and
the CategoryDraft have the same orderHint, then no update action is needed and hence an empty
Optional is returned.
Note: If the orderHint of the new CategoryDraft is null, an empty Optional is returned with
no update actions and a custom callback function, if set on the supplied CategorySyncOptions, is called.
oldCategory - the category which should be updated.newCategory - the category draft where we get the new orderHint.syncOptions - the sync syncOptions with which a custom callback function is called in case the orderHint
is null.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildSetMetaTitleUpdateAction(@Nonnull
io.sphere.sdk.categories.Category oldCategory,
@Nonnull
io.sphere.sdk.categories.CategoryDraft newCategory)
LocalizedString meta title of a Category and a CategoryDraft and returns an
UpdateAction<Category> as a result in an Optional. If both the Category and
the CategoryDraft have the same meta title, then no update action is needed and hence an empty
Optional is returned.oldCategory - the category which should be updated.newCategory - the category draft where we get the new meta title.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildSetMetaKeywordsUpdateAction(@Nonnull
io.sphere.sdk.categories.Category oldCategory,
@Nonnull
io.sphere.sdk.categories.CategoryDraft newCategory)
LocalizedString meta keywords of a Category and a CategoryDraft and
returns an UpdateAction<Category> as a result in an Optional. If both the
Category and the CategoryDraft have the same meta keywords, then no update action is needed and
hence an empty Optional is returned.oldCategory - the category which should be updated.newCategory - the category draft where we get the new meta keywords.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildSetMetaDescriptionUpdateAction(@Nonnull
io.sphere.sdk.categories.Category oldCategory,
@Nonnull
io.sphere.sdk.categories.CategoryDraft newCategory)
LocalizedString meta description of a Category and a CategoryDraft and
returns an UpdateAction<Category> as a result in an Optional. If both the
Category and the CategoryDraft have the same meta description, then no update action is needed
and hence an empty Optional is returned.oldCategory - the category which should be updated.newCategory - the category draft where we get the new meta description.@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildSetExternalIdUpdateAction(@Nonnull
io.sphere.sdk.categories.Category oldCategory,
@Nonnull
io.sphere.sdk.categories.CategoryDraft newCategory)
Category and a CategoryDraft and returns an
UpdateAction<Category> as a result in an Optional. If both the Category and
the CategoryDraft have the same externalId, then no update action is needed and hence an empty
Optional is returned.oldCategory - the category which should be updated.newCategory - the category draft where we get the new externalId.@Nonnull
public static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.categories.Category>> buildAssetsUpdateActions(@Nonnull
io.sphere.sdk.categories.Category oldCategory,
@Nonnull
io.sphere.sdk.categories.CategoryDraft newCategory,
@Nonnull
CategorySyncOptions syncOptions)
Category and a CategoryDraft and returns a list of
UpdateAction<Category> as a result. If both the Category and
the CategoryDraft have the identical assets, then no update action is needed and hence an empty
List is returned. In case, the new category draft has a list of assets in which a duplicate key exists,
the error callback is triggered and an empty list is returned.oldCategory - the category which should be updated.newCategory - the category draft where we get the new externalId.syncOptions - the sync options with which a custom callback function is called in case errors exists
while building assets custom field/type actions.