Interface ImageElement

    • Method Detail

      • getCode

        String getCode()
        Returns the internal link code needed to place an internal link tag around the image.
        Returns:
        the internal link code needed to place an internal link tag around the image.
      • setCode

        void setCode​(String code)
        Sets the internal link code needed to place an internal link tag around the image.
        Parameters:
        code - the internal link code needed to place an internal link tag around the image.
      • getSubText

        String getSubText()
        Returns the subtext of the image.
        Returns:
        the subtext of the image.
      • hasCaption

        boolean hasCaption()
        Returns if the alternative text needs to be used as caption. If hasCaption is true, the method getSubText() returns the alternative text, if hasCaption is false, the method getSubText() returns an empty string.
        Returns:
        true if the alternative text needs to be used as caption
      • setCaption

        void setCaption​(boolean isCaption)
        Sets if the alternative text needs to be used as caption.
        Parameters:
        isCaption -
      • getImageFile

        Image getImageFile()
        Returns the representation of the actual image.
        Returns:
        the representation of the actual image.
      • getImage

        @ReferDocument
        Image getImage()
        Returns the representation of the actual image.
        Returns:
        the representation of the actual image.
      • setImageFile

        void setImageFile​(FileResource image)
        Sets the representation of the actual image.
        Parameters:
        image - the representation of the actual image.
      • setImageFile

        void setImageFile​(org.springframework.web.multipart.MultipartFile imageMultiPartFile)
        Sets the representation of the actual image.
        Parameters:
        imageMultiPartFile - the representation of the actual image.
      • setImageFile

        void setImageFile​(File file,
                          String originalFileName,
                          String mimeType)
        Sets the representation of the actual image.
        Parameters:
        file - the representation of the actual image
        originalFileName - the original name of the image
        mimeType - the mimeType of the image
      • getAlternativeText

        @ReferField(stored=false,
                    body=true)
        String getAlternativeText()
        Returns the alt text for the image.
        Returns:
        the alt text for the image.
      • setAlternativeText

        void setAlternativeText​(String alternativeText)
        Sets the alt text for the image.
        Parameters:
        alternativeText - the alt text for the image.
      • getAlignment

        ImageElement.Alignment getAlignment()
        Gets the alignment for the image.
        Returns:
        the alignment for the image.
      • setAlignment

        void setAlignment​(ImageElement.Alignment alternativeText)
        Sets the alignment for the image.
        Parameters:
        alternativeText - the alignment for the image.
      • getMediaItem

        @ReferField(stored=false,
                    indexed=true,
                    adapter=ContentReferenceFieldAdapter.class)
        MediaItem getMediaItem()
        Returns the media item representation of the actual image. Returns null if the assigned image is not selected from the Object Manager.
        Returns:
        The media item representation of the assigned image, or null if not originating from the Object Manager.
      • setMediaItem

        void setMediaItem​(MediaItem mediaItem)
        Sets the image media item representation of the actual image.
        Parameters:
        mediaItem - the media item representation of the assigned image from the Object Manager. When the media item is null, the assignment of the image is removed.