Class IconManager

java.lang.Object
com.jalios.jcms.ui.IconManager
All Implemented Interfaces:
JcmsConstants, JaliosConstants, JPropertiesListener

public class IconManager extends Object implements JcmsConstants, JPropertiesListener
  • Method Details

    • 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 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 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 String getClassIcon(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 String getHtmlIcon(Class<?> clazz)
      Build an icon from a Class object.
      Parameters:
      clazz - Class
      Returns:
      the image tag representation
      Since:
      jcms-8.0.0
    • getHtmlIcon

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

      public String getHtmlIcon(String src, 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 String getHtmlIcon(String src, String alt, String title, 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 String getHtmlIcon(String src, String alt, String title, String css, 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 String getHtmlIcon(String src, String alt, String title, String customCSS, String htmlAttributes, 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