Class IconManager

    • Method Detail

      • getInstance

        public static IconManager getInstance()
      • propertiesChange

        public void propertiesChange​(JProperties properties)
        Description copied from interface: JPropertiesListener
        Invoked after properties have been modified in JCMS and save on disk.

        You cannot alter the value received in parameters.

        Note that properties parameter may be null, a limited set of site properties, or all site properties.

        To check that a property has been modified, reload the "current" property instead using channel.getProperties or channel.getProperty.

        Specified by:
        propertiesChange in interface JPropertiesListener
        Parameters:
        properties - the properties which have been submitted to change
      • getPubImg

        public java.lang.String getPubImg​(Publication pub)
        Returns the image of the icon of the given publication
        Parameters:
        pub - the publication
        Returns:
        the relative path of the icon or null if no icon
        Since:
        jcms-5.0.1
      • getPubIcon

        public java.lang.String getPubIcon​(Publication pub)
        Returns the HTML code for the icon of the given publication
        Parameters:
        pub - the publication
        Returns:
        the html code of the image or null if no icon
        Since:
        jcms-5.0.1
      • getClassIcon

        public java.lang.String getClassIcon​(java.lang.Class<?> clazz)
        Gets the icon source from a Class object.
        Parameters:
        clazz - Class
        Returns:
        String representing the icon source
        Since:
        jcms-8.0.0
      • getHtmlIcon

        public java.lang.String getHtmlIcon​(java.lang.Class<?> clazz)
        Build an icon from a Class object.
        Parameters:
        clazz - Class
        Returns:
        the image tag representation
        Since:
        jcms-8.0.0
      • getHtmlIcon

        public java.lang.String getHtmlIcon​(java.lang.String src)
        Build an icon
        Parameters:
        src - the image source
        Returns:
        the image tag representation
        Since:
        jcms-9.0.0
      • getHtmlIcon

        public java.lang.String getHtmlIcon​(java.lang.String src,
                                            java.lang.String alt)
        Build an icon
        Parameters:
        src - the image source
        alt - the image alt
        Returns:
        the image tag representation
        Since:
        jcms-9.0.0
      • getHtmlIcon

        public java.lang.String getHtmlIcon​(java.lang.String src,
                                            java.lang.String alt,
                                            java.lang.String title,
                                            java.lang.String css)
        Build an icon
        Parameters:
        src - the image source
        alt - the image alt
        title - the image title
        css - the css for class="" attribute.
        Returns:
        the image tag representation
        Since:
        jcms-9.0.0
      • getHtmlIcon

        public java.lang.String getHtmlIcon​(java.lang.String src,
                                            java.lang.String alt,
                                            java.lang.String title,
                                            java.lang.String css,
                                            java.lang.String htmlAttributes)
        Build an icon
        Parameters:
        src - the image source
        alt - the image alt
        title - the image title
        css - the css for class="" attribute.
        htmlAttributes - the html attributes
        Returns:
        the image tag representation
        Since:
        jcms-9.0.0
      • getHtmlIcon

        public java.lang.String getHtmlIcon​(java.lang.String src,
                                            java.lang.String alt,
                                            java.lang.String title,
                                            java.lang.String customCSS,
                                            java.lang.String htmlAttributes,
                                            java.lang.String lang)
        Build an icon
        Parameters:
        src - the image source
        alt - the image alt
        title - the image title
        customCSS - the css for class="" attribute.
        htmlAttributes - the html attributes
        lang - the user language
        Returns:
        the image tag representation
        Since:
        jcms-9.0.0