|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object magoffin.matt.ma2.support.BasicMediaRequest
public class BasicMediaRequest
Basic implementation of MediaRequest.
Field Summary |
---|
Fields inherited from interface magoffin.matt.ma2.MediaRequest |
---|
OUTPUT_FILE_KEY, USER_AGENT_KEY |
Constructor Summary | |
---|---|
BasicMediaRequest()
Default constructor. |
|
BasicMediaRequest(java.lang.Long id)
Construct with some parameters. |
|
BasicMediaRequest(java.lang.Long id,
MediaSize size,
MediaQuality quality)
Construct with some parameters. |
|
BasicMediaRequest(MediaRequest request)
Copy constructor. |
Method Summary | |
---|---|
java.lang.String |
getCacheKey()
Generates a cache key based on the item's ID, size, and quality. |
java.util.List<MediaEffect> |
getEffects()
Get a List of effects to apply to the request. |
java.lang.Long |
getMediaItemId()
Get the ID of the media item desired. |
java.util.Map<java.lang.String,java.lang.Object> |
getParameters()
Get a Map of optional additional parameters. |
MediaQuality |
getQuality()
Get the desired quality constant. |
MediaSize |
getSize()
Get the desired size constant. |
boolean |
isOriginal()
Return true if the original media item file is desired. |
void |
setEffects(java.util.List<MediaEffect> effects)
|
void |
setMediaItemId(java.lang.Long mediaItemId)
|
void |
setOriginal(boolean original)
|
void |
setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
|
void |
setQuality(MediaQuality quality)
|
void |
setSize(MediaSize size)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicMediaRequest()
public BasicMediaRequest(MediaRequest request)
request
- the request to copypublic BasicMediaRequest(java.lang.Long id)
id
- the media item IDpublic BasicMediaRequest(java.lang.Long id, MediaSize size, MediaQuality quality)
id
- the media item IDsize
- the sizequality
- the qualityMethod Detail |
---|
public java.lang.Long getMediaItemId()
MediaRequest
getMediaItemId
in interface MediaRequest
public boolean isOriginal()
MediaRequest
isOriginal
in interface MediaRequest
public MediaSize getSize()
MediaRequest
getSize
in interface MediaRequest
public MediaQuality getQuality()
MediaRequest
getQuality
in interface MediaRequest
public java.util.Map<java.lang.String,java.lang.Object> getParameters()
MediaRequest
During request handling, MediaHandler
implementations are
allowed to add parameters to this map.
getParameters
in interface MediaRequest
public java.lang.String getCacheKey()
getCacheKey
in interface MediaRequest
public void setMediaItemId(java.lang.Long mediaItemId)
mediaItemId
- The mediaItemId to set.public void setOriginal(boolean original)
original
- The original to set.public void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
parameters
- The parameters to set.public void setQuality(MediaQuality quality)
quality
- The quality to set.public void setSize(MediaSize size)
size
- The size to set.public java.util.List<MediaEffect> getEffects()
MediaRequest
The effects should be applied in the order of the list. The
MediaHandler
servicing the request should be allowed to
make changes to this List as it sees fit.
getEffects
in interface MediaRequest
public void setEffects(java.util.List<MediaEffect> effects)
effects
- The effects to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |