Interface TemplateSourceDocument

    • Method Detail

      • hasInput

        boolean hasInput​(String inputName)
        Returns whether or not the TemplateInput already exists, based on the name, in the template.
      • initTemplate

        void initTemplate​(boolean save)
        Initialize the DocumentModel
        • finds associated TemplateProcessor
        • extract Template parameters
        Parameters:
        save - flag to indicate if target DocumentModel must be saved or not
      • initTypesBindings

        void initTypesBindings()
        Initialize the Types2Template binding
      • saveParams

        DocumentModel saveParams​(List<TemplateInput> params,
                                 boolean save)
        Save parameters changes
        Parameters:
        params - the updated list of parameters
        save - flag to indicate if target DocumentModel must be saved or not
        Returns:
        the updated DocumentModel
      • allowInstanceOverride

        boolean allowInstanceOverride()
        Return flag to indicate if Documents associated to this template can override parametes value
      • hasEditableParams

        boolean hasEditableParams()
        Indicate of the associated Template has editable parameters or not
      • getApplicableTypes

        List<String> getApplicableTypes()
        Get List of Document Types than can be associated to this Template.
        Returns:
        List of Document Types or an empty List
      • getForcedTypes

        List<String> getForcedTypes()
        Get List of Document Types that must be automatically bound to this template at creation time
        Returns:
        List of Document Types or an empty List
      • removeForcedType

        void removeForcedType​(String type,
                              boolean save)
        Remove Type mapping for this template
      • setForcedTypes

        void setForcedTypes​(String[] forcedTypes,
                            boolean save)
        Update the Type mapping for this template
      • setOutputFormat

        void setOutputFormat​(String mimetype,
                             boolean save)
        Sets the expected output mime-type. If the expected mime-type is different from the output of the rendering, converters will be applied.
      • getOutputFormat

        String getOutputFormat()
        Return the expected mime-type of the resulting rendering
      • useAsMainContent

        boolean useAsMainContent()
        Indicate if the template can be used as main blob in the TemplateBasedDocument (i.e. if the template is editable by the end user)
      • getFileName

        String getFileName()
        Shortcut to access the underlying Blob filename
        Returns:
        name
      • getTitle

        String getTitle()
        Shortcut to access the underlying DocumentModel title
        Returns:
        template filename
      • getVersionLabel

        String getVersionLabel()
        Shortcut to access the underlying DocumentModel versionLabel
        Returns:
        versionLabel
      • getLabel

        String getLabel()
        Return label key used for template
      • setTargetRenditioName

        void setTargetRenditioName​(String renditionName,
                                   boolean save)
        Associate Template to a Rendition
      • getTargetRenditionName

        String getTargetRenditionName()
        Get the associated Rendition if any
        Returns:
        Rendition name or null
      • setTemplateBlob

        void setTemplateBlob​(Blob blob,
                             boolean save)
        Write accessor to the Blob used to store the template