Class ThumbnailDetail

    • Field Detail

      • THUMBNAIL_OBJECTTYPE_PUBLICATION_VIGNETTE

        public static final int THUMBNAIL_OBJECTTYPE_PUBLICATION_VIGNETTE
        See Also:
        Constant Field Values
    • Constructor Detail

      • ThumbnailDetail

        public ThumbnailDetail​(String instanceId,
                               int objectId,
                               int objectType)
    • Method Detail

      • getReference

        public ThumbnailReference getReference()
        Description copied from interface: Thumbnail
        Gets the resource or the contribution in Silverpeas to which this thumbnail is related.
        Specified by:
        getReference in interface Thumbnail
        Returns:
        a reference to the resource or to the contribution related by this image.
      • isCropped

        public boolean isCropped()
        Description copied from interface: Thumbnail
        Is this thumbnail has been cropped?
        Specified by:
        isCropped in interface Thumbnail
        Returns:
        true if it exists a cropped version of this thumbnail. False otherwise.
      • getOriginalFileName

        public String getOriginalFileName()
        Description copied from interface: Thumbnail
        Gets the name of the file in which is stored the image that was uploaded to be used as a thumbnail of a resource in Silverpeas.
        Specified by:
        getOriginalFileName in interface Thumbnail
        Returns:
        the original file name of this image.
      • getCropFileName

        public String getCropFileName()
        Description copied from interface: Thumbnail
        Gets the name of the file in which is stored the cropped version of the image and that will be actually used as thumbnail. If no cropped version exists (checks with the Thumbnail.isCropped() method), null is returned.
        Specified by:
        getCropFileName in interface Thumbnail
        Returns:
        the file name of the cropped version of this image. Null if no cropped version exists.
      • getImageFileName

        public String getImageFileName()
        Returns the image file name of thumbnail by priority. If the crop file name exists it is returned, otherwise the original file name is returned.
        Specified by:
        getImageFileName in interface Thumbnail
        Returns:
        a file name as string.
      • getInstanceId

        public String getInstanceId()
      • getXStart

        public int getXStart()
      • getYStart

        public int getYStart()
      • getXLength

        public int getXLength()
      • getYLength

        public int getYLength()
      • setObjectId

        public void setObjectId​(int objectId)
      • getObjectId

        public int getObjectId()
      • getObjectType

        public int getObjectType()
      • setObjectType

        public void setObjectType​(int objectType)
      • setInstanceId

        public void setInstanceId​(String instanceId)
      • setOriginalFileName

        public void setOriginalFileName​(String originalFileName)
      • setCropFileName

        public void setCropFileName​(String cropFileName)
      • setXStart

        public void setXStart​(int xStart)
      • setYStart

        public void setYStart​(int yStart)
      • setXLength

        public void setXLength​(int xLength)
      • setYLength

        public void setYLength​(int yLength)
      • setMimeType

        public void setMimeType​(String mimeType)
      • getMimeType

        public String getMimeType()
        Description copied from interface: Thumbnail
        Gets the MIME type of the thumbnail. For example "image/jpeg" for a JPEG image.
        Specified by:
        getMimeType in interface Thumbnail
        Returns:
        the MIME type of the image.
      • canBeCropped

        public boolean canBeCropped()
        Description copied from interface: Thumbnail
        Is this thumbnail can be cropped?
        Specified by:
        canBeCropped in interface Thumbnail
        Returns:
        true if the Silverpeas can crop this image. False otherwise.
      • getURL

        public String getURL()
        Description copied from interface: Thumbnail
        Gets the URL of the thumbnail in Silverpeas in order to be rendered in the Web client.
        Specified by:
        getURL in interface Thumbnail
        Returns:
        the URL of this thumbnail.