public class ArchivingOperations extends Object
| Constructor and Description |
|---|
ArchivingOperations() |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.extension.api.runtime.operation.Result<InputStream,Void> |
archive(Map<String,org.mule.runtime.api.metadata.TypedValue<InputStream>> entries,
ArchiverStrategy archiver)
Compresses all the given entries into a new file in the configured format.
|
Map<String,InputStream> |
extract(org.mule.runtime.api.metadata.TypedValue<InputStream> compressed,
ExtractorStrategy extractor,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
Decompresses a given content that represent an archive in a compression format.
|
@MediaType(value="*/*",
strict=false)
@Summary(value="Compresses a set of entries into a new file in the specified archive format")
@Throws(value=ArchiveErrorProvider.class)
public org.mule.runtime.extension.api.runtime.operation.Result<InputStream,Void> archive(@Content
Map<String,org.mule.runtime.api.metadata.TypedValue<InputStream>> entries,
@ParameterDsl(allowReferences=false) @Expression(value=NOT_SUPPORTED)
ArchiverStrategy archiver)
Each entry passed to this operation will be placed inside the compressed archive with the name provided by the user in the DataWeave script. e.g.
For this expression:
{ file: vars.aTxtContent, 'dir/resume.pdf': vars.pdf }
The resultant archive will contain 2 entries one named "file" at root level and another one called "resume.pdf" inside a directory called "dir".
+- Archive | \- file1 | \+ dir1 | \- file2
As you can see in the example above, the slash "/" in the name of an entry indicates directory separation, so all names will be introspected to create dirs inside the archive.
entries - the entries to be added to the archivearchiver - the archiving strategy@MediaType(value="*/*",
strict=false)
@Throws(value=ExtractErrorProvider.class)
@Streaming
@Summary(value="Decompresses a compressed content in the configured returning a list with all the entries inside it uncompressed")
public Map<String,InputStream> extract(@Content
org.mule.runtime.api.metadata.TypedValue<InputStream> compressed,
@ParameterDsl(allowReferences=false) @Expression(value=NOT_SUPPORTED)
ExtractorStrategy extractor,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
compressed - the content of a compressed archiveextractor - the extractor strategystreamingHelper - a StreamingHelper to make streams repeatableCopyright © 2026 MuleSoft, Inc.. All rights reserved.