Search in sources :

Example 1 with UseCaseEventOverviewPlantUmlGenerator

use of com.mercedesbenz.sechub.docgen.messaging.UseCaseEventOverviewPlantUmlGenerator 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);
}
Also used : UseCaseIdentifier(com.mercedesbenz.sechub.sharedkernel.usecases.UseCaseIdentifier) Set(java.util.Set) UseCaseEventMessageLinkAsciidocGenerator(com.mercedesbenz.sechub.docgen.messaging.UseCaseEventMessageLinkAsciidocGenerator) UseCaseEventMessageLinkAsciidocGenerator(com.mercedesbenz.sechub.docgen.messaging.UseCaseEventMessageLinkAsciidocGenerator) UseCaseEventOverviewPlantUmlGenerator(com.mercedesbenz.sechub.docgen.messaging.UseCaseEventOverviewPlantUmlGenerator) Logger(ch.qos.logback.classic.Logger) File(java.io.File)

Aggregations

Logger (ch.qos.logback.classic.Logger)1 UseCaseEventMessageLinkAsciidocGenerator (com.mercedesbenz.sechub.docgen.messaging.UseCaseEventMessageLinkAsciidocGenerator)1 UseCaseEventOverviewPlantUmlGenerator (com.mercedesbenz.sechub.docgen.messaging.UseCaseEventOverviewPlantUmlGenerator)1 UseCaseIdentifier (com.mercedesbenz.sechub.sharedkernel.usecases.UseCaseIdentifier)1 File (java.io.File)1 Set (java.util.Set)1