|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.MediaManager
public class MediaManager
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.
| Field Summary | |
|---|---|
static String |
HTMLPublicId
|
static String |
HTMLSystemId
|
protected org.jasig.portal.MediaManager.OrderedProps |
mediaProps
|
protected org.jasig.portal.MediaManager.OrderedProps |
mimeProps
|
static String |
NULL_USER_AGENT
A user agent string to use when the user-agent header value itself is null. |
protected org.jasig.portal.MediaManager.OrderedProps |
serializerProps
|
static String |
UNKNOWN
|
static String |
WMLPublicId
|
static String |
WMLSystemId
|
static String |
XHTMLPublicId
|
static String |
XHTMLSystemId
|
| Method Summary | |
|---|---|
String |
getDefaultMedia()
Return a default media type. |
String |
getMedia(BrowserInfo bi)
Determines a media name from the browser info object. |
String |
getMedia(HttpServletRequest req)
Determines a media name from the request object. |
static MediaManager |
getMediaManager()
7/25/05 - UP-1181 - change MediaManager into a singleton Returns the default MediaManager singleton |
static MediaManager |
getMediaManager(boolean omitDocType)
|
String |
getReturnMimeType(HttpServletRequest req)
Determines a mime name from the request object. |
String |
getReturnMimeType(String mediaType)
Determines a mime name from a media type name. |
BaseMarkupSerializer |
getSerializer(HttpServletRequest req,
OutputStream out)
Automatically determines the media type from the request object, |
BaseMarkupSerializer |
getSerializer(HttpServletRequest req,
Writer out)
Automatically determines the media type from the request object, |
BaseMarkupSerializer |
getSerializer(String mediaType,
OutputStream out)
Another version of getSerializer() with OutputStream as one of the parameters. |
BaseMarkupSerializer |
getSerializer(String mediaType,
Writer out)
Determines and configures a serialzier that is proper for the specified media type. |
BaseMarkupSerializer |
getSerializerByName(String serializerName,
OutputStream out)
Gets a serializer by name which writes to the provided OutputStream |
BaseMarkupSerializer |
getSerializerByName(String serializerName,
Writer out)
Gets a serializer by name which writes to the provided Writer |
void |
setMediaProps(String uri)
Initializes media properties table. |
void |
setMimeProps(String uri)
Initializes mime properties table. |
void |
setSerializerProps(String uri)
Initializes serializer properties table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.jasig.portal.MediaManager.OrderedProps mediaProps
protected org.jasig.portal.MediaManager.OrderedProps mimeProps
protected org.jasig.portal.MediaManager.OrderedProps serializerProps
public static final String NULL_USER_AGENT
public static final String UNKNOWN
public static String HTMLPublicId
public static String HTMLSystemId
public static String XHTMLPublicId
public static String XHTMLSystemId
public static String WMLPublicId
public static String WMLSystemId
| Method Detail |
|---|
public static MediaManager getMediaManager()
public static MediaManager getMediaManager(boolean omitDocType)
public void setMediaProps(String uri)
uri - location of the media properties file, complete with the filenamepublic void setMimeProps(String uri)
uri - location of the mime properties file, complete with the filenamepublic void setSerializerProps(String uri)
uri - location of the serializer properties file, complete with the filenamepublic String getMedia(HttpServletRequest req)
req - the request object
public String getMedia(BrowserInfo bi)
bi - the browser info
public String getDefaultMedia()
public String getReturnMimeType(HttpServletRequest req)
req - the request object
public String getReturnMimeType(String mediaType)
mediaType - the media type name
public BaseMarkupSerializer getSerializer(String mediaType,
Writer out)
mediaType - media nameout - output writer
public BaseMarkupSerializer getSerializerByName(String serializerName,
OutputStream out)
throws UnsupportedEncodingException
serializerName - out -
UnsupportedEncodingException
public BaseMarkupSerializer getSerializerByName(String serializerName,
Writer out)
serializerName - out -
public BaseMarkupSerializer getSerializer(String mediaType,
OutputStream out)
throws UnsupportedEncodingException
mediaType - media type stringout - output stream
UnsupportedEncodingException
public BaseMarkupSerializer getSerializer(HttpServletRequest req,
Writer out)
req - the request objectout - the output writer object
public BaseMarkupSerializer getSerializer(HttpServletRequest req,
OutputStream out)
throws UnsupportedEncodingException
req - the request objectout - the output stream object
UnsupportedEncodingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||