QualifiedContent

public interface QualifiedContent

Known direct subclasses
DirectoryInput

This interface is deprecated.

JarInput

This interface is deprecated.


Represent content qualified with one or more ContentType and one or more Scope.

Summary

Nested types

A content type that is requested through the transform API.

The type of of the content.

The scope of the content.

Definition of a scope.

Public methods

abstract Set<QualifiedContent.ContentType>

Returns the type of content that the stream represents.

abstract File

Returns he location of the content.

abstract String

Returns the name of the content.

abstract Set<Object>

Returns the scope of the content.

Public methods

getContentTypes

abstract Set<QualifiedContent.ContentTypegetContentTypes()

Returns the type of content that the stream represents.

Even though this may return only RESOURCES or CLASSES, the actual content (the folder or the jar) may contain files representing other content types. This is because the transform mechanism avoids duplicating files around to remove unwanted types for performance.

For each input, transforms should always take care to read and process only the files associated with the types returned by this method.

Returns
Set<QualifiedContent.ContentType>

a set of one or more types, never null nor empty.

getFile

abstract File getFile()

Returns he location of the content.

Returns
File

the content location.

getName

abstract String getName()

Returns the name of the content. Can be used to differentiate different content using the same scope. This is not reliably usable at every stage of the transformations, but can be used for logging for instance.

Returns
String

the name

getScopes

abstract Set<ObjectgetScopes()

Returns the scope of the content.

Returns
Set<Object>

a set of one or more scopes, never null nor empty.