public class AmetysResourceReader extends ServiceableReader implements CacheableProcessingComponent
Resource| Modifier and Type | Field and Description |
|---|---|
private Collection<String> |
_allowedFormats |
private int |
_cropHeight |
private int |
_cropWidth |
protected CurrentUserProvider |
_currentUserProvider
The current user provider
|
private int |
_height |
private int |
_maxHeight |
private int |
_maxWidth |
protected Resource |
_object
The resource
|
private boolean |
_readForDownload |
protected AmetysObjectResolver |
_resolver
The Ametys object resolver
|
protected RightManager |
_rightManager
The right manager
|
private int |
_width |
managerobjectModel, out, parameters, resolver, source| Constructor and Description |
|---|
AmetysResourceReader() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
_decodePath(String path)
Decode the resource path
|
protected boolean |
_isImage()
Determines if the file is an image
|
protected void |
checkUserAccess()
Check the user access
|
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, setupLoggerprotected AmetysObjectResolver _resolver
protected RightManager _rightManager
protected CurrentUserProvider _currentUserProvider
private boolean _readForDownload
private Collection<String> _allowedFormats
private int _width
private int _height
private int _maxWidth
private int _maxHeight
private int _cropWidth
private int _cropHeight
public AmetysResourceReader()
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 void checkUserAccess() throws AuthorizationRequiredException, AccessDeniedException
AuthorizationRequiredException - if authorization is requiredAccessDeniedException - if user has no accessprotected 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 ReaderIOExceptionSAXExceptionProcessingExceptionprotected boolean _isImage()
true if file is a imagepublic void recycle()
recycle in interface Recyclablerecycle in class AbstractReader