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
public class AssetDmContentProcessor extends FormDmContentProcessor
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILE_SIZE_KB
static String
FILE_SIZE_MB
static String
NAME
-
Fields inherited from class org.craftercms.studio.impl.v1.content.pipeline.FormDmContentProcessor
contentRepository, contentRepositoryV1, contentService, contentServiceV2, itemServiceInternal, servicesConfig, workflowService
-
Fields inherited from class org.craftercms.studio.impl.v1.content.pipeline.PathMatchProcessor
_matchPaths, _unmatchPaths
-
Fields inherited from class org.craftercms.studio.impl.v1.content.pipeline.BaseContentProcessor
_name
-
-
Constructor Summary
Constructors Constructor Description AssetDmContentProcessor()
default constructorAssetDmContentProcessor(String name)
constructor that sets the process name
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
process(PipelineContent content, ResultTO result)
process the content at the given path.protected void
updateFile(String site, String relativePath, InputStream input, String user, boolean isPreview, boolean unlock, ResultTO result)
update the file at the given content nodeprotected 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)
upload content asset to the given path-
Methods inherited from class org.craftercms.studio.impl.v1.content.pipeline.FormDmContentProcessor
cancelWorkflow, createMissingFoldersInPath, createNewFile, fileToFolder, setContentRepository, setContentRepositoryV1, setContentService, setContentServiceV2, setItemServiceInternal, setServicesConfig, setWorkflowService, unlock, updateWorkFlow, writeContent
-
Methods inherited from class org.craftercms.studio.impl.v1.content.pipeline.PathMatchProcessor
isProcessable, setMatchPaths, setUnmatchPaths
-
Methods inherited from class org.craftercms.studio.impl.v1.content.pipeline.BaseContentProcessor
checkForMandatoryParam, getName, setName
-
-
-
-
Field Detail
-
FILE_SIZE_MB
public static final String FILE_SIZE_MB
- See Also:
- Constant Field Values
-
FILE_SIZE_KB
public static final String FILE_SIZE_KB
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AssetDmContentProcessor
public AssetDmContentProcessor()
default constructor
-
AssetDmContentProcessor
public AssetDmContentProcessor(String name)
constructor that sets the process name- Parameters:
name
-
-
-
Method Detail
-
process
public void process(PipelineContent content, ResultTO result) throws ContentProcessException
Description copied from interface:ContentProcessor
process the content at the given path.- Specified by:
process
in interfaceContentProcessor
- Overrides:
process
in 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:
ServiceLayerException
UserNotFoundException
-
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:
updateFile
in classFormDmContentProcessor
- Parameters:
input
-user
-isPreview
-unlock
- unlock the content upon update?- Throws:
ServiceLayerException
UserNotFoundException
-
-