Interface MediaItemImageVersion

    • Method Detail

      • getAlternativeText

        @Field(body=true)
        String getAlternativeText()
        Get the alternative text of this image media item version.
        Returns:
        alternative text
      • setAlternativeText

        void setAlternativeText​(String text)
        Set the alternative text of this image media item version.
        Parameters:
        text - The text to set
      • getSizeModel

        ImageSizeModel getSizeModel()
        Get the size model associated with this media item image.
        Returns:
        the size model, or null
      • setSizeModel

        void setSizeModel​(ImageSizeModel sizeModel)
        Set the size model associated with this media item image.
        Parameters:
        sizeModelId - an identifier of an existing sizeModel, or <=0 to un-assign the current model.
      • getImage

        @Document
        Image getImage()
        Return the image.
        Returns:
        the image.
      • getThumbNailImage

        @Document
        Image getThumbNailImage()
        Return the thumbnail image.
        Returns:
        the thumbnail image.
      • getResizedImage

        @Deprecated
        Image getResizedImage​(int sizeId)
        Deprecated.
        use image.getSizedImage(width,height) Return the image for a particular size.
        Returns:
        the image for a particular size.
      • getResizedImage

        @Deprecated
        Image getResizedImage​(int width,
                              int height)
        Deprecated.
        use image.getSizedImage(width,height) Return the image for a width and height.
        Returns:
        the image for a width and height.
      • isEditableAlternativeText

        boolean isEditableAlternativeText()
        Returns a boolean indicating whether the alternative text may be edited at the element the image media item is assigned to .
        Returns:
        a boolean.
      • setEditableAlternativeText

        void setEditableAlternativeText​(boolean editableText)
        Set boolean indicating whether the alternative text may be edited at the element the image media
        Parameters:
        editableText - boolean if the text can be editted
      • attachFile

        boolean attachFile​(org.springframework.web.multipart.MultipartFile multipartFile)
        Attaches a image to this image media item version
        Parameters:
        multipartFile - The file to attach
        Returns:
        true if attaching the file succeeded, false otherwise
      • attachFile

        default boolean attachFile​(File file,
                                   String originalFileName,
                                   String mimeType)
        Attaches a file to this image media item version.
        Parameters:
        file - the actual file to attach
        originalFileName - the original file name to attach
        mimeType - the mimeType of the file to attach
        Returns:
        true if attaching the file succeeded, false otherwise
      • detachFile

        boolean detachFile()
        Detaches a file from this image media item version
        Returns:
        true if attaching the file succeeded, false otherwise
      • getImagePrefix

        default String getImagePrefix()
        Returns the prefix added by XC to the filename
        Returns:
        The xc prefix used for the image filename