use of com.mercedesbenz.sechub.sharedkernel.usecases.UseCaseGroup in project sechub by mercedes-benz.
the class UseCaseRestDocModelAsciiDocGenerator method generateOverview.
private List<List<UseCaseRestDocEntry>> generateOverview(UseCaseRestDocModel model, Context context, int h) {
context.addLine(headline(h) + "Overview");
List<List<UseCaseRestDocEntry>> found = new ArrayList<>();
for (UseCaseGroup group : UseCaseGroup.values()) {
SortedSet<UseCaseEntry> entriesForGroup = model.getUseCaseModel().getGroup(group).getUseCases();
if (entriesForGroup.isEmpty()) {
continue;
}
StringBuilder linksToRestDocs = new StringBuilder();
createEntriesForGroup(model, context, found, entriesForGroup, linksToRestDocs);
boolean foundAtLeastOneRestDocForGroup = linksToRestDocs.length() > 0;
if (!foundAtLeastOneRestDocForGroup) {
continue;
}
context.addLine(headline(h + 1) + group.getTitle());
context.addLine(group.getDescription());
context.addLine("");
context.addLine(linksToRestDocs.toString());
context.addLine("");
}
return found;
}
use of com.mercedesbenz.sechub.sharedkernel.usecases.UseCaseGroup in project sechub by mercedes-benz.
the class UseCaseAsciiDocGenerator method generateOverview.
private void generateOverview(UseCaseModel model, Context context, int headlineLevel) {
context.addLine(headline(headlineLevel) + "Overview about usecase groups");
UseCaseModelType type = model.getType();
switch(type) {
case SECHUB:
for (UseCaseGroup useCaseGroup : UseCaseGroup.values()) {
generateGroupUseCaseLinks(context, headlineLevel, model.getGroup(useCaseGroup));
}
break;
case PDS:
for (PDSUseCaseGroup useCaseGroup : PDSUseCaseGroup.values()) {
generateGroupUseCaseLinks(context, headlineLevel, model.getGroup(useCaseGroup));
}
break;
default:
throw new IllegalArgumentException("Unsupported type:" + type);
}
}
use of com.mercedesbenz.sechub.sharedkernel.usecases.UseCaseGroup in project sechub by mercedes-benz.
the class PDSUseCaseAsciiDocGenerator method generateOverview.
private void generateOverview(UseCaseModel model, Context context, int headlineLevel) {
context.addLine(headline(headlineLevel) + "Overview about usecase groups");
UseCaseModelType type = model.getType();
switch(type) {
case SECHUB:
for (UseCaseGroup useCaseGroup : UseCaseGroup.values()) {
generateGroupUseCaseLinks(context, headlineLevel, model.getGroup(useCaseGroup));
}
break;
case PDS:
for (PDSUseCaseGroup useCaseGroup : PDSUseCaseGroup.values()) {
generateGroupUseCaseLinks(context, headlineLevel, model.getGroup(useCaseGroup));
}
break;
default:
throw new IllegalArgumentException("Unsupported type:" + type);
}
}
Aggregations