use of io.fixprotocol._2020.orchestra.repository.StateMachineType in project fix-orchestra by FIXTradingCommunity.
the class DocGenerator method generateActorDetail.
private void generateActorDetail(final Path messagesDocPath, final Path messagesImgPath, final ActorType actor) throws Exception {
final List<Object> stateMachines = actor.getFieldOrFieldRefOrComponent().stream().filter(o -> o instanceof StateMachineType).collect(Collectors.toList());
final Path path = messagesDocPath.resolve(String.format("%s.html", actor.getName()));
try (final STWriterWrapper writer = getWriter(path)) {
final ST stActor = stGroup.getInstanceOf("actorStart");
stActor.add("actor", actor);
stActor.write(writer, templateErrorListener);
final List<Object> members = actor.getFieldOrFieldRefOrComponent();
generateMembers(members, writer);
final ST stActor2 = stGroup.getInstanceOf("actorPart2");
stActor2.add("actor", actor);
stActor2.write(writer, templateErrorListener);
for (final Object stateMachine : stateMachines) {
final ST stStates = stGroup.getInstanceOf("stateMachine");
stStates.add("states", stateMachine);
stStates.write(writer, templateErrorListener);
}
}
for (final Object stateMachine : stateMachines) {
imgGenerator.generateUMLStateMachine(messagesImgPath, pathManager, (StateMachineType) stateMachine, templateErrorListener);
}
}
Aggregations