Class BaseTemplateModel

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Returns the optional description of this template definition, describing where and how it might be used.
      java.lang.String getFormKey()
      Returns the optional form key for this template definition which might be used to collect information whenever such a template instance is created.
      java.lang.String getKey()
      Returns the business key usually used to reference or lookup a template definition regardless of its version.
      java.lang.String getName()
      Returns the name of this template definition.
      java.lang.String getSubType()
      Returns the sub type of this template definition which can be freely chosen.
      java.lang.String getType()
      Returns the type of this template definition which is used to lookup a renderer or processor being able to render and process this template.
      java.lang.String getVariationContentType()
      The type of the variation content.
      java.util.List<VariationDefinition> getVariationDefinitions()
      Returns the optional list of variations this template needs to lookup the correct TemplateVariationDefinition to be used when rendering a single template for a certain variation.
      java.lang.String getVersionTimestamp()
      Returns the version timestamp for this template definition that is used to check if a new template needs to be deployed.
      boolean hasVariations()
      Returns true if this template definition has variations or just has a single variation.
      void setDescription​(java.lang.String description)  
      void setFormKey​(java.lang.String formKey)  
      void setKey​(java.lang.String key)  
      void setName​(java.lang.String name)  
      void setSubType​(java.lang.String subType)  
      void setType​(java.lang.String type)  
      void setVariationContentType​(java.lang.String variationContentType)  
      void setVariationDefinitions​(java.util.List<VariationDefinition> variationDefinitions)  
      void setVersionTimestamp​(java.lang.String versionTimestamp)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • key

        protected java.lang.String key
      • name

        protected java.lang.String name
      • description

        protected java.lang.String description
      • type

        protected java.lang.String type
      • subType

        protected java.lang.String subType
      • variationContentType

        protected java.lang.String variationContentType
      • formKey

        protected java.lang.String formKey
      • versionTimestamp

        protected java.lang.String versionTimestamp
    • Constructor Detail

      • BaseTemplateModel

        public BaseTemplateModel()
    • Method Detail

      • getKey

        public java.lang.String getKey()
        Description copied from interface: TemplateModel
        Returns the business key usually used to reference or lookup a template definition regardless of its version.
        Specified by:
        getKey in interface TemplateModel
      • setKey

        public void setKey​(java.lang.String key)
      • getName

        public java.lang.String getName()
        Description copied from interface: TemplateModel
        Returns the name of this template definition.
        Specified by:
        getName in interface TemplateModel
      • setName

        public void setName​(java.lang.String name)
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: TemplateModel
        Returns the optional description of this template definition, describing where and how it might be used.
        Specified by:
        getDescription in interface TemplateModel
      • setDescription

        public void setDescription​(java.lang.String description)
      • setType

        public void setType​(java.lang.String type)
      • getSubType

        public java.lang.String getSubType()
        Description copied from interface: TemplateModel
        Returns the sub type of this template definition which can be freely chosen.
        Specified by:
        getSubType in interface TemplateModel
      • setSubType

        public void setSubType​(java.lang.String subType)
      • getVariationContentType

        public java.lang.String getVariationContentType()
        Description copied from interface: TemplateModel
        The type of the variation content. This is used by the TemplateProcessor(s) to decide whether they can render certain template or not.
        Specified by:
        getVariationContentType in interface TemplateModel
        Returns:
        the type of the variation content
      • setVariationContentType

        public void setVariationContentType​(java.lang.String variationContentType)
      • getFormKey

        public java.lang.String getFormKey()
        Description copied from interface: TemplateModel
        Returns the optional form key for this template definition which might be used to collect information whenever such a template instance is created. For instance, this form might ask for necessary categorization information when creating a new document based on a template or request parameter values if a message template should be rendered, etc.
        Specified by:
        getFormKey in interface TemplateModel
      • setFormKey

        public void setFormKey​(java.lang.String formKey)
      • getVersionTimestamp

        public java.lang.String getVersionTimestamp()
        Description copied from interface: TemplateModel
        Returns the version timestamp for this template definition that is used to check if a new template needs to be deployed. The timestamp should have a format of 'yyyy-MM-dd' (2018-02-01) or 'yyyy-MM-dd HH:mm:ss' (2018-02-01 14:00:00)
        Specified by:
        getVersionTimestamp in interface TemplateModel
      • setVersionTimestamp

        public void setVersionTimestamp​(java.lang.String versionTimestamp)
      • hasVariations

        public boolean hasVariations()
        Description copied from interface: TemplateModel
        Returns true if this template definition has variations or just has a single variation. If true is returned, the method TemplateModel.getVariationDefinitions() needs to return at least one variation definition, otherwise it must return an empty list or even null.
        Specified by:
        hasVariations in interface TemplateModel
        Returns:
        true if this template has variations, false if it has one only
      • setVariationDefinitions

        public void setVariationDefinitions​(java.util.List<VariationDefinition> variationDefinitions)