@Test public void testLoad() { final DecisionModelResource resource = new DefaultDecisionModelResource(GAV, "namespace", "name", DecisionModelType.DMN, new InputStreamReader(new ByteArrayInputStream(CONTENT.getBytes()))); assertEquals(CONTENT, resource.get().trim()); }
private String load() { StringBuilder sb = new StringBuilder(); try (InputStreamReader isr = resourceReader; BufferedReader reader = new BufferedReader(isr)) { for (String line = reader.readLine(); line != null; line = reader.readLine()) { sb.append(line).append("\n"); } } catch (IOException ioe) { LOG.error(ioe.getMessage()); throw new RuntimeException(ioe); } return sb.toString(); }
DefaultDecisionModelResource implements DecisionModelResource { private String load() { StringBuilder sb = new StringBuilder(); try (InputStreamReader isr = resourceReader; BufferedReader reader = new BufferedReader(isr)) { for (String line = reader.readLine(); line != null; line = reader.readLine()) { sb.append(line).append("\n"); } } catch (IOException ioe) { LOG.error(ioe.getMessage()); throw new RuntimeException(ioe); } return sb.toString(); } }
DefaultDecisionModelResource implements DecisionModelResource { private String load() { StringBuilder sb = new StringBuilder(); try (InputStreamReader isr = resourceReader; BufferedReader reader = new BufferedReader(isr)) { for (String line = reader.readLine(); line != null; line = reader.readLine()) { sb.append(line).append("\n"); } } catch (IOException ioe) { LOG.error(ioe.getMessage()); throw new RuntimeException(ioe); } return sb.toString(); } DefaultDecisionModelResource(GAV gav,
                                        String namespace,
                                        String modelName,
                                        DecisionModelType type,
                                        InputStreamReader resourceReader); }
DefaultDecisionModelResource implements DecisionModelResource { private String load() { StringBuilder sb = new StringBuilder(); try (InputStreamReader isr = resourceReader; BufferedReader reader = new BufferedReader(isr)) { for (String line = reader.readLine(); line != null; line = reader.readLine()) { sb.append(line).append("\n"); } } catch (IOException ioe) { LOG.error(ioe.getMessage()); throw new RuntimeException(ioe); } return sb.toString(); } DefaultDecisionModelResource(GAV gav,
                                        String namespace,
                                        String modelName,
                                        DecisionModelType type,
                                        InputStreamReader resourceReader); @Override GAV getGav(); @Override String getNamespace(); @Override String getModelName(); @Override DecisionModelType getModelType(); @Override String get(); }
DefaultDecisionModelResource implements DecisionModelResource { private String load() { StringBuilder sb = new StringBuilder(); try (InputStreamReader isr = resourceReader; BufferedReader reader = new BufferedReader(isr)) { for (String line = reader.readLine(); line != null; line = reader.readLine()) { sb.append(line).append("\n"); } } catch (IOException ioe) { LOG.error(ioe.getMessage()); throw new RuntimeException(ioe); } return sb.toString(); } DefaultDecisionModelResource(GAV gav,
                                        String namespace,
                                        String modelName,
                                        DecisionModelType type,
                                        InputStreamReader resourceReader); @Override GAV getGav(); @Override String getNamespace(); @Override String getModelName(); @Override DecisionModelType getModelType(); @Override String get();  }