Class TemplateServiceImpl

  • All Implemented Interfaces:
    TemplateService

    public class TemplateServiceImpl
    extends BaseHeatServices
    implements TemplateService
    This class implements all methods for manipulation of HeatTemplate objects. The non-exhaustive list of methods is oriented along http://developer.openstack.org/api-ref-orchestration-v1.html#stack-templates
    Author:
    Matthias Reisser
    • Constructor Detail

      • TemplateServiceImpl

        public TemplateServiceImpl()
    • Method Detail

      • validateTemplate

        public TemplateResponse validateTemplate​(String template)
        Validates the template
        Specified by:
        validateTemplate in interface TemplateService
        Parameters:
        template - to validate, passed as String in JSON Format
        Returns:
        TemplateResponse indicating valid or the error condition if not valid
      • validateTemplateByURL

        public TemplateResponse validateTemplateByURL​(String templateURL)
        Validates the template
        Specified by:
        validateTemplateByURL in interface TemplateService
        Parameters:
        templateURL - the remote template via URL to validate
        Returns:
        TemplateResponse indicating valid or the error condition if not valid
      • getTemplateAsString

        public String getTemplateAsString​(String stackName,
                                          String stackId)
        Retrieves the original template in original String form JSON or YAML
        Specified by:
        getTemplateAsString in interface TemplateService
        Parameters:
        stackName - the stack name
        stackId - the stack identifier
        Returns:
        the template
      • getTemplateAsMap

        public Map<String,​Object> getTemplateAsMap​(String stackName,
                                                         String stackId)
        Retrieves the original template as Map
        Specified by:
        getTemplateAsMap in interface TemplateService
        Parameters:
        stackName - the stack name
        stackId - the stack identifier
        Returns:
        the template
      • getTemplateAsMap

        public Map<String,​Object> getTemplateAsMap​(String stackNameOrId)
        Retrieves the original template as Map when you know only the stack name or stack id
        Specified by:
        getTemplateAsMap in interface TemplateService
        Parameters:
        stackNameOrId - the stack name or stackId
        Returns:
        the template