@Test public void testDoTransformation() { final String fileName = "file.dmn"; final String xml = "<dmn />"; final Metadata metadata = mock(Metadata.class); doReturn(metadata).when(service).buildMetadataInstance(fileName); service.doTransformation(fileName, xml, callback); verify(marshallerService).unmarshall(metadata, xml, callback); }
void doTransformation(final String fileName, final String xml, final ServiceCallback<Diagram> callback) { final Metadata metadata = buildMetadataInstance(fileName); try { marshallerService.unmarshall(metadata, xml, callback); } catch (final Exception e) { GWT.log(e.getMessage(), e); callback.onError(new ClientRuntimeError(new DiagramParsingException(metadata, xml))); } }
DMNClientDiagramServiceImpl extends AbstractKogitoClientDiagramService { void doTransformation(final String fileName, final String xml, final ServiceCallback<Diagram> callback) { final Metadata metadata = buildMetadataInstance(fileName); try { marshallerService.unmarshall(metadata, xml, callback); } catch (final Exception e) { GWT.log(e.getMessage(), e); callback.onError(new ClientRuntimeError(new DiagramParsingException(metadata, xml))); } } }
DMNClientDiagramServiceImpl extends AbstractKogitoClientDiagramService { void doTransformation(final String fileName, final String xml, final ServiceCallback<Diagram> callback) { final Metadata metadata = buildMetadataInstance(fileName); try { marshallerService.unmarshall(metadata, xml, callback); } catch (final Exception e) { GWT.log(e.getMessage(), e); callback.onError(new ClientRuntimeError(new DiagramParsingException(metadata, xml))); } } DMNClientDiagramServiceImpl(); @Inject  DMNClientDiagramServiceImpl(final FactoryManager factoryManager,
                                       final DefinitionManager definitionManager,
                                       final Promises promises,
                                       final DMNMarshallerService marshallerService); }
DMNClientDiagramServiceImpl extends AbstractKogitoClientDiagramService { void doTransformation(final String fileName, final String xml, final ServiceCallback<Diagram> callback) { final Metadata metadata = buildMetadataInstance(fileName); try { marshallerService.unmarshall(metadata, xml, callback); } catch (final Exception e) { GWT.log(e.getMessage(), e); callback.onError(new ClientRuntimeError(new DiagramParsingException(metadata, xml))); } } 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 { void doTransformation(final String fileName, final String xml, final ServiceCallback<Diagram> callback) { final Metadata metadata = buildMetadataInstance(fileName); try { marshallerService.unmarshall(metadata, xml, callback); } catch (final Exception e) { GWT.log(e.getMessage(), e); callback.onError(new ClientRuntimeError(new DiagramParsingException(metadata, xml))); } } 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);  }