public class SkinResourceReader extends ServiceableReader implements CacheableProcessingComponent
Modifier and Type | Field and Description |
---|---|
private int |
_height |
private int |
_maxHeight |
private int |
_maxWidth |
private SkinModelsManager |
_modelsManager |
private SkinEditionHelper |
_skinHelper |
private FileSource |
_source |
private int |
_width |
manager
objectModel, out, parameters, resolver, source
Constructor and Description |
---|
SkinResourceReader() |
Modifier and Type | Method and Description |
---|---|
protected String |
_decodePath(String path)
Decode the resource path
|
private void |
_generateThumbnail(OutputStream os,
String format,
BufferedImage src,
byte[] fileContent,
int maxHeight,
int maxWidth) |
private void |
_generateZoomAndCropImage(OutputStream os,
String format,
BufferedImage src,
byte[] fileContent,
int minHeight,
int minWidth) |
private BufferedImage |
_getCropImage(BufferedImage src,
int x,
int y,
int width,
int height) |
void |
generate() |
Serializable |
getKey() |
long |
getLastModified() |
String |
getMimeType() |
SourceValidity |
getValidity() |
void |
recycle() |
void |
service(ServiceManager sManager) |
void |
setup(SourceResolver sResolver,
Map objModel,
String src,
Parameters par) |
setOutputStream, shouldSetContentLength
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private SkinModelsManager _modelsManager
private SkinEditionHelper _skinHelper
private FileSource _source
private int _width
private int _height
private int _maxWidth
private int _maxHeight
public SkinResourceReader()
public void service(ServiceManager sManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableReader
ServiceException
public void setup(SourceResolver sResolver, Map objModel, String src, Parameters par) throws ProcessingException, SAXException, IOException
setup
in interface SitemapModelComponent
setup
in class AbstractReader
ProcessingException
SAXException
IOException
protected String _decodePath(String path) throws UnsupportedEncodingException
path
- the resource pathUnsupportedEncodingException
- if UTF-8 encoding is not supportedpublic Serializable getKey()
getKey
in interface CacheableProcessingComponent
public SourceValidity getValidity()
getValidity
in interface CacheableProcessingComponent
public long getLastModified()
getLastModified
in interface Reader
getLastModified
in class AbstractReader
public String getMimeType()
getMimeType
in interface SitemapOutputComponent
getMimeType
in class AbstractReader
public void generate() throws IOException, SAXException, ProcessingException
generate
in interface Reader
IOException
SAXException
ProcessingException
public void recycle()
recycle
in interface Recyclable
recycle
in class AbstractReader
private void _generateThumbnail(OutputStream os, String format, BufferedImage src, byte[] fileContent, int maxHeight, int maxWidth) throws IOException
IOException
private void _generateZoomAndCropImage(OutputStream os, String format, BufferedImage src, byte[] fileContent, int minHeight, int minWidth) throws IOException
IOException
private BufferedImage _getCropImage(BufferedImage src, int x, int y, int width, int height)