|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.content.ui.AttachmentUiSupport
public class AttachmentUiSupport
Nested Class Summary | |
---|---|
static class |
AttachmentUiSupport.AttachmentInfo
Deprecated. Since 4.3. This class is only public because it is used by ContentTypesDisplayMapper. Avoid using this class directly and use a ContentUiSupport object instead. This class will be made private when ContentTypesDisplayMapper is removed. |
Constructor Summary | |
---|---|
AttachmentUiSupport(com.atlassian.plugin.webresource.WebResourceUrlProvider webResourceUrlProvider)
|
Method Summary | |
---|---|
static AttachmentUiSupport.AttachmentInfo |
getAttachmentInfo(String mimeType,
String fileExtension)
Deprecated. Since 4.3 This method is only public because it is used by ContentTypesDisplayMapper. Avoid using this method directly and use a ContentUiSupport object instead. This method will be made private when ContentTypesDisplayMapper is removed.
TODO Undeprecate and make this private when ContentTypesDisplayMapper is removed. |
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(Attachment 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(Attachment 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 |
getIconPath(Attachment 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttachmentUiSupport(com.atlassian.plugin.webresource.WebResourceUrlProvider webResourceUrlProvider)
Method Detail |
---|
public String getIconPath(Attachment 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<Attachment>
content
- the content to find an icon forsize
- the intended width/height at which the icon will be displayed in pixels
public String getLegacyIconPath(String contentType, int size)
ContentUiSupport
ContentUiSupport.getIconPath(com.atlassian.confluence.core.ConfluenceEntityObject, int)
Icon size selection follows the same rule as its sister method.
getLegacyIconPath
in interface ContentUiSupport<Attachment>
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
public String getIconCssClass(Attachment content)
ContentUiSupport
getIconCssClass
in interface ContentUiSupport<Attachment>
content
- the content to find an icon for
public String getContentCssClass(String contentType, String contentPluginKey)
ContentUiSupport
getContentCssClass
in interface ContentUiSupport<Attachment>
contentType
- the content to find an icon forcontentPluginKey
- the plugin key for the content it it is a ContentType plugin
public String getIconCssClass(SearchResult result)
ContentUiSupport
getIconCssClass
in interface ContentUiSupport<Attachment>
result
- the search result to find an icon for
public String getContentTypeI18NKey(Attachment content)
ContentUiSupport
getContentTypeI18NKey
in interface ContentUiSupport<Attachment>
content
- the content to get the name of
public String getContentTypeI18NKey(SearchResult result)
ContentUiSupport
getContentTypeI18NKey
in interface ContentUiSupport<Attachment>
result
- the search result being displayed
@Deprecated public static AttachmentUiSupport.AttachmentInfo getAttachmentInfo(String mimeType, String fileExtension)
ContentTypesDisplayMapper
is removed.
TODO Undeprecate and make this private when ContentTypesDisplayMapper is removed.
AttachmentUiSupport.AttachmentInfo.UNKNOWN
. Never returns null.
mimeType
- The mime type of the attachmentfileExtension
- The filename of the attachment
AttachmentUiSupport.AttachmentInfo.UNKNOWN
if none were found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |