|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.util.actions.ContentTypesDisplayMapper
public class ContentTypesDisplayMapper
Map Confluence content types to display information such as a CSS type or an Icon URL. When possible, use ContentUiSupport instead. This returns CSS classes of the form "content-type-page" etc. which are not sprite based, where ContentUiSupport would return icon-page, which are sprite based and are the preferred CSS styling of icons in Confluence.
Field Summary | |
---|---|
static String |
CSS_CLASS_PREFIX
|
static String |
DEFAULT_ATTACHMENT_CLASS_NAME
|
static String |
DEFAULT_CLASS_NAME
|
Constructor Summary | |
---|---|
ContentTypesDisplayMapper()
Deprecated. since 4.2 - get the mapper from the spring context because it needs wiring |
|
ContentTypesDisplayMapper(UserAccessor userAccessor,
ContentUiSupport contentUiSupport)
|
Method Summary | |
---|---|
String |
getClassName(SearchResult result)
Get the CSS class name for the supplied SearchResult. |
String |
getClassName(SearchResult result)
Get the CSS class name for the supplied SearchResult. |
static String |
getIconForAttachment(String contentType,
String fileName)
Decide the icon for an attachment based firstly on it's contentType. |
String |
getIconUrlForUsername(String username)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CSS_CLASS_PREFIX
public static final String DEFAULT_CLASS_NAME
public static final String DEFAULT_ATTACHMENT_CLASS_NAME
Constructor Detail |
---|
@Deprecated public ContentTypesDisplayMapper()
public ContentTypesDisplayMapper(UserAccessor userAccessor, ContentUiSupport contentUiSupport)
Method Detail |
---|
public String getClassName(SearchResult result)
result
- the SearchResult that a CSS class is required for.
SearchResult
.public String getClassName(SearchResult result)
result
- the SearchResult that a CSS class is required for.
SearchResult
.public static String getIconForAttachment(String contentType, String fileName)
contentType
- fileName
-
public String getIconUrlForUsername(String username)
username
- the username to find an icon for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |