Class ClientAttachment

java.lang.Object
org.gcube.portal.databook.shared.ClientAttachment

@JsType(isNative=true, namespace="<global>", name="Object") public class ClientAttachment extends Object
Represents an attachment for use in GWT/JavaScript interop scenarios. Used to transfer attachment data between Java and JavaScript (frontend). Fields are public for direct JS access. Use create(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) to instantiate.
Author:
Massimiliano Assante, ISTI-CNR
  • Field Details

    • id

      public String id
    • uri

      public String uri
    • name

      public String name
    • description

      public String description
    • thumbnailURL

      public String thumbnailURL
    • mimeType

      public String mimeType
  • Constructor Details

    • ClientAttachment

      public ClientAttachment()
  • Method Details

    • create

      @JsOverlay public static ClientAttachment create(String id, String uri, String name, String description, String thumbnailURL, String mimeType)
      Creates a new instance of ClientAttachment.
      Parameters:
      id - the id in the Cassandra CF.
      uri - the URI where the file can be downloaded from.
      name - the name of the attached file.
      description - the description of the attached file.
      thumbnailURL - the URL of the image representing the attached file.
      mimeType - the MIME type of the file.
      Returns:
      a new ClientAttachment instance.