Class ShoppingListUpdateActionUtils


  • public final class ShoppingListUpdateActionUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildChangeNameUpdateAction​(com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList, com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
      Compares the LocalizedString names of a ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional.
      static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildSetAnonymousIdUpdateAction​(com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList, com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
      Compares the anonymousIds of ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional.
      static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildSetCustomerUpdateAction​(com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList, com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
      Compares the customer references of a ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional.
      static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildSetDeleteDaysAfterLastModificationUpdateAction​(com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList, com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
      Compares the deleteDaysAfterLastModification of ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional.
      static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildSetDescriptionUpdateAction​(com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList, com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
      Compares the LocalizedString descriptions of ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional.
      static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildSetSlugUpdateAction​(com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList, com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
      Compares the LocalizedString slugs of a ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • buildSetSlugUpdateAction

        @Nonnull
        public static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildSetSlugUpdateAction​(@Nonnull
                                                                                                                                       com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList,
                                                                                                                                       @Nonnull
                                                                                                                                       com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
        Compares the LocalizedString slugs of a ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional. If both the ShoppingList and the ShoppingListDraft have the same slug, then no update action is needed and hence an empty Optional is returned.
        Parameters:
        oldShoppingList - the shopping list which should be updated.
        newShoppingList - the shopping list draft where we get the new slug.
        Returns:
        A filled optional with the update action or an empty optional if the slugs are identical.
      • buildChangeNameUpdateAction

        @Nonnull
        public static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildChangeNameUpdateAction​(@Nonnull
                                                                                                                                          com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList,
                                                                                                                                          @Nonnull
                                                                                                                                          com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
        Compares the LocalizedString names of a ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional. If both the ShoppingList and the ShoppingListDraft have the same name, then no update action is needed and hence an empty Optional is returned.
        Parameters:
        oldShoppingList - the shopping list which should be updated.
        newShoppingList - the shopping list draft where we get the new name.
        Returns:
        A filled optional with the update action or an empty optional if the names are identical.
      • buildSetDescriptionUpdateAction

        @Nonnull
        public static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildSetDescriptionUpdateAction​(@Nonnull
                                                                                                                                              com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList,
                                                                                                                                              @Nonnull
                                                                                                                                              com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
        Compares the LocalizedString descriptions of ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional. If both the ShoppingList and the ShoppingListDraft have the same description, then no update action is needed and hence an empty Optional is returned.
        Parameters:
        oldShoppingList - the shopping list which should be updated.
        newShoppingList - the shopping list draft where we get the new description.
        Returns:
        A filled optional with the update action or an empty optional if the descriptions are identical.
      • buildSetCustomerUpdateAction

        @Nonnull
        public static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildSetCustomerUpdateAction​(@Nonnull
                                                                                                                                           com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList,
                                                                                                                                           @Nonnull
                                                                                                                                           com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
        Compares the customer references of a ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional. If both the ShoppingList and the ShoppingListDraft have the same customer, then no update action is needed and hence an empty Optional is returned.
        Parameters:
        oldShoppingList - the shopping list which should be updated.
        newShoppingList - the shopping list draft which holds the new customer.
        Returns:
        A filled optional with the update action or an empty optional if the customers are identical.
      • buildSetAnonymousIdUpdateAction

        @Nonnull
        public static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildSetAnonymousIdUpdateAction​(@Nonnull
                                                                                                                                              com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList,
                                                                                                                                              @Nonnull
                                                                                                                                              com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
        Compares the anonymousIds of ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional. If both the ShoppingList and the ShoppingListDraft have the same anonymousId, then no update action is needed and hence an empty Optional is returned.
        Parameters:
        oldShoppingList - the shopping list which should be updated.
        newShoppingList - the shopping list draft which holds the new anonymousId.
        Returns:
        A filled optional with the update action or an empty optional if the anonymousIds are identical.
      • buildSetDeleteDaysAfterLastModificationUpdateAction

        @Nonnull
        public static java.util.Optional<com.commercetools.api.models.shopping_list.ShoppingListUpdateAction> buildSetDeleteDaysAfterLastModificationUpdateAction​(@Nonnull
                                                                                                                                                                  com.commercetools.api.models.shopping_list.ShoppingList oldShoppingList,
                                                                                                                                                                  @Nonnull
                                                                                                                                                                  com.commercetools.api.models.shopping_list.ShoppingListDraft newShoppingList)
        Compares the deleteDaysAfterLastModification of ShoppingList and a ShoppingListDraft and returns an ShoppingListUpdateAction as a result in an Optional. If both the ShoppingList and the ShoppingListDraft have the same deleteDaysAfterLastModification, then no update action is needed and hence an empty Optional is returned.
        Parameters:
        oldShoppingList - the shopping list which should be updated.
        newShoppingList - the shopping list draft which holds the new deleteDaysAfterLastModification.
        Returns:
        A filled optional with the update action or an empty optional if the deleteDaysAfterLastModifications are identical.