|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object magoffin.matt.ma2.support.AbstractMediaHandler magoffin.matt.ma2.image.BaseImageMediaHandler magoffin.matt.ma2.image.SvgMediaHandler
public class SvgMediaHandler
SVG media handler using Apache Batik.
Field Summary |
---|
Fields inherited from class magoffin.matt.ma2.image.BaseImageMediaHandler |
---|
DEFAULT_ORIENTATION_180_VALUE, DEFAULT_ORIENTATION_90_CLOCKWISE_VALUE, DEFAULT_ORIENTATION_90_COUNTER_CLOCKWISE_VALUE, DEFAULT_ORIENTATION_METADATA_KEY, ROTATE_180, ROTATE_90_CCW, ROTATE_90_CW |
Fields inherited from class magoffin.matt.ma2.support.AbstractMediaHandler |
---|
log, METADATA_PARAMETER_KEY |
Constructor Summary | |
---|---|
SvgMediaHandler()
Constructor. |
Method Summary | |
---|---|
MediaItem |
createNewMediaItem(java.io.File inputFile)
Create a new instance of MediaItem from a File. |
java.lang.String |
getFileExtension(MediaItem item,
MediaRequest request)
Get the file extension. |
java.lang.String |
getRasterFileExtension()
|
java.lang.Class<org.apache.batik.transcoder.Transcoder> |
getTranscoderClass()
|
java.util.Map<java.lang.String,java.lang.Object> |
getTranscoderHints()
|
void |
handleMediaRequest(MediaItem item,
MediaRequest request,
MediaResponse response)
Handle a media request by processing the specified media item and writing the result to MediaResponse.getOutputStream() . |
void |
setRasterFileExtension(java.lang.String rasterFileExtension)
|
void |
setTranscoderClass(java.lang.Class<org.apache.batik.transcoder.Transcoder> transcoderClass)
|
void |
setTranscoderHints(java.util.Map<java.lang.String,java.lang.Object> transcoderHints)
|
Methods inherited from class magoffin.matt.ma2.image.BaseImageMediaHandler |
---|
getOrientation180Value, getOrientation90ClockwiseValue, getOrientation90CounterClockwiseValue, getOrientationMetadataKey, handleMetadata, needToRotate, setOrientation180Value, setOrientation90ClockwiseValue, setOrientation90CounterClockwiseValue, setOrientationMetadataKey |
Methods inherited from class magoffin.matt.ma2.support.AbstractMediaHandler |
---|
applyEffects, createMetadataList, defaultHandleRequestOriginal, getDomainObjectFactory, getEffect, getMediaBiz, getMediaMetadataInstance, getMime, getNoWatermarkSizes, getPreferredFileExtension, getRequestEffects, getSmetaPropertyMap, getUserBiz, needToAlter, setDomainObjectFactory, setMediaBiz, setMime, setNoWatermarkSizes, setPreferredFileExtension, setSmetaPropertyMap, setUserBiz |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SvgMediaHandler()
Method Detail |
---|
public MediaItem createNewMediaItem(java.io.File inputFile)
MediaHandler
This method will be called when a new media item is to be
added into Matte. This method should populate as much information
as it can extract from the file into a MediaItem
instance,
including populating any Metadata
it can extract from the file.
This method does not need to persist the MediaItem
instance,
just populate it and return it.
inputFile
- the file to create the media item from
public java.lang.String getFileExtension(MediaItem item, MediaRequest request)
AbstractMediaHandler
This method simply returns AbstractMediaHandler.getPreferredFileExtension()
.
Extending class may override this for request-specific handling.
getFileExtension
in interface MediaHandler
getFileExtension
in class AbstractMediaHandler
item
- the media item to processrequest
- the request
public void handleMediaRequest(MediaItem item, MediaRequest request, MediaResponse response)
MediaHandler
MediaResponse.getOutputStream()
.
item
- the media item to processrequest
- the requestresponse
- the responsepublic java.lang.String getRasterFileExtension()
public void setRasterFileExtension(java.lang.String rasterFileExtension)
rasterFileExtension
- the rasterFileExtension to setpublic java.lang.Class<org.apache.batik.transcoder.Transcoder> getTranscoderClass()
public void setTranscoderClass(java.lang.Class<org.apache.batik.transcoder.Transcoder> transcoderClass)
transcoderClass
- the transcoderClass to setpublic java.util.Map<java.lang.String,java.lang.Object> getTranscoderHints()
public void setTranscoderHints(java.util.Map<java.lang.String,java.lang.Object> transcoderHints)
transcoderHints
- the transcoderHints to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |