java.lang.Object
com.commercetools.importapi.models.common.ImageImpl
All Implemented Interfaces:
Image, io.vrap.rmf.base.client.ModelBase

public class ImageImpl extends Object implements Image, io.vrap.rmf.base.client.ModelBase

An Image uploaded to commercetools Composable Commerce is stored in a Content Delivery Network and it's available in several pre-defined sizes. If you already have an image stored on an external service, you can save the URL when creating a new product or adding a variant, or you can add it later.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase

    io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
  • Constructor Summary

    Constructors
    Constructor
    Description
    create empty instance
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Dimensions of the original image.
    Custom label that can be used, for example, as an image description.
    URL of the image in its original size.
    int
     
    void
    Dimensions of the original image.
    void
    Custom label that can be used, for example, as an image description.
    void
    URL of the image in its original size.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.commercetools.importapi.models.common.Image

    withImage

    Methods inherited from interface io.vrap.rmf.base.client.ModelBase

    reflectionString, reflectionString
  • Constructor Details

    • ImageImpl

      public ImageImpl()
      create empty instance
  • Method Details

    • getUrl

      public String getUrl()

      URL of the image in its original size. The URL must be unique within a single variant. It can be used to obtain the image in different sizes.

      Specified by:
      getUrl in interface Image
      Returns:
      url
    • getDimensions

      Dimensions of the original image. This can be used by your application, for example, to determine whether the image is large enough to display a zoom view.

      Specified by:
      getDimensions in interface Image
      Returns:
      dimensions
    • getLabel

      public String getLabel()

      Custom label that can be used, for example, as an image description.

      Specified by:
      getLabel in interface Image
      Returns:
      label
    • setUrl

      public void setUrl(String url)
      Description copied from interface: Image

      URL of the image in its original size. The URL must be unique within a single variant. It can be used to obtain the image in different sizes.

      Specified by:
      setUrl in interface Image
      Parameters:
      url - value to be set
    • setDimensions

      public void setDimensions(AssetDimensions dimensions)
      Description copied from interface: Image

      Dimensions of the original image. This can be used by your application, for example, to determine whether the image is large enough to display a zoom view.

      Specified by:
      setDimensions in interface Image
      Parameters:
      dimensions - value to be set
    • setLabel

      public void setLabel(String label)
      Description copied from interface: Image

      Custom label that can be used, for example, as an image description.

      Specified by:
      setLabel in interface Image
      Parameters:
      label - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object