public class AssetCustomActionBuilder extends java.lang.Object implements GenericCustomActionBuilder<io.sphere.sdk.products.Product>
| Constructor and Description |
|---|
AssetCustomActionBuilder() |
| Modifier and Type | Method and Description |
|---|---|
io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.products.Product> |
buildRemoveCustomTypeAction(java.lang.Integer variantId,
java.lang.String assetKey)
Creates a CTP "setCustomType" update action on the given resource
T that removes the custom type set on
the given resource T. |
io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.products.Product> |
buildSetCustomFieldAction(java.lang.Integer variantId,
java.lang.String assetKey,
java.lang.String customFieldName,
com.fasterxml.jackson.databind.JsonNode customFieldValue)
Creates a CTP "setCustomField" update action on the given resource
T that updates a custom field with
customFieldName and a customFieldValue on the given resource T. |
io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.products.Product> |
buildSetCustomTypeAction(java.lang.Integer variantId,
java.lang.String assetKey,
java.lang.String customTypeId,
java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> customFieldsJsonMap)
Creates a CTP "setCustomType" update action on the given resource
T. |
@Nonnull
public io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.products.Product> buildRemoveCustomTypeAction(@Nullable
java.lang.Integer variantId,
@Nullable
java.lang.String assetKey)
GenericCustomActionBuilderT that removes the custom type set on
the given resource T. If the resource that has the custom fields is a secondary resource (e.g. price or
asset) and not a primary resource (e.g Category, Product, Channel, etc..), the variantId and the
objectId will be used to identify this secondary resource within its container.buildRemoveCustomTypeAction in interface GenericCustomActionBuilder<io.sphere.sdk.products.Product>variantId - an optional field which could be used to identify the variant that holds the a resource
(e.g. asset) which has the custom fields.assetKey - an optional field which could be used to identify the id of the resource
(e.g. asset, price, etc..) which has the custom fields.@Nonnull
public io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.products.Product> buildSetCustomTypeAction(@Nullable
java.lang.Integer variantId,
@Nullable
java.lang.String assetKey,
@Nonnull
java.lang.String customTypeId,
@Nullable
java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> customFieldsJsonMap)
GenericCustomActionBuilderT. If the resource that has the custom
fields is a secondary resource (e.g. Price or asset) and not a primary resource (e.g Category, Product, Channel,
etc..), the variantId and the objectId will be used to identify this secondary resource within
its container.buildSetCustomTypeAction in interface GenericCustomActionBuilder<io.sphere.sdk.products.Product>variantId - an optional field which could be used to identify the variant that holds the a
resource (e.g. asset) which has the custom fields.assetKey - an optional field which could be used to identify the id of the resource
(e.g. asset, price, etc..) which has the custom fields.customTypeId - the id of the new custom type.customFieldsJsonMap - the custom fields map of JSON values.@Nonnull
public io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.products.Product> buildSetCustomFieldAction(@Nullable
java.lang.Integer variantId,
@Nullable
java.lang.String assetKey,
@Nullable
java.lang.String customFieldName,
@Nullable
com.fasterxml.jackson.databind.JsonNode customFieldValue)
GenericCustomActionBuilderT that updates a custom field with
customFieldName and a customFieldValue on the given resource T. If the resource that has
the custom fields is a secondary resource (e.g. Price or asset) and not a primary resource (e.g Category,
Product, Channel, etc..), the variantId and the objectId will be used to identify this secondary
resource within its container.buildSetCustomFieldAction in interface GenericCustomActionBuilder<io.sphere.sdk.products.Product>variantId - an optional field which could be used to identify the variant that holds the a resource
(e.g. asset) which has the custom fields.assetKey - an optional field which could be used to identify the id of the resource
(e.g. asset, price, etc..) which has the custom fields.customFieldName - the name of the custom field to update.customFieldValue - the new JSON value of the custom field.