Class MessageSetScanner

java.lang.Object
org.odpi.openmetadata.reports.messages.MessageSetScanner

public class MessageSetScanner extends Object
MessageSetScanner walks the Egeria source tree looking for the enums that implement one of the message set interfaces. Scanning the source - rather than the class path - means that the documentation covers every message set in the repository, including those defined in modules that are not part of the OMAG Server Platform assembly, and it keeps this utility free of a dependency on all of them.
  • Constructor Details

    • MessageSetScanner

      public MessageSetScanner(Path repositoryRoot)
      Constructor.
      Parameters:
      repositoryRoot - root directory of the Egeria repository
  • Method Details

    • scanForMessageSets

      public List<MessageSetDescription> scanForMessageSets() throws IOException, MessageSetParsingException
      Find and parse every message set in the repository.
      Returns:
      the message sets, sorted by name
      Throws:
      IOException - the source tree could not be read
      MessageSetParsingException - a message set could not be understood - the caller should fail the build rather than publish incomplete documentation
    • scanForSeverities

      public Map<String,AuditLogSeverityDescription> scanForSeverities() throws IOException
      Read the audit log severities out of the audit log framework so that the documentation explains each severity in the framework's own words.
      Returns:
      map of severity name to its description, in the order that they are declared
      Throws:
      IOException - the audit log framework's source could not be read