@SuppressWarnings("unchecked") public Optional<ChannelConnectionCommand> generate(LogicalComponent<?> component) { if (component instanceof LogicalCompositeComponent) { return Optional.empty(); } ChannelConnectionCommand command = new ChannelConnectionCommand(); for (LogicalProducer producer : component.getProducers()) { generateCommand(producer, command); } if (command.getAttachCommands().isEmpty() && command.getDetachCommands().isEmpty()) { return Optional.empty(); } return Optional.of(command); }
@SuppressWarnings("unchecked") public Optional<ChannelConnectionCommand> generate(LogicalComponent<?> component) { if (component instanceof LogicalCompositeComponent) { return Optional.empty(); } ChannelConnectionCommand command = new ChannelConnectionCommand(); for (LogicalProducer producer : component.getProducers()) { generateCommand(producer, command); } if (command.getAttachCommands().isEmpty() && command.getDetachCommands().isEmpty()) { return Optional.empty(); } return Optional.of(command); }
@SuppressWarnings("unchecked") public ChannelConnectionCommand generate(LogicalComponent<?> component, boolean incremental) throws GenerationException { if (component instanceof LogicalCompositeComponent) { return null; } ChannelConnectionCommand command = new ChannelConnectionCommand(); for (LogicalProducer producer : component.getProducers()) { generateCommand(producer, command, incremental); } if (command.getAttachCommands().isEmpty() && command.getDetachCommands().isEmpty()) { return null; } return command; }