| java.lang.Object org.jasig.portal.MediaManager
MediaManager | public class MediaManager (Code) | | A tool for managing various media properties.
Given a request object, MediaManager determines
a client browser type (media). MediaManager also
provides information on the mime type that generated
response should carry.
author: Peter Kharchenko version: $Revision: 36781 $ |
Inner Class :class OrderedProps | |
NULL_USER_AGENT | final public static String NULL_USER_AGENT(Code) | | A user agent string to use when the user-agent header value itself is null.
|
mediaProps | protected OrderedProps mediaProps(Code) | | |
mimeProps | protected OrderedProps mimeProps(Code) | | |
serializerProps | protected OrderedProps serializerProps(Code) | | |
getDefaultMedia | public String getDefaultMedia()(Code) | | Return a default media type.
The default media type is the first
media listed in the media.properties file
default media name |
getMedia | public String getMedia(HttpServletRequest req)(Code) | | Determines a media name from the request object.
Parameters: req - the request object media name |
getMedia | public String getMedia(BrowserInfo bi)(Code) | | Determines a media name from the browser info object.
Parameters: bi - the browser info media name |
getMediaManager | public static MediaManager getMediaManager()(Code) | | 7/25/05 - UP-1181 - change MediaManager into a singleton
Returns the default MediaManager singleton
|
getReturnMimeType | public String getReturnMimeType(HttpServletRequest req)(Code) | | Determines a mime name from the request object.
Parameters: req - the request object mime type string |
getReturnMimeType | public String getReturnMimeType(String mediaType)(Code) | | Determines a mime name from a media type name.
Parameters: mediaType - the media type name mime type string |
getSerializer | public BaseMarkupSerializer getSerializer(String mediaType, java.io.Writer out)(Code) | | Determines and configures a serialzier that is proper
for the specified media type.
"serializer.properties" file contains mapping of media
names to serializer names.
Prior to using a serializer returned by this function,
make sure to set it up by calling asContentHandler(),
asDocumentHandler() or asDOMSerializer().
Parameters: mediaType - media name Parameters: out - output writer the serializer |
getSerializerByName | public BaseMarkupSerializer getSerializerByName(String serializerName, java.io.Writer out)(Code) | | Gets a serializer by name which writes to the provided Writer
Parameters: serializerName - Parameters: out - the serializer |
setMediaProps | public void setMediaProps(String uri)(Code) | | Initializes media properties table.
Parameters: uri - location of the media properties file, complete with the filename |
setMimeProps | public void setMimeProps(String uri)(Code) | | Initializes mime properties table.
Parameters: uri - location of the mime properties file, complete with the filename |
setSerializerProps | public void setSerializerProps(String uri)(Code) | | Initializes serializer properties table.
Parameters: uri - location of the serializer properties file, complete with the filename |
|
|