Interface NexusTemplateService

All Known Implementing Classes:
NexusTemplateServiceImpl

public interface NexusTemplateService
A service to create NexusTemplates. The main way to to this is from a YAML file, using loadTemplate(String). A template can also be created from a YAML string using
invalid reference
#loadTemplateFromString(String)
. Additionally
  • Method Details

    • loadTemplate

      NexusTemplate loadTemplate(String templateFilePath) throws NexusException
      Loads a template from the given file path. The file must be in YAML format.
      Parameters:
      templateFilePath - template file path
      Returns:
      the template created
      Throws:
      NexusException - if the template could not be loaded for any reason
    • createTemplateFromString

      NexusTemplate createTemplateFromString(String templateString) throws NexusException
      Creates a template from the given template string. The string must be in YAML format.
      Parameters:
      templateString - the template string to load
      Returns:
      the template created
      Throws:
      NexusException - if the template could not be created for any reason
    • createTemplate

      NexusTemplate createTemplate(String templateName, Map<String,Object> yamlMapping)
      Creates a template from the given template map. The map is a potentially nested map of template entries - see the template documentation for more details.
      Parameters:
      templateName - the name of the template
      yamlMapping - the yaml mapping
      Returns:
      the template created