@Test public void testDeleteForm() { formEditorService.delete(path, COMMIT_MESSAGE); verify(moduleService).resolveModule(path); verify(deleteService).delete(path, COMMIT_MESSAGE); }
@Override public void delete(Path path, String comment) { try { KieModule module = moduleService.resolveModule(path); if (module == null) { logger.warn("Form : " + path.toURI() + " does not belong to a valid module"); return; } deleteService.delete(path, comment); } catch (final Exception e) { logger.error("Form: " + path.toURI() + " couldn't be deleted due to the following error. ", e); } }
FormEditorServiceImpl extends KieService<FormModelerContent> implements FormEditorService { @Override public void delete(Path path, String comment) { try { KieModule module = moduleService.resolveModule(path); if (module == null) { logger.warn("Form : " + path.toURI() + " does not belong to a valid module"); return; } deleteService.delete(path, comment); } catch (final Exception e) { logger.error("Form: " + path.toURI() + " couldn't be deleted due to the following error. ", e); } } }
FormEditorServiceImpl extends KieService<FormModelerContent> implements FormEditorService { @Override public void delete(Path path, String comment) { try { KieModule module = moduleService.resolveModule(path); if (module == null) { logger.warn("Form : " + path.toURI() + " does not belong to a valid module"); return; } deleteService.delete(path, comment); } catch (final Exception e) { logger.error("Form: " + path.toURI() + " couldn't be deleted due to the following error. ", e); } } @Inject  FormEditorServiceImpl(@Named("ioStrategy") IOService ioService,
                                 SessionInfo sessionInfo,
                                 Event<ResourceOpenedEvent> resourceOpenedEvent,
                                 FieldManager fieldManager,
                                 FormModelHandlerManager modelHandlerManager,
                                 KieModuleService moduleService,
                                 FormDefinitionSerializer formDefinitionSerializer,
                                 ModuleFormFinderService moduleFormFinderService,
                                 DeleteService deleteService,
                                 CommentedOptionFactory commentedOptionFactory,
                                 RenameService renameService,
                                 CopyService copyService); }
FormEditorServiceImpl extends KieService<FormModelerContent> implements FormEditorService { @Override public void delete(Path path, String comment) { try { KieModule module = moduleService.resolveModule(path); if (module == null) { logger.warn("Form : " + path.toURI() + " does not belong to a valid module"); return; } deleteService.delete(path, comment); } catch (final Exception e) { logger.error("Form: " + path.toURI() + " couldn't be deleted due to the following error. ", e); } } @Inject  FormEditorServiceImpl(@Named("ioStrategy") IOService ioService,
                                 SessionInfo sessionInfo,
                                 Event<ResourceOpenedEvent> resourceOpenedEvent,
                                 FieldManager fieldManager,
                                 FormModelHandlerManager modelHandlerManager,
                                 KieModuleService moduleService,
                                 FormDefinitionSerializer formDefinitionSerializer,
                                 ModuleFormFinderService moduleFormFinderService,
                                 DeleteService deleteService,
                                 CommentedOptionFactory commentedOptionFactory,
                                 RenameService renameService,
                                 CopyService copyService); @Override FormModelerContent loadContent(Path path); @Override Path createForm(Path path,
                           String formName,
                           FormModel formModel); @Override void delete(Path path,
                       String comment); @Override Path save(Path path,
                     FormModelerContent content,
                     Metadata metadata,
                     String comment); @Override FormModelerContent rename(Path path,
                                     String newFileName,
                                     String commitMessage,
                                     boolean saveBeforeRenaming,
                                     FormModelerContent content,
                                     Metadata metadata); @Override void copy(Path path,
                     String newFileName,
                     String commitMessage,
                     boolean saveBeforeCopying,
                     FormModelerContent content,
                     Metadata metadata); }
FormEditorServiceImpl extends KieService<FormModelerContent> implements FormEditorService { @Override public void delete(Path path, String comment) { try { KieModule module = moduleService.resolveModule(path); if (module == null) { logger.warn("Form : " + path.toURI() + " does not belong to a valid module"); return; } deleteService.delete(path, comment); } catch (final Exception e) { logger.error("Form: " + path.toURI() + " couldn't be deleted due to the following error. ", e); } } @Inject  FormEditorServiceImpl(@Named("ioStrategy") IOService ioService,
                                 SessionInfo sessionInfo,
                                 Event<ResourceOpenedEvent> resourceOpenedEvent,
                                 FieldManager fieldManager,
                                 FormModelHandlerManager modelHandlerManager,
                                 KieModuleService moduleService,
                                 FormDefinitionSerializer formDefinitionSerializer,
                                 ModuleFormFinderService moduleFormFinderService,
                                 DeleteService deleteService,
                                 CommentedOptionFactory commentedOptionFactory,
                                 RenameService renameService,
                                 CopyService copyService); @Override FormModelerContent loadContent(Path path); @Override Path createForm(Path path,
                           String formName,
                           FormModel formModel); @Override void delete(Path path,
                       String comment); @Override Path save(Path path,
                     FormModelerContent content,
                     Metadata metadata,
                     String comment); @Override FormModelerContent rename(Path path,
                                     String newFileName,
                                     String commitMessage,
                                     boolean saveBeforeRenaming,
                                     FormModelerContent content,
                                     Metadata metadata); @Override void copy(Path path,
                     String newFileName,
                     String commitMessage,
                     boolean saveBeforeCopying,
                     FormModelerContent content,
                     Metadata metadata); static final String SHORT_KEY; static final String LONG_KEY; }