Class GeneratedResource
java.lang.Object
org.mule.runtime.extension.api.resources.GeneratedResource
A resource that is generated in the context of an
ExtensionModel's build process- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionGeneratedResource(boolean availableInArtifact, String path, byte[] content) Creates a new instanceGeneratedResource(String path, byte[] content) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionbyte[]The resource's contentgetPath()The path in which the resource will be found after being generated.booleanResources that are not available in the target extension artifact may be used during the build process of the extension as temporary data.
-
Constructor Details
-
GeneratedResource
Creates a new instance- Parameters:
path- the resource's pathcontent- the resource's content
-
GeneratedResource
Creates a new instance- Parameters:
availableInArtifact- whether the resource will be part of the target extension artifact.path- the resource's pathcontent- the resource's content- Since:
- 1.10, 1.9.4
-
-
Method Details
-
isAvailableInArtifact
public boolean isAvailableInArtifact()Resources that are not available in the target extension artifact may be used during the build process of the extension as temporary data.- Returns:
- whether the resource will be part of the target extension artifact.
- Since:
- 1.10, 1.9.4
-
getPath
The path in which the resource will be found after being generated. Also serves as the resource's primary key- Returns:
- a
String. Cannot empty nornull
-
getContent
public byte[] getContent()The resource's content- Returns:
- a non
nullbyte
-