java.lang.Object
org.mule.runtime.extension.api.resources.GeneratedResource

public final class GeneratedResource extends Object
A resource that is generated in the context of an ExtensionModel's build process
Since:
1.0
  • Constructor Details

    • GeneratedResource

      public GeneratedResource(String path, byte[] content)
      Creates a new instance
      Parameters:
      path - the resource's path
      content - the resource's content
    • GeneratedResource

      public GeneratedResource(boolean availableInArtifact, String path, byte[] content)
      Creates a new instance
      Parameters:
      availableInArtifact - whether the resource will be part of the target extension artifact.
      path - the resource's path
      content - 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

      public String 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 nor null
    • getContent

      public byte[] getContent()
      The resource's content
      Returns:
      a non null byte