Class ImageDefinition

java.lang.Object
one.jpro.platform.image.manager.ImageDefinition
All Implemented Interfaces:
JsonConvertible

public class ImageDefinition extends Object implements JsonConvertible
Represents a definition of an image that encompasses its source, transformation, and encoding details. This class also provides the capability to convert its instance into a JSON representation.
See Also:
  • Constructor Details

    • ImageDefinition

      public ImageDefinition(ImageSource source, ImageTransformer transformer, ImageEncoder encoder)
      Constructs a new instance of ImageDefinition.
      Parameters:
      source - The source of the image.
      transformer - The transformer for the image.
      encoder - The encoder for the image.
  • Method Details

    • toJSON

      public org.json.JSONObject toJSON()
      Description copied from interface: JsonConvertible
      Converts the object to a JSON representation.
      Specified by:
      toJSON in interface JsonConvertible
      Returns:
      A JSONObject representing the object.
    • getSource

      public ImageSource getSource()
      Returns the image source associated with this definition.
      Returns:
      The ImageSource instance.
    • getTransformer

      public ImageTransformer getTransformer()
      Returns the image transformer associated with this definition.
      Returns:
      The ImageTransformer instance.
    • getEncoder

      public ImageEncoder getEncoder()
      Returns the image encoder associated with this definition.
      Returns:
      The ImageEncoder instance.