org.sakaiproject.service.legacy.content
Interface ContentTypeImageService

All Known Implementing Classes:
BasicContentTypeImageService

public interface ContentTypeImageService

ContentTypeImageService is the Interface for looking up proper image based on the content type. It also associates a display name and a set of file extensions to known types.

Version:
$Revision: 2970 $
Author:
University of Michigan, CHEF Software Development Team

Field Summary
static String SERVICE_NAME
          This string can be used to find the service in the service manager.
 
Method Summary
 String getContentType(String extension)
          Get the content type string that is used for this file extension.
 String getContentTypeDisplayName(String contentType)
          Get the display name of the content type.
 String getContentTypeExtension(String contentType)
          Get the file extension value of the content type.
 String getContentTypeImage(String contentType)
          Get the image file name based on the content type.
 List getMimeCategories()
          Access an ordered list of all mimetype categories.
 List getMimeSubtypes(String category)
          Access an ordered list of all mimetype subtypes for a particular category.
 boolean isUnknownType(String contentType)
          Is the type one of the known types used when the file type is unknown?
 

Field Detail

SERVICE_NAME

public static final String SERVICE_NAME
This string can be used to find the service in the service manager.

Method Detail

getContentTypeImage

public String getContentTypeImage(String contentType)
Get the image file name based on the content type.

Parameters:
contentType - The content type string.
Returns:
The image file name based on the content type.

getContentTypeDisplayName

public String getContentTypeDisplayName(String contentType)
Get the display name of the content type.

Parameters:
contentType - The content type string.
Returns:
The display name of the content type.

getContentTypeExtension

public String getContentTypeExtension(String contentType)
Get the file extension value of the content type.

Parameters:
contentType - The content type string.
Returns:
The file extension value of the content type.

getContentType

public String getContentType(String extension)
Get the content type string that is used for this file extension.

Parameters:
extension - The file extension (to the right of the dot, not including the dot).
Returns:
The content type string that is used for this file extension.

isUnknownType

public boolean isUnknownType(String contentType)
Is the type one of the known types used when the file type is unknown?

Parameters:
contentType - The content type string to test.
Returns:
true if the type is a type used for unknown file types, false if not.

getMimeCategories

public List getMimeCategories()
Access an ordered list of all mimetype categories.

Returns:
The list of mimetype categories in alphabetic order.

getMimeSubtypes

public List getMimeSubtypes(String category)
Access an ordered list of all mimetype subtypes for a particular category.

Parameters:
category - The category.
Returns:
The list of mimetype subtypes in alphabetic order.