Class StatusWriter.Factory

  • Enclosing interface:
    StatusWriter

    public static class StatusWriter.Factory
    extends Object
    Creates a new instance of StatusWriter using default implementations.

    This class is not intended to be subclassed by clients.

    Since:
    3.5.1
    • Method Detail

      • createXML

        public static StatusWriter createXML()
        Returns a writer that produces an XML stream. This can be convenient if the log must then be processed automatically by another block.
        Returns:
        an XML writer.
      • createHTML

        public static StatusWriter createHTML()
        Returns a writer that produces an HTML stream. This is the recommended implementation if the log is to be read by a developer.
        Returns:
        an HTML writer.
      • createHTML

        public static StatusWriter createHTML​(OperationContext context)
        Returns a writer that produces an HTML stream. This is the recommended implementation if the log is to be read by a developer.

        The created writer will log information collected in Mapping instances used in the specified context, if any.

        Parameters:
        context - the context in which the main operation was executed.
        Returns:
        an HTML writer.
        Since:
        3.6.0
      • createJUnit

        public static StatusWriter createJUnit​(OperationContext context)
        Returns a writer that produces a stream targeted to JUnit non-regression testing.

        Here is the information written out in the log:

        • The list of warnings and errors reported by operations.
        • The list of unresolved references (references registered but for which input elements do not have corresponding primary elements).
        • The traceability mapping between model elements (input to primary and secondary elements).
        • The list of input elements registered in the scope of a transformation and for which no corresponding primary element was created.

        The log is produced in a XML format where elements are sorted in a way that guarantees successive executions to produce the same log order.

        The log content is not necessarily meant to be processed by parsing the XML content. It shall be used to verify a JUnit execution produces the same log as the one registered as 'golden result'.

        Parameters:
        context - the context in which the main operation was executed.
        Returns:
        an XML writer for JUnit non-regression testing.
        Since:
        3.6.0