Class AssetDmContentProcessor
java.lang.Object
org.craftercms.studio.impl.v1.content.pipeline.BaseContentProcessor
org.craftercms.studio.impl.v1.content.pipeline.PathMatchProcessor
org.craftercms.studio.impl.v1.content.pipeline.FormDmContentProcessor
org.craftercms.studio.impl.v1.content.pipeline.AssetDmContentProcessor
- All Implemented Interfaces:
ContentProcessor,DmContentProcessor
-
Field Summary
FieldsFields inherited from class org.craftercms.studio.impl.v1.content.pipeline.FormDmContentProcessor
contentRepository, contentRepositoryV1, contentService, contentServiceV2, itemServiceInternal, servicesConfig, workflowServiceFields inherited from class org.craftercms.studio.impl.v1.content.pipeline.PathMatchProcessor
_matchPaths, _unmatchPathsFields inherited from class org.craftercms.studio.impl.v1.content.pipeline.BaseContentProcessor
_name -
Constructor Summary
ConstructorsConstructorDescriptiondefault constructorconstructor that sets the process name -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(PipelineContent content, ResultTO result) process the content at the given path.protected voidupdateFile(String site, String relativePath, InputStream input, String user, boolean isPreview, boolean unlock, ResultTO result) update the file at the given content nodeprotected ContentAssetInfoTOwriteContentAsset(PipelineContent content, String site, String user, String path, String assetName, InputStream in, int width, int height, boolean createFolders, boolean isPreview, boolean unlock, boolean isSystemAsset, ResultTO result) upload content asset to the given pathMethods inherited from class org.craftercms.studio.impl.v1.content.pipeline.FormDmContentProcessor
cancelWorkflow, createMissingFoldersInPath, createNewFile, fileToFolder, setContentRepository, setContentRepositoryV1, setContentService, setContentServiceV2, setItemServiceInternal, setServicesConfig, setWorkflowService, unlock, updateWorkFlow, writeContentMethods inherited from class org.craftercms.studio.impl.v1.content.pipeline.PathMatchProcessor
isProcessable, setMatchPaths, setUnmatchPathsMethods inherited from class org.craftercms.studio.impl.v1.content.pipeline.BaseContentProcessor
checkForMandatoryParam, getName, setName
-
Field Details
-
FILE_SIZE_MB
- See Also:
-
FILE_SIZE_KB
- See Also:
-
NAME
- See Also:
-
-
Constructor Details
-
AssetDmContentProcessor
public AssetDmContentProcessor()default constructor -
AssetDmContentProcessor
constructor that sets the process name- Parameters:
name-
-
-
Method Details
-
process
Description copied from interface:ContentProcessorprocess the content at the given path.- Specified by:
processin interfaceContentProcessor- Overrides:
processin classFormDmContentProcessor- Parameters:
content- content to processresult- result to return- Throws:
ContentProcessException
-
writeContentAsset
protected ContentAssetInfoTO writeContentAsset(PipelineContent content, String site, String user, String path, String assetName, InputStream in, int width, int height, boolean createFolders, boolean isPreview, boolean unlock, boolean isSystemAsset, ResultTO result) throws ServiceLayerException, UserNotFoundException upload content asset to the given path- Parameters:
site-path-assetName-in- input stream to read the asset fromwidth-height-createFolders- create missing folders?isPreview-unlock- unlock the content upon update?- Returns:
- asset information
- Throws:
ServiceLayerExceptionUserNotFoundException
-
updateFile
protected void updateFile(String site, String relativePath, InputStream input, String user, boolean isPreview, boolean unlock, ResultTO result) throws ServiceLayerException, UserNotFoundException update the file at the given content node- Overrides:
updateFilein classFormDmContentProcessor- Parameters:
input-user-isPreview-unlock- unlock the content upon update?- Throws:
ServiceLayerExceptionUserNotFoundException
-