@Test public void testSetupWorkItemDefinitionElements() throws Exception { final HashMap<String, String> expectedDefinitionElements = new HashMap<>(); doReturn(expectedDefinitionElements).when(service).loadWorkItemDefinitionElements(); service.setupWorkItemDefinitionElements(); final Map<String, String> actualDefinitionElements = service.loadDefinitionElements().getDefinitionElements(); verify(saveAndRenameService).init(service); assertEquals(expectedDefinitionElements, actualDefinitionElements); }
@PostConstruct public void setupWorkItemDefinitionElements() { workItemDefinitionElements = new WorkItemDefinitionElements(loadWorkItemDefinitionElements()); saveAndRenameService.init(this); }
WorkItemsEditorServiceImpl extends KieService<WorkItemsModelContent> implements WorkItemsEditorService { @PostConstruct public void setupWorkItemDefinitionElements() { workItemDefinitionElements = new WorkItemDefinitionElements(loadWorkItemDefinitionElements()); saveAndRenameService.init(this); } }
WorkItemsEditorServiceImpl extends KieService<WorkItemsModelContent> implements WorkItemsEditorService { @PostConstruct public void setupWorkItemDefinitionElements() { workItemDefinitionElements = new WorkItemDefinitionElements(loadWorkItemDefinitionElements()); saveAndRenameService.init(this); } WorkItemsEditorServiceImpl(); @Inject  WorkItemsEditorServiceImpl(final SessionInfo sessionInfo); }
WorkItemsEditorServiceImpl extends KieService<WorkItemsModelContent> implements WorkItemsEditorService { @PostConstruct public void setupWorkItemDefinitionElements() { workItemDefinitionElements = new WorkItemDefinitionElements(loadWorkItemDefinitionElements()); saveAndRenameService.init(this); } WorkItemsEditorServiceImpl(); @Inject  WorkItemsEditorServiceImpl(final SessionInfo sessionInfo); @PostConstruct void setupWorkItemDefinitionElements(); @Override Path create(final Path context,
                       final String fileName,
                       final String content,
                       final String comment); @Override String load(final Path path); @Override WorkItemsModelContent loadContent(final Path path); @Override WorkItemDefinitionElements loadDefinitionElements(); @Override Path save(final Path resource,
                     final String content,
                     final Metadata metadata,
                     final String comment); @Override void delete(final Path path,
                       final String comment); @Override Path rename(final Path path,
                       final String newName,
                       final String comment); @Override Path copy(final Path path,
                     final String newName,
                     final String comment); @Override Path copy(final Path path,
                     final String newName,
                     final Path targetDirectory,
                     final String comment); @Override boolean accepts(final Path path); @Override List<ValidationMessage> validate(final Path path); @Override List<ValidationMessage> validate(final Path path,
                                            final String content); @Override Set<PortableWorkDefinition> loadWorkItemDefinitions(final Path path); @Override Path saveAndRename(final Path path,
                              final String newFileName,
                              final Metadata metadata,
                              final String content,
                              final String comment); }
WorkItemsEditorServiceImpl extends KieService<WorkItemsModelContent> implements WorkItemsEditorService { @PostConstruct public void setupWorkItemDefinitionElements() { workItemDefinitionElements = new WorkItemDefinitionElements(loadWorkItemDefinitionElements()); saveAndRenameService.init(this); } WorkItemsEditorServiceImpl(); @Inject  WorkItemsEditorServiceImpl(final SessionInfo sessionInfo); @PostConstruct void setupWorkItemDefinitionElements(); @Override Path create(final Path context,
                       final String fileName,
                       final String content,
                       final String comment); @Override String load(final Path path); @Override WorkItemsModelContent loadContent(final Path path); @Override WorkItemDefinitionElements loadDefinitionElements(); @Override Path save(final Path resource,
                     final String content,
                     final Metadata metadata,
                     final String comment); @Override void delete(final Path path,
                       final String comment); @Override Path rename(final Path path,
                       final String newName,
                       final String comment); @Override Path copy(final Path path,
                     final String newName,
                     final String comment); @Override Path copy(final Path path,
                     final String newName,
                     final Path targetDirectory,
                     final String comment); @Override boolean accepts(final Path path); @Override List<ValidationMessage> validate(final Path path); @Override List<ValidationMessage> validate(final Path path,
                                            final String content); @Override Set<PortableWorkDefinition> loadWorkItemDefinitions(final Path path); @Override Path saveAndRename(final Path path,
                              final String newFileName,
                              final Metadata metadata,
                              final String content,
                              final String comment);  }