TransformOutputProvider

interface TransformOutputProvider


The output of a transform.

There is no direct access to a location to write. Instead, Transforms can ask to get the location for given scopes, content-types and a format.

Summary

Public functions

Unit

Delete all content.

File
getContentLocation(
    name: String,
    types: (Mutable)Set<QualifiedContent.ContentType!>,
    scopes: (Mutable)Set<Any!>,
    format: Format
)

This function is deprecated.

Public functions

deleteAll

fun deleteAll(): Unit

Delete all content. This is useful when running in non-incremental mode

Throws
java.io.IOException: java.io.IOException

if deleting the output failed.

getContentLocation

fun getContentLocation(
    name: String,
    types: (Mutable)Set<QualifiedContent.ContentType!>,
    scopes: (Mutable)Set<Any!>,
    format: Format
): File

Returns the location of content for a given set of Scopes, Content Types, and Format.

If the format is DIRECTORY then the result is the file location of the directory. If the format is JAR then the result is a file representing the jar to create.

Non of the directories or files are created by querying this method, and there is no checks regarding the existence of content in this location.

In case of incremental processing of removed files, it is safe to query the method to get the location of the files to removed.

Parameters
name: String

a unique name for the content. For a given set of scopes/types/format it must be unique.

types: (Mutable)Set<QualifiedContent.ContentType!>

the content types associated with this content.

scopes: (Mutable)Set<Any!>

the scopes associated with this content.

format: Format

the format of the content.

Returns
File

the location of the content.