@Test public void testMarshall() { final KogitoDiagramResourceImpl resource = mock(KogitoDiagramResourceImpl.class); final Diagram diagram = mock(Diagram.class); when(resource.getType()).thenReturn(PROJECT_DIAGRAM); when(resource.projectDiagram()).thenReturn(Optional.of(diagram)); service.transform(resource); verify(marshallerService).marshall(eq(diagram), any()); }
@Override public void transform(final String fileName, final String xml, final ServiceCallback<Diagram> callback) { if (Objects.isNull(xml) || xml.isEmpty()) { doNewDiagram(fileName, callback); } else { doTransformation(fileName, xml, callback); } }
DMNClientDiagramServiceImpl extends AbstractKogitoClientDiagramService { @Override public void transform(final String fileName, final String xml, final ServiceCallback<Diagram> callback) { if (Objects.isNull(xml) || xml.isEmpty()) { doNewDiagram(fileName, callback); } else { doTransformation(fileName, xml, callback); } } }
DMNClientDiagramServiceImpl extends AbstractKogitoClientDiagramService { @Override public void transform(final String fileName, final String xml, final ServiceCallback<Diagram> callback) { if (Objects.isNull(xml) || xml.isEmpty()) { doNewDiagram(fileName, callback); } else { doTransformation(fileName, xml, callback); } } DMNClientDiagramServiceImpl(); @Inject  DMNClientDiagramServiceImpl(final FactoryManager factoryManager,
                                       final DefinitionManager definitionManager,
                                       final Promises promises,
                                       final DMNMarshallerService marshallerService); }
DMNClientDiagramServiceImpl extends AbstractKogitoClientDiagramService { @Override public void transform(final String fileName, final String xml, final ServiceCallback<Diagram> callback) { if (Objects.isNull(xml) || xml.isEmpty()) { doNewDiagram(fileName, callback); } else { doTransformation(fileName, xml, callback); } } DMNClientDiagramServiceImpl(); @Inject  DMNClientDiagramServiceImpl(final FactoryManager factoryManager,
                                       final DefinitionManager definitionManager,
                                       final Promises promises,
                                       final DMNMarshallerService marshallerService); @Override void transform(final String fileName,
                          final String xml,
                          final ServiceCallback<Diagram> callback); @Override String generateDefaultId(); @Override void transform(final String xml,
                          final ServiceCallback<Diagram> callback); @Override Promise<String> transform(final KogitoDiagramResourceImpl resource); }
DMNClientDiagramServiceImpl extends AbstractKogitoClientDiagramService { @Override public void transform(final String fileName, final String xml, final ServiceCallback<Diagram> callback) { if (Objects.isNull(xml) || xml.isEmpty()) { doNewDiagram(fileName, callback); } else { doTransformation(fileName, xml, callback); } } DMNClientDiagramServiceImpl(); @Inject  DMNClientDiagramServiceImpl(final FactoryManager factoryManager,
                                       final DefinitionManager definitionManager,
                                       final Promises promises,
                                       final DMNMarshallerService marshallerService); @Override void transform(final String fileName,
                          final String xml,
                          final ServiceCallback<Diagram> callback); @Override String generateDefaultId(); @Override void transform(final String xml,
                          final ServiceCallback<Diagram> callback); @Override Promise<String> transform(final KogitoDiagramResourceImpl resource);  }