Class LightboxUtils


  • public final class LightboxUtils
    extends java.lang.Object
    • Method Detail

      • getImageDataAttribute

        public static DataAttribute getImageDataAttribute​(FileDocument doc,
                                                          java.lang.String userLang,
                                                          java.util.Locale locale,
                                                          Member mbr,
                                                          boolean generateThumbnail)
        Returns a DataAttribute containing all required parameters for javascript for lightbox / image editor
        Parameters:
        doc - the FileDocument
        userLang - the user language
        locale - the Locale
        mbr - the Member to check rights
        generateThumbnail - to generate a thumbnail for lightbox (By default, raw image will be used)
        Returns:
        DataAttribute for lightbox and image editor front end libraries
        Since:
        jcms-10.0.6 / JCMS-8841
      • getGlobalContentType

        public static java.lang.String getGlobalContentType​(FileDocument doc)
        Parameters:
        doc - the FileDocument
        Returns:
        the global content type (For image/jpg, it will return image/*)
        Since:
        jcms-10.0.8
      • getLightboxActionLabel

        public static java.lang.String getLightboxActionLabel​(java.lang.String userLang,
                                                              java.lang.String propPrefix,
                                                              FileDocument document)