use of com.mercedesbenz.sechub.docgen.messaging.UseCaseEventMessageLinkAsciidocGenerator in project sechub by mercedes-benz.
the class AsciidocGenerator method main.
public static void main(String[] args) throws Exception {
if (args.length != 1) {
throw new IllegalArgumentException("call with target gen folder as first parameter only!");
}
output(">AsciidocGenerator starting");
Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
// avoid waringings from
root.setLevel(Level.INFO);
Logger reflections = (Logger) LoggerFactory.getLogger("org.reflections");
reflections.setLevel(Level.ERROR);
String path = args[0];
File documentsGenFolder = new File(path);
File documentsFolder = documentsGenFolder.getParentFile();
File diagramsFolder = new File(documentsFolder.getParentFile(), "diagrams");
File diagramsGenFolder = new File(diagramsFolder, "gen");
File systemProperitesFile = createSystemProperyTargetFile(documentsGenFolder);
File pdsSystemProperitesFile = createPDSSystemProperyTargetFile(documentsGenFolder);
File javaLaunchExampleFile = createJavaLaunchExampleTargetFile(documentsGenFolder);
File scheduleDescriptionFile = createScheduleDescriptionTargetFile(documentsGenFolder);
File specialMockValuePropertiesFile = createSpecialMockConfigurationPropertiesTargetFile(documentsGenFolder);
File messagingFile = createMessagingTargetFile(documentsGenFolder);
/* ---------------------- */
/* --- PRE-generation --- */
/* ---------------------- */
File jsonEventDataFolder = new File("./../sechub-integrationtest/build/test-results/event-trace");
UseCaseEventOverviewPlantUmlGenerator usecaseEventOverviewGenerator = new UseCaseEventOverviewPlantUmlGenerator(jsonEventDataFolder, diagramsGenFolder);
usecaseEventOverviewGenerator.generate();
Map<UseCaseIdentifier, Set<String>> useCasetoMessageIdsMap = usecaseEventOverviewGenerator.getUsecaseNameToMessageIdsMap();
UseCaseEventMessageLinkAsciidocGenerator useCaseEventMessageLinkAsciidocGenerator = new UseCaseEventMessageLinkAsciidocGenerator(useCasetoMessageIdsMap, documentsGenFolder);
useCaseEventMessageLinkAsciidocGenerator.generate();
/* ----------------------- */
/* --- Main-generation --- */
/* ----------------------- */
AsciidocGenerator generator = new AsciidocGenerator();
/* SECHUB */
generator.generateExampleFiles(documentsGenFolder);
generator.generateClientParts(documentsGenFolder);
generator.fetchMustBeDocumentParts();
generator.generateSystemPropertiesDescription(systemProperitesFile);
generator.generateJavaLaunchExample(javaLaunchExampleFile);
generator.generateScheduleDescription(scheduleDescriptionFile);
generator.generateMockPropertiesDescription(specialMockValuePropertiesFile);
generator.generateMessagingFiles(messagingFile, diagramsGenFolder);
generator.generateUseCaseFiles(documentsGenFolder, diagramsGenFolder);
generator.generateProfilesOverview(diagramsGenFolder);
/* PDS */
generator.generatePDSUseCaseFiles(documentsGenFolder, diagramsGenFolder);
generator.generatePDSSystemPropertiesDescription(pdsSystemProperitesFile);
}
Aggregations