org.thewonderlemming.c4plantuml.mojo

## Class WatermarkingMojo

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.thewonderlemming.c4plantuml.mojo.AbstractParentMojo
    - - org.thewonderlemming.c4plantuml.mojo.WatermarkingMojo

- All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

      @Mojo(name="watermark",
            defaultPhase=PROCESS_CLASSES)
      public class WatermarkingMojo
      extends AbstractParentMojo

  A MOJO that adds a watermark to the C4 PlantUML files that are contained in the output directory, allowing the generated schemas to hold information on the generation date, the build version and so on.
  Author:
    thewonderlemming

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_COPYRIGHT_NAME` Default copyright name, if none is provided.
    `static DateTimeFormatter` | `DEFAULT_DATE_FORMATTER` Default format for the date, if an invalid formatting pattern or no pattern is provided.
    `static String` | `DEFAULT_WATERMARK_NAME` Default diagram name, if none is provided.
    `static String` | `WATERMARK_FORMAT_STRING` Watermark string pattern.

    - ### Fields inherited from class org.thewonderlemming.c4plantuml.mojo.AbstractParentMojo

      `DEFAULT_SOURCE_FILE_EXTENSION`

    - ### Fields inherited from interface org.apache.maven.plugin.Mojo

      `ROLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WatermarkingMojo()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `doExecute()` Adds watermark to the C4 PlantUML files contained in the output directory.

    - ### Methods inherited from class org.thewonderlemming.c4plantuml.mojo.AbstractParentMojo

      `execute, getCurrentCharset, getOutputDirectory, getProject, getSourceFileExtension, processOutputDirectoryFiles, validateSourceFileExtension`

    - ### Methods inherited from class org.apache.maven.plugin.AbstractMojo

      `getLog, getPluginContext, setLog, setPluginContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_COPYRIGHT_NAME

          public static final String DEFAULT_COPYRIGHT_NAME

      Default copyright name, if none is provided.

      It is the default value for the `copyrightName` property.

      See Also:
        Constant Field Values

    - #### DEFAULT_DATE_FORMATTER

          public static final DateTimeFormatter DEFAULT_DATE_FORMATTER

      Default format for the date, if an invalid formatting pattern or no pattern is provided.

      It defaults to `DateTimeFormatter.ISO_DATE`.

    - #### DEFAULT_WATERMARK_NAME

          public static final String DEFAULT_WATERMARK_NAME

      Default diagram name, if none is provided.

      It is the default value for the `watermarkName` property.

      See Also:
        Constant Field Values

    - #### WATERMARK_FORMAT_STRING

          public static final String WATERMARK_FORMAT_STRING

      Watermark string pattern.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### WatermarkingMojo

          public WatermarkingMojo()

  - ### Method Detail

    - #### doExecute

          protected void doExecute()
                            throws org.apache.maven.plugin.MojoExecutionException,
                                   org.apache.maven.plugin.MojoFailureException

      Adds watermark to the C4 PlantUML files contained in the output directory.

      An abstract method to hold the children classes execution logic.

      Specified by:
        `doExecute` in class `AbstractParentMojo`
      Throws:
        `org.apache.maven.plugin.MojoExecutionException` - if there is an issue with the build that makes it impossible to continue.
        `org.apache.maven.plugin.MojoFailureException` - if there is any other kind of failures.

Copyright © 2020. All rights reserved.