Class CmsIconUtil

    • Method Detail

      • buildResourceIconCss

        public static java.lang.String buildResourceIconCss()
        Builds the CSS for all resource types.

        Returns:
        a string containing the CSS rules for all resource types
      • getDisplayType

        public static java.lang.String getDisplayType​(CmsObject cms,
                                                      CmsResource resource)
        Returns the resource type name used to display the resource icon. This may differ from the actual resource type in case of navigation level folders and model groups.

        Parameters:
        cms - the cms context
        resource - the resource
        Returns:
        the display type name
      • getExtensionIconMapping

        public static java.util.Map<java.lang.String,​java.lang.String> getExtensionIconMapping()
        Returns the extension icon mapping used when uploading files.

        Returns:
        the extension icon mapping
      • getIconClasses

        public static java.lang.String getIconClasses​(CmsExplorerTypeSettings typeSettings,
                                                      java.lang.String resourceName,
                                                      boolean small)
        Returns the resource type icon CSS classes for the given type.

        Use within ADE context only.

        Parameters:
        typeSettings - the explorer type settings
        resourceName - the resource name
        small - true to get the small icon classes
        Returns:
        the icon CSS classes
      • getIconClasses

        public static java.lang.String getIconClasses​(java.lang.String resourceType,
                                                      java.lang.String resourceName,
                                                      boolean small)
        Returns the resource type icon CSS classes for the given type.

        Use within ADE context only.

        Parameters:
        resourceType - the resource type name
        resourceName - the resource name
        small - true to get the small icon classes
        Returns:
        the icon CSS classes