|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContentUiSupport<T extends ConfluenceEntityObject>
Provides metadata about content objects that might be useful in the web tier: the location of icons, relevant CSS classes, links and so on. Some of the methods also work interchangeably on search results, as they are often used interchangeably in the UI.
Method Summary | |
---|---|
java.lang.String |
getContentCssClass(java.lang.String contentType,
java.lang.String contentPluginKey)
Get the CSS class that can be applied to add an icon to some inline element describing the given content. |
java.lang.String |
getContentCssClass(T content)
Get the CSS class that can be applied to some inline element describing the given content |
java.lang.String |
getContentTypeI18NKey(SearchResult result)
Get the I18N key for the content that is being referred to by this search result |
java.lang.String |
getContentTypeI18NKey(T content)
Get the I18N key for the name of the given content. |
java.lang.String |
getIconCssClass(SearchResult result)
Get the CSS class that can be applied to add an icon to some inline element describing the given result. |
java.lang.String |
getIconCssClass(T content)
Get the CSS class that can be applied to add an icon to some inline element describing the given content. |
java.lang.String |
getIconFilePath(T content,
int size)
Get the URL path to the icon for the gtiven piece of content, without prepending context or web static hashes. |
java.lang.String |
getIconPath(T content,
int size)
Get the URL path to the icon for the given piece of content. |
java.lang.String |
getLegacyIconPath(java.lang.String contentType,
int size)
Get the URL path to the icon for the given type of content. |
Method Detail |
---|
java.lang.String getIconFilePath(T content, int size)
DataSourceFactory
, which
does not handle context and web static hashes in the url.
content
- the content to find an icon forsize
- the size. Currently, only 16 is supported, and thus this parameter is ignored.
java.lang.String getIconPath(T content, int size)
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.
content
- the content to find an icon forsize
- the intended width/height at which the icon will be displayed in pixels
java.lang.String getLegacyIconPath(java.lang.String contentType, int size)
getIconPath(com.atlassian.confluence.core.ConfluenceEntityObject, int)
Icon size selection follows the same rule as its sister method.
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 pixels
java.lang.String getIconCssClass(T content)
content
- the content to find an icon for
java.lang.String getContentCssClass(T content)
content
- the content to find the css for
java.lang.String getContentCssClass(java.lang.String contentType, java.lang.String contentPluginKey)
contentType
- the content to find an icon forcontentPluginKey
- the plugin key for the content it it is a ContentType plugin
java.lang.String getIconCssClass(SearchResult result)
result
- the search result to find an icon for
java.lang.String getContentTypeI18NKey(T content)
content
- the content to get the name of
java.lang.String getContentTypeI18NKey(SearchResult result)
result
- the search result being displayed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |