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 |
managerobjectModel, 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, shouldSetContentLengthenableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate 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 Serviceableservice in class ServiceableReaderServiceExceptionpublic void setup(SourceResolver sResolver, Map objModel, String src, Parameters par) throws ProcessingException, SAXException, IOException
setup in interface SitemapModelComponentsetup in class AbstractReaderProcessingExceptionSAXExceptionIOExceptionprotected String _decodePath(String path) throws UnsupportedEncodingException
path - the resource pathUnsupportedEncodingException - if UTF-8 encoding is not supportedpublic Serializable getKey()
getKey in interface CacheableProcessingComponentpublic SourceValidity getValidity()
getValidity in interface CacheableProcessingComponentpublic long getLastModified()
getLastModified in interface ReadergetLastModified in class AbstractReaderpublic String getMimeType()
getMimeType in interface SitemapOutputComponentgetMimeType in class AbstractReaderpublic void generate() throws IOException, SAXException, ProcessingException
generate in interface ReaderIOExceptionSAXExceptionProcessingExceptionpublic void recycle()
recycle in interface Recyclablerecycle in class AbstractReaderprivate void _generateThumbnail(OutputStream os, String format, BufferedImage src, byte[] fileContent, int maxHeight, int maxWidth) throws IOException
IOExceptionprivate void _generateZoomAndCropImage(OutputStream os, String format, BufferedImage src, byte[] fileContent, int minHeight, int minWidth) throws IOException
IOExceptionprivate BufferedImage _getCropImage(BufferedImage src, int x, int y, int width, int height)