Package com.sodius.mdw.core.operations
Class StatusWriter.Factory
- java.lang.Object
-
- com.sodius.mdw.core.operations.StatusWriter.Factory
-
- Enclosing interface:
- StatusWriter
public static class StatusWriter.Factory extends Object
Creates a new instance ofStatusWriterusing default implementations.This class is not intended to be subclassed by clients.
- Since:
- 3.5.1
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StatusWritercreateHTML()Returns a writer that produces an HTML stream.static StatusWritercreateHTML(OperationContext context)Returns a writer that produces an HTML stream.static StatusWritercreateJUnit(OperationContext context)Returns a writer that produces a stream targeted to JUnit non-regression testing.static StatusWritercreateXML()Returns a writer that produces an XML stream.
-
-
-
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
Mappinginstances 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
-
-