public abstract class AbstractSourceMapResourceHandler extends AbstractResourceHandler
Modifier and Type | Field and Description |
---|---|
protected HashCache |
_hashCache
Hash Cache for Hashed resources
|
protected SourceMapCache |
_sourceMapCache
SourceMapCache
|
_cocoonContext, _context, _resolver, _supportedSuffixes
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
AbstractSourceMapResourceHandler() |
Modifier and Type | Method and Description |
---|---|
protected abstract Source |
_getAlternateSource(String location,
Map objectModel)
Find the source at an alternative location
|
protected Source |
_getExistingSource(String location)
Try to retrieve an existing source
|
void |
generateResource(Source source,
OutputStream out,
Map objectModel,
Parameters parameters,
Map<String,Object> additionalParameters)
Generate the resource configured during setup, and output it
|
String |
getMimeType(Source source,
Parameters par)
Return the mime type of the configured resource.
|
int |
getPriority()
Get the priority of this handler
|
void |
service(ServiceManager manager) |
Source |
setup(String location,
Map objectModel,
Parameters par,
Map<String,Object> additionalParameters)
Initialize the resource handler with a resource.
|
configure, contextualize, getKey, getLastModified, getSize, getValidity, isSupported
getLogger, setLogger
protected SourceMapCache _sourceMapCache
protected HashCache _hashCache
public AbstractSourceMapResourceHandler()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractResourceHandler
ServiceException
public String getMimeType(Source source, Parameters par)
ResourceHandler
getMimeType
in interface ResourceHandler
getMimeType
in class AbstractResourceHandler
source
- The sourcepar
- The parameterspublic int getPriority()
ResourceHandler
getPriority
in interface ResourceHandler
getPriority
in class AbstractResourceHandler
public Source setup(String location, Map objectModel, Parameters par, Map<String,Object> additionalParameters) throws IOException, ProcessingException
ResourceHandler
setup
in interface ResourceHandler
setup
in class AbstractResourceHandler
location
- The source uriobjectModel
- The object modelpar
- The parametersadditionalParameters
- Additional parameters that can be filled, and will be transmitted to getKey, getValidity and generateResourceIOException
- If an error occursProcessingException
- If an error occursprotected abstract Source _getAlternateSource(String location, Map objectModel) throws ProcessingException, IOException
location
- The original locationobjectModel
- The object modelIOException
- If an error occurredProcessingException
- If an error occurredprotected Source _getExistingSource(String location)
location
- The locationpublic void generateResource(Source source, OutputStream out, Map objectModel, Parameters parameters, Map<String,Object> additionalParameters) throws IOException, ProcessingException
ResourceHandler
source
- The sourceout
- The output stream to write toobjectModel
- The object modelparameters
- The sitemap parametersadditionalParameters
- Additional parametersIOException
- If an error occursProcessingException
- If an error occurs