@Test public void testParseJBPMWorkDefinition() { WorkItemDefinition workItemDefinition = WorkItemDefinitionParser.parse(jbpmWorkDefinition, w -> "uri", dataUriProvider); assertNotNull(workItemDefinition); assertEquals(NAME, workItemDefinition.getName()); assertEquals(CATWGORY, workItemDefinition.getCategory()); assertEquals(DESC, workItemDefinition.getDescription()); assertEquals(DISPLAY_NAME, workItemDefinition.getDisplayName()); assertEquals(DOC, workItemDefinition.getDocumentation()); assertEquals(HANDLER, workItemDefinition.getDefaultHandler()); assertEquals(ICON_DATA, workItemDefinition.getIconDefinition().getIconData()); assertEquals("|param1:String,param2:String|", workItemDefinition.getParameters()); assertEquals("||", workItemDefinition.getResults()); }
public static Collection<WorkItemDefinition> parse(final String content, final Function<WorkDefinitionImpl, String> uriProvider, final Function<String, String> dataUriProvider) throws Exception { final Map<String, WorkDefinitionImpl> definitionMap = parseJBPMWorkItemDefinitions(content, dataUriProvider); return definitionMap.values().stream() .map(wid -> parse(wid, uriProvider, dataUriProvider)) .collect(Collectors.toList()); }
WorkItemDefinitionParser { public static Collection<WorkItemDefinition> parse(final String content, final Function<WorkDefinitionImpl, String> uriProvider, final Function<String, String> dataUriProvider) throws Exception { final Map<String, WorkDefinitionImpl> definitionMap = parseJBPMWorkItemDefinitions(content, dataUriProvider); return definitionMap.values().stream() .map(wid -> parse(wid, uriProvider, dataUriProvider)) .collect(Collectors.toList()); } }
WorkItemDefinitionParser { public static Collection<WorkItemDefinition> parse(final String content, final Function<WorkDefinitionImpl, String> uriProvider, final Function<String, String> dataUriProvider) throws Exception { final Map<String, WorkDefinitionImpl> definitionMap = parseJBPMWorkItemDefinitions(content, dataUriProvider); return definitionMap.values().stream() .map(wid -> parse(wid, uriProvider, dataUriProvider)) .collect(Collectors.toList()); }  }
WorkItemDefinitionParser { public static Collection<WorkItemDefinition> parse(final String content, final Function<WorkDefinitionImpl, String> uriProvider, final Function<String, String> dataUriProvider) throws Exception { final Map<String, WorkDefinitionImpl> definitionMap = parseJBPMWorkItemDefinitions(content, dataUriProvider); return definitionMap.values().stream() .map(wid -> parse(wid, uriProvider, dataUriProvider)) .collect(Collectors.toList()); }  static Collection<WorkItemDefinition> parse(final String content,
                                                       final Function<WorkDefinitionImpl, String> uriProvider,
                                                       final Function<String, String> dataUriProvider); static WorkItemDefinition parse(final WorkDefinitionImpl workDefinition,
                                           final Function<WorkDefinitionImpl, String> uriProvider,
                                           final Function<String, String> dataUriProvider); static String buildDataURIFromURL(final String url); }
WorkItemDefinitionParser { public static Collection<WorkItemDefinition> parse(final String content, final Function<WorkDefinitionImpl, String> uriProvider, final Function<String, String> dataUriProvider) throws Exception { final Map<String, WorkDefinitionImpl> definitionMap = parseJBPMWorkItemDefinitions(content, dataUriProvider); return definitionMap.values().stream() .map(wid -> parse(wid, uriProvider, dataUriProvider)) .collect(Collectors.toList()); }  static Collection<WorkItemDefinition> parse(final String content,
                                                       final Function<WorkDefinitionImpl, String> uriProvider,
                                                       final Function<String, String> dataUriProvider); static WorkItemDefinition parse(final WorkDefinitionImpl workDefinition,
                                           final Function<WorkDefinitionImpl, String> uriProvider,
                                           final Function<String, String> dataUriProvider); static String buildDataURIFromURL(final String url); static final Map<Class<?>, Function<Object, String>> DATA_TYPE_FORMATTERS; static final String ENCODING; }