Interface WeaveSampleDataResourcesService

All Superinterfaces:
org.mule.dx.platform.api.component.ComponentLifecycle, LanguageServerLifecycle, WeaveService

public interface WeaveSampleDataResourcesService extends WeaveService
  • Method Details

    • getSampleDataFolder

      File getSampleDataFolder(String uri)
      The folder were sample data should be stored.
      Parameters:
      uri - for the unique identifier of the element to get its sample data folder.
      Returns:
      File the folder were the sample data would be created. The folder is not created in the file system it is up to consumer to create it.
    • getInputSampleData

      File getInputSampleData(String uri, String scenarioName, String inputFileName)
      The file where the input sample data should be stored. In order to check if input sample data exists use the File.exists() API.
      Parameters:
      uri - for the unique identifier of the element to get its sample data folder.
      scenarioName - the name of the scenario where the input is defined.
      inputFileName - the file name (with its extension, .json, .xml).
      Returns:
      File the file were the input sample data should be stored. The file is not created in the file system it is up to consumer to create it.
    • getInputSamples

      If there is a scenario defined for the URI it lists the WeaveSampleDataResourcesService.SampleInput for every input sample defined or an empty list.
      Parameters:
      uri - for the unique identifier of the element to get its sample data folder.
      scenarioName - the name of the scenario where the inputs are defined.
      Returns:
      List of WeaveSampleDataResourcesService.SampleInputs for every input sample defined, or empty list. If there is no scenario defined for the given name an empty Optional.
    • listScenarios

      List<String> listScenarios(String uri)
      For the given URI returns the list of names for each scenario defined.
      Parameters:
      uri - for the unique identifier of the element to get its sample data folder..
      Returns:
      List of scenario names.