Class BambooContentTypeResolver
java.lang.Object
com.atlassian.bamboo.plugin.servlet.BambooContentTypeResolver
- All Implemented Interfaces:
com.atlassian.plugin.servlet.ContentTypeResolver
,org.springframework.beans.factory.Aware
,org.springframework.web.context.ServletContextAware
public class BambooContentTypeResolver
extends Object
implements com.atlassian.plugin.servlet.ContentTypeResolver, org.springframework.web.context.ServletContextAware
Utility class to resolve content type of resources/files (aka mimetype)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull String
getContentType
(String requestUrl) Uses the filename extension type to work out the mime type.getContentTypeForFileExtension
(@NotNull String extension) void
init()
void
setServletContext
(@NotNull javax.servlet.ServletContext servletContext)
-
Field Details
-
MIME_TYPE_CONFIGURATION_FILE
- See Also:
-
DEFAULT_MIME_TYPE
- See Also:
-
-
Constructor Details
-
BambooContentTypeResolver
public BambooContentTypeResolver()
-
-
Method Details
-
init
public void init() -
getContentType
Uses the filename extension type to work out the mime type. An unknown extension is classed as "application/octet-stream"- Specified by:
getContentType
in interfacecom.atlassian.plugin.servlet.ContentTypeResolver
- Parameters:
requestUrl
- to check the mime type of.- Returns:
- The mime type
-
getContentTypeForFileExtension
-
setServletContext
public void setServletContext(@NotNull @NotNull javax.servlet.ServletContext servletContext) - Specified by:
setServletContext
in interfaceorg.springframework.web.context.ServletContextAware
-
getMimeTypes
-