Class AbstractAssetProcessor
java.lang.Object
org.craftercms.studio.impl.v1.asset.processing.AbstractAssetProcessor
- All Implemented Interfaces:
AssetProcessor
- Direct Known Subclasses:
ImageTransformingProcessor
Base class for
AssetProcessors.- Author:
- avasquez
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprotected StringgetOutputRepoPath(ProcessorConfiguration config, Matcher inputPathMatcher) processAsset(ProcessorConfiguration config, Matcher inputPathMatcher, Asset input) Processes the given asset.
-
Constructor Details
-
AbstractAssetProcessor
public AbstractAssetProcessor()
-
-
Method Details
-
processAsset
public Asset processAsset(ProcessorConfiguration config, Matcher inputPathMatcher, Asset input) throws AssetProcessingException Description copied from interface:AssetProcessorProcesses the given asset.- Specified by:
processAssetin interfaceAssetProcessor- Parameters:
config- the configuration to useinputPathMatcher- the Matcher object that resulted from path matching the asset against the input path pattern of the pipelineinput- the asset to process- Returns:
- the transformed asset or a new asset
- Throws:
AssetProcessingException- if an error occurs.
-
getOutputRepoPath
-
doProcessAsset
protected abstract void doProcessAsset(Path inputFile, Path outputFile, Map<String, String> params) throws Exception- Throws:
Exception
-