/** * Action to add/remove/change a custom attribute. * * @param name the name of the attribute, consult the product type to find the name * @param value embedded in an optional the new value of the attribute or an empty Optional to remove the value from the attribute * @return update action */ public static SetAttributeInAllVariants of(final String name, final JsonNode value) { return of(name, value, null); }
/** * Action to add/change a custom attribute. * * @param setter the serializer of the attribute * @param value the value to set * @param <T> type of the attribute * @return update action */ public static <T> SetAttributeInAllVariants of(final NamedAttributeAccess<T> setter, final T value) { return of(setter, value, null); }
/** * Action to add/change a custom attribute. * * @param setter the serializer of the attribute * @param value the value to set * @param <T> type of the attribute * @return update action */ public static <T> SetAttributeInAllVariants of(final NamedAttributeAccess<T> setter, final T value) { return of(setter, value, null); }
/** * Action to add/remove/change a custom attribute. * * @param name the name of the attribute, consult the product type to find the name * @param value embedded in an optional the new value of the attribute or an empty Optional to remove the value from the attribute * @return update action */ public static SetAttributeInAllVariants of(final String name, final JsonNode value) { return of(name, value, null); }
/** * Action to add/change a custom attribute. * * @param attribute the name and the value of the attribute to update * @return update action */ public static SetAttributeInAllVariants of(final AttributeDraft attribute) { return of(attribute, null); }
/** * Action to remove a custom attribute. * * @param name the name of the attribute, consult the product type to find the name * @return update action */ public static SetAttributeInAllVariants ofUnsetAttribute(final String name) { return of(name, null); }
/** * Action to add/change a custom attribute. * * @param attribute the name and the value of the attribute to update * @return update action */ public static SetAttributeInAllVariants of(final AttributeDraft attribute) { return of(attribute, null); }
/** * Action to remove a custom attribute. * * @param name the name of the attribute, consult the product type to find the name * @param productUpdateScope the scope where the attribute should be updated * @return update action */ public static SetAttributeInAllVariants ofUnsetAttribute(final String name, final ProductUpdateScope productUpdateScope) { return of(name, Optional.<JsonNode>empty(), productUpdateScope); }
public static SetAttributeInAllVariants ofUnsetAttribute(final String name, @Nullable final Boolean staged) { return of(name, null, staged); }
public static SetAttributeInAllVariants ofUnsetAttribute(final String name, @Nullable final Boolean staged) { return of(name, null, staged); }
/** * Action to add/change a custom attribute. * * @param setter the serializer of the attribute * @param value the value to set * @param <T> type of the attribute * @return update action */ public static <T> SetAttributeInAllVariants of(final NamedAttributeAccess<T> setter, final T value) { return of(AttributeDraft.of(setter, value)); } }
/** * Action to remove a custom attribute. * * @param NamedAttributeAccess object containing the name of the attribute * @param <T> type of the attribute * @return update action */ public static <T> SetAttributeInAllVariants ofUnsetAttribute(final NamedAttributeAccess<T> NamedAttributeAccess) { return of(NamedAttributeAccess.getName(), null); }
/** * Action to remove a custom attribute. * * @param attributeSetter object containing the name of the attribute * @param productUpdateScope the scope where the attribute should be updated * @param <M> context of the {@link io.sphere.sdk.attributes.AttributeSetter} * @param <T> type of the attribute * @return update action */ public static <M, T> SetAttributeInAllVariants ofUnsetAttribute(final AttributeSetter<M, T> attributeSetter, final ProductUpdateScope productUpdateScope) { return of(attributeSetter.getName(), Optional.<JsonNode>empty(), productUpdateScope); }
public static <T> SetAttributeInAllVariants of(final NamedAttributeAccess<T> setter, final T value, @Nullable final Boolean staged) { return of(AttributeDraft.of(setter, value), staged); } }
public static <T> SetAttributeInAllVariants ofUnsetAttribute(final NamedAttributeAccess<T> NamedAttributeAccess, @Nullable final Boolean staged) { return of(NamedAttributeAccess.getName(), null, staged); }
public static <T> SetAttributeInAllVariants of(final NamedAttributeAccess<T> setter, final T value, @Nullable final Boolean staged) { return of(AttributeDraft.of(setter, value), staged); } }
/** * Action to add/change a custom attribute. * * @param attribute the name and the value of the attribute to update * @param productUpdateScope the scope where the attribute should be updated * @return update action */ public static SetAttributeInAllVariants of(final Attribute attribute, final ProductUpdateScope productUpdateScope) { return of(attribute.getName(), Optional.of(attribute.valueAsJson()), productUpdateScope); }
public static SetAttributeInAllVariants of(final AttributeDraft attribute, @Nullable final Boolean staged) { return of(attribute.getName(), attribute.getValue(), staged); }
public static SetAttributeInAllVariants of(final AttributeDraft attribute, @Nullable final Boolean staged) { return of(attribute.getName(), attribute.getValue(), staged); }
/** * Action to add/change a custom attribute. * * @param attribute the name and the value of the attribute to update * @return update action */ public static SetAttributeInAllVariants of(final AttributeDraft attribute) { return of(attribute.getName(), attribute.getValue()); }