public class DefaultContentUiSupport extends Object implements ContentUiSupport<ContentEntityObject>
| Constructor and Description |
|---|
DefaultContentUiSupport(com.atlassian.plugin.webresource.WebResourceUrlProvider webResourceUrlProvider,
ContentTypeManager contentTypeManager) |
| Modifier and Type | Method and Description |
|---|---|
String |
getContentCssClass(ContentEntityObject content)
Get the CSS class that can be applied to some inline element describing the given content
|
String |
getContentCssClass(String contentType,
String contentPluginKey)
Get the CSS class that can be applied to add an icon to some inline element describing the given content.
|
String |
getContentTypeI18NKey(ContentEntityObject content)
Get the I18N key for the name of the given content.
|
String |
getContentTypeI18NKey(SearchResult result)
Get the I18N key for the content that is being referred to by this search result
|
String |
getIconCssClass(ContentEntityObject content)
Get the CSS class that can be applied to add an icon to some inline element describing the given content.
|
String |
getIconCssClass(SearchResult result)
Get the CSS class that can be applied to add an icon to some inline element describing the given result.
|
String |
getIconFilePath(ContentEntityObject content,
int size)
Get the URL path to the icon for the gtiven piece of content, without prepending context or web static hashes.
|
String |
getIconPath(ContentEntityObject content,
int size)
Get the URL path to the icon for the given piece of content.
|
String |
getLegacyIconPath(String contentType,
int size)
Get the URL path to the icon for the given type of content.
|
public DefaultContentUiSupport(com.atlassian.plugin.webresource.WebResourceUrlProvider webResourceUrlProvider,
ContentTypeManager contentTypeManager)
public String getIconFilePath(ContentEntityObject content, int size)
ContentUiSupportDataSourceFactory, which
does not handle context and web static hashes in the url.getIconFilePath in interface ContentUiSupport<ContentEntityObject>content - the content to find an icon forsize - the size. Currently, only 16 is supported, and thus this parameter is ignored.public String getIconPath(ContentEntityObject content, int size)
ContentUiSupport
All icons are square. If no icon is available at the requested size, the implementation should use the following priority to determine what to return:
In general you can only assume a 16x16 icon will be available, but this may change in the future.
getIconPath in interface ContentUiSupport<ContentEntityObject>content - the content to find an icon forsize - the intended width/height at which the icon will be displayed in pixelspublic String getLegacyIconPath(String contentType, int size)
ContentUiSupportContentUiSupport.getIconPath(com.atlassian.confluence.core.ConfluenceEntityObject, int)
Icon size selection follows the same rule as its sister method.
getLegacyIconPath in interface ContentUiSupport<ContentEntityObject>contentType - the type of content to find an icon for as would be returned from
ContentEntityObject.getType()size - the intended width/height at which the icon will be displayed in pixelspublic String getIconCssClass(ContentEntityObject content)
ContentUiSupportgetIconCssClass in interface ContentUiSupport<ContentEntityObject>content - the content to find an icon forpublic String getContentCssClass(String contentType, String contentPluginKey)
ContentUiSupportgetContentCssClass in interface ContentUiSupport<ContentEntityObject>contentType - the content to find an icon forcontentPluginKey - the plugin key for the content it it is a ContentType pluginpublic String getContentCssClass(ContentEntityObject content)
ContentUiSupportgetContentCssClass in interface ContentUiSupport<ContentEntityObject>content - the content to find the css forpublic String getIconCssClass(SearchResult result)
ContentUiSupportgetIconCssClass in interface ContentUiSupport<ContentEntityObject>result - the search result to find an icon forpublic String getContentTypeI18NKey(SearchResult result)
ContentUiSupportgetContentTypeI18NKey in interface ContentUiSupport<ContentEntityObject>result - the search result being displayedpublic String getContentTypeI18NKey(ContentEntityObject content)
ContentUiSupportgetContentTypeI18NKey in interface ContentUiSupport<ContentEntityObject>content - the content to get the name ofCopyright © 2003–2022 Atlassian. All rights reserved.