Interface ExtensibilityModel

    • Method Detail

      • isModelStarted

        boolean isModelStarted()

        Indicates whether or not the has been started.

        Returns:
        boolean
      • switchToExtensionProcessing

        void switchToExtensionProcessing()

        Switches from defining the base model to processing extensions. When extension processing the "merge" action can no longer be used but the "remove", "replace", "modify", "before" and "after" actions can be.

      • isExtensionProcessing

        boolean isExtensionProcessing()

        Indicates whether the base model is complete and extensions are now being processed. Extension processing commences once the switchToExtensionProcessing method has been called. When extension processing the "merge" action can no longer be used but the "remove", "replace", "modify", "before" and "after" actions can be.

        Returns:
        boolean
      • flushModel

        void flushModel​(java.io.Writer out)

        Flushes the entire content of the model to the supplied Writer. Once this has been done it will no longer be possible to update the model.

        Parameters:
        out - A Writer to render the model to.
      • addUnboundContent

        void addUnboundContent()

        Add a new UnboundContentModelElementImpl into the model so that when content is rendered it will be kept but will not be available to extensions to modify. This is used when processing the content in base files that is not provided by an ExtensibilityDirective.

      • addDiscardContent

        void addDiscardContent()

        Add a new DiscardUnboundContentModelElementImpl into the model so that when content is rendered it will be discarded. This is used when extension files are processed that contain "unbounded" content (that is content that is not provided by an ExtensibilityDirective).

      • clearRelocatedContent

        boolean clearRelocatedContent​(java.lang.String id,
                                      java.lang.String directiveName)
      • remove

        void remove​(ExtensibilityDirectiveData directive)
             throws freemarker.template.TemplateException,
                    java.io.IOException

        Removes content from the model.

        Parameters:
        directive - ExtensibilityDirectiveData
        Throws:
        freemarker.template.TemplateException
        java.io.IOException
      • replace

        void replace​(ExtensibilityDirectiveData directive)
              throws freemarker.template.TemplateException,
                     java.io.IOException

        Replaces content in the model.

        Parameters:
        directive - ExtensibilityDirectiveData
        Throws:
        freemarker.template.TemplateException
        java.io.IOException
      • merge

        void merge​(ExtensibilityDirectiveData directive)
            throws freemarker.template.TemplateException,
                   java.io.IOException

        Places new content in the base model.

        Parameters:
        directive - ExtensibilityDirectiveData
        Throws:
        freemarker.template.TemplateException
        java.io.IOException
      • before

        void before​(ExtensibilityDirectiveData directive)
             throws freemarker.template.TemplateException,
                    java.io.IOException

        Places content in the model before some base content.

        Parameters:
        directive - ExtensibilityDirectiveData
        Throws:
        freemarker.template.TemplateException
        java.io.IOException
      • after

        void after​(ExtensibilityDirectiveData directive)
            throws freemarker.template.TemplateException,
                   java.io.IOException

        Places content in the modell after some base content.

        Parameters:
        directive - ExtensibilityDirectiveData
        Throws:
        freemarker.template.TemplateException
        java.io.IOException
      • findContentModelElement

        ContentModelElement findContentModelElement​(java.lang.String id)

        Finds a specific ContentModelElement (with the supplied identifier) in the model.

        Parameters:
        id - String
        Returns:
        ContentModelElement
      • getAdditionalContentElements

        java.util.List<ExtensibilityModelElement> getAdditionalContentElements()

        Retrieves the list of elements being generated as part of extension processing.

        Returns:
        List