Class EntityImageInfo

java.lang.Object
fr.becpg.repo.report.entity.EntityImageInfo

public class EntityImageInfo extends Object

EntityImageInfo class.

Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • id

      String id
    • name

      String name
    • title

      String title
    • description

      String description
    • imageNodeRef

      org.alfresco.service.cmr.repository.NodeRef imageNodeRef
    • content

      byte[] content
    • mimeType

      String mimeType
  • Constructor Details

    • EntityImageInfo

      public EntityImageInfo(String imgId, org.alfresco.service.cmr.repository.NodeRef imageNodeRef)

      Constructor for EntityImageInfo.

      Parameters:
      imgId - a String object
      imageNodeRef - a NodeRef object
    • EntityImageInfo

      public EntityImageInfo(String imgId, byte[] content, String mimeType)

      Constructor for an image generated on the fly rather than read from a content node, so that a report can carry a picture that exists nowhere in the repository.

      Parameters:
      imgId - a String object
      content - an array of
      invalid reference
      byte
      objects
      mimeType - a String object
  • Method Details

    • isInMemory

      public boolean isInMemory()

      Tells whether this image carries its bytes instead of pointing at a content node.

      Returns:
      a boolean
    • getContent

      public byte[] getContent()

      Getter for the field content.

      Returns:
      an array of
      invalid reference
      byte
      objects
    • getMimeType

      public String getMimeType()

      Getter for the field mimeType.

      Returns:
      a String object
    • getImageNodeRef

      public org.alfresco.service.cmr.repository.NodeRef getImageNodeRef()

      Getter for the field imageNodeRef.

      Returns:
      a NodeRef object
    • getId

      public String getId()

      Getter for the field id.

      Returns:
      a String object.
    • setId

      public void setId(String id)

      Setter for the field id.

      Parameters:
      id - a String object.
    • getName

      public String getName()

      Getter for the field name.

      Returns:
      a String object.
    • setName

      public void setName(String name)

      Setter for the field name.

      Parameters:
      name - a String object.
    • getTitle

      public String getTitle()

      Getter for the field title.

      Returns:
      a String object.
    • setTitle

      public void setTitle(String title)

      Setter for the field title.

      Parameters:
      title - a String object.
    • getDescription

      public String getDescription()

      Getter for the field description.

      Returns:
      a String object.
    • setDescription

      public void setDescription(String description)

      Setter for the field description.

      Parameters:
      description - a String object.
    • hashCode

      public int hashCode()
      Images are held in a set and reach the report engine keyed by their id, so the id alone decides identity. Comparing the bytes as well would let two generated images with the same id both survive, and the report would then pick either one.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object