Interface EditorTemplate

  • All Superinterfaces:
    java.lang.Cloneable, PersistentObject, java.io.Serializable
    All Known Subinterfaces:
    EditorTemplateWithContent

    @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public interface EditorTemplate
    extends PersistentObject
    Used to create a new editor for a given extension. It also has a description
    • Field Detail

      • EDITOR_TEMPLATE

        static final int EDITOR_TEMPLATE
        The new editor template type.
        See Also:
        Constant Field Values
      • FILE_TEMPLATE

        static final int FILE_TEMPLATE
        The classic type of template represented by a file on HDD.
        See Also:
        Constant Field Values
      • ARCHIVE_TEMPLATE

        static final int ARCHIVE_TEMPLATE
        The archive template type.
        See Also:
        Constant Field Values
      • PROJECT_ARCHIVE_TEMPLATE

        static final int PROJECT_ARCHIVE_TEMPLATE
        The archived project template type.
        See Also:
        Constant Field Values
    • Method Detail

      • getDescription

        java.lang.String getDescription()
        Return the template description.
        Returns:
        The template description.
      • getExtension

        java.lang.String getExtension()
        Return the template extension.
        Returns:
        The template extension.
      • getSource

        java.lang.String getSource()
        Returns:
        A description from where this template was loaded.
      • getTemplateType

        int getTemplateType()
        Returns:
        The template type. Currently one of: EDITOR_TEMPLATE, FILE_TEMPLATE or ARCHIVE_TEMPLATE.
      • clone

        java.lang.Object clone()
        Clone this editor template.
        Specified by:
        clone in interface PersistentObject
        Returns:
        The clone or null if unsuccessful.
      • getName

        java.lang.String getName()
        Return the template name.
        Returns:
        The template name.
      • getAdditionalInformation

        java.lang.String getAdditionalInformation()
        Return additional information about this template (e.g. Framework, Path etc).
        Returns:
        Additional information.
      • isCustomizable

        boolean isCustomizable()
        Returns:
        true if the template can be customized.
      • getCustomizePageID

        java.lang.String getCustomizePageID()
        Get the ID representing the page used for customizing the template.
        Returns:
        The ID representing the page used for customizing the template.
      • getCaretPosition

        int getCaretPosition()
        Returns:
        The caret position to be set after loading the template.
      • getLongDescription

        java.lang.String getLongDescription()
        Return the template's description which will be shown as a tooltip.
        Returns:
        The template long description.
      • getTypeProperty

        java.lang.String getTypeProperty()
        Returns:
        The type property (from the .properties file) for the current template. Can be: 'dita', 'general' or possibly others.
      • getFilenamePrefix

        java.lang.String getFilenamePrefix()
        A template can have the "filenamePrefix" property specified in its ".properties" file, whose value will be used as the prefix of the names of all the documents to be created. This method returns the value of the "filenamePrefix" property or null if the property is not set.
        Returns:
        the value of the "filenamePrefix" property, which is used as the prefix of a new file created from this template.
        Since:
        18
      • getFilenameSuffix

        java.lang.String getFilenameSuffix()
        A template can have the "filenameSuffix" property specified in its ".properties" file, whose value will be used as the suffix of the names of all the documents to be created. This method returns the value of the "filenameSuffix" property or null if the property is not set.
        Returns:
        the value of the "filenameSuffix" property, which is used as the prefix of a new file created from this template.
        Since:
        18