public class CmsIconUtil extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SMALL_SUFFIX
The suffix for the CSS classes for small icons.
|
static java.lang.String |
TYPE_ICON_CLASS
The resource icon CSS class prefix.
|
static java.lang.String |
TYPE_RESOURCE_NOT_FOUND
Type for resource not found.
|
Modifier | Constructor and Description |
---|---|
protected |
CmsIconUtil()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
getFileTypeIconClass(java.lang.String resourceTypeName,
java.lang.String fileName,
boolean small)
Returns the CSS class for the given filename.
|
static java.lang.String |
getResourceIconClasses(java.lang.String resourceTypeName,
boolean small)
Returns the CSS classes of the resource icon for the given resource type name.
|
static java.lang.String |
getResourceIconClasses(java.lang.String resourceTypeName,
java.lang.String fileName,
boolean small)
Returns the CSS classes of the resource icon for the given resource type and filename.
|
static java.lang.String |
getResourceSubTypeIconClass(java.lang.String resourceTypeName,
java.lang.String suffix,
boolean small)
Returns the CSS class for a given resource type name and file name extension.
|
static java.lang.String |
getResourceTypeIconClass(java.lang.String resourceTypeName,
boolean small)
Returns the CSS class for the given resource type.
|
public static final java.lang.String SMALL_SUFFIX
public static final java.lang.String TYPE_ICON_CLASS
public static final java.lang.String TYPE_RESOURCE_NOT_FOUND
protected CmsIconUtil()
public static java.lang.String getResourceIconClasses(java.lang.String resourceTypeName, boolean small)
Use this function, if the resource type is known, but not the filename. If the filename is available use getResourceIconClasses(String, String, boolean)
resourceTypeName
- the resource type namesmall
- if true, get the icon classes for the small icon, else for the biggest one availablepublic static java.lang.String getResourceIconClasses(java.lang.String resourceTypeName, java.lang.String fileName, boolean small)
Use this the resource type and filename is known. Otherwise use getResourceIconClasses(String,boolean)
resourceTypeName
- the resource type namefileName
- the filenamesmall
- if true, get the icon classes for the small icon, else for the biggest one availablepublic static java.lang.String getResourceSubTypeIconClass(java.lang.String resourceTypeName, java.lang.String suffix, boolean small)
resourceTypeName
- the resource type namesuffix
- the file name extensionsmall
- if true, get the icon class for the small icon, else for the biggest one availablepublic static java.lang.String getResourceTypeIconClass(java.lang.String resourceTypeName, boolean small)
resourceTypeName
- the resource type namesmall
- if true, get the icon class for the small icon, else for the biggest one availableprotected static java.lang.String getFileTypeIconClass(java.lang.String resourceTypeName, java.lang.String fileName, boolean small)
resourceTypeName
- the resource type namefileName
- the filenamesmall
- if true, get the CSS class for the small icon, else for the biggest one available