@Test public void testSaveNonClashingGAVChangeToGAV() { when(pathToPom.toURI()).thenReturn("default: final ProjectScreenModel model = new ProjectScreenModel(); model.setPOM(new POM(new GAV("groupId", "artifactId", "2.0.0"))); model.setPOMMetaData(pomMetaData); model.setPathToPOM(pathToPom); model.setKModule(kmodule); model.setKModuleMetaData(kmoduleMetaData); model.setPathToKModule(pathToKieModule); model.setProjectImports(projectImports); model.setProjectImportsMetaData(projectImportsMetaData); model.setPathToImports(pathToModuleImports); model.setRepositories(moduleRepositories); model.setPathToRepositories(pathToModuleRepositories); final String comment = "comment"; service.save(pathToPom, model, comment); verify(repositoryResolver, times(1)).getRepositoriesResolvingArtifact(eq(model.getPOM().getGav()), eq(module)); verify(ioService, times(1)).startBatch(any(FileSystem.class), any(CommentedOption.class)); verify(pomService, times(1)).save(eq(pathToPom), eq(model.getPOM()), eq(pomMetaData), eq(comment)); verify(kModuleService, times(1)).save(eq(pathToKieModule), eq(kmodule), eq(kmoduleMetaData), eq(comment)); verify(importsService, times(1)).save(eq(pathToModuleImports), eq(projectImports), eq(projectImportsMetaData), eq(comment)); verify(repositoriesService, times(1)).save(eq(pathToModuleRepositories), eq(moduleRepositories), eq(comment)); verify(ioService, times(1)).endBatch(); }
@Override public void save(final Path pathToPomXML, final ProjectScreenModel model, final String comment) { save(pathToPomXML, model, comment, DeploymentMode.VALIDATED); }
ProjectScreenServiceImpl implements ProjectScreenService { @Override public void save(final Path pathToPomXML, final ProjectScreenModel model, final String comment) { save(pathToPomXML, model, comment, DeploymentMode.VALIDATED); } }
ProjectScreenServiceImpl implements ProjectScreenService { @Override public void save(final Path pathToPomXML, final ProjectScreenModel model, final String comment) { save(pathToPomXML, model, comment, DeploymentMode.VALIDATED); } ProjectScreenServiceImpl(); @Inject  ProjectScreenServiceImpl(final WorkspaceProjectService projectService,
                                    final RepositoryService repositoryService,
                                    final KieModuleService moduleService,
                                    final ProjectScreenModelLoader loader,
                                    final ProjectScreenModelSaver saver,
                                    final RepositoryCopier repositoryCopier,
                                    final POMService pomService,
                                    final MetadataService metadataService,
                                    final Event<NewProjectEvent> newProjectEvent); }
ProjectScreenServiceImpl implements ProjectScreenService { @Override public void save(final Path pathToPomXML, final ProjectScreenModel model, final String comment) { save(pathToPomXML, model, comment, DeploymentMode.VALIDATED); } ProjectScreenServiceImpl(); @Inject  ProjectScreenServiceImpl(final WorkspaceProjectService projectService,
                                    final RepositoryService repositoryService,
                                    final KieModuleService moduleService,
                                    final ProjectScreenModelLoader loader,
                                    final ProjectScreenModelSaver saver,
                                    final RepositoryCopier repositoryCopier,
                                    final POMService pomService,
                                    final MetadataService metadataService,
                                    final Event<NewProjectEvent> newProjectEvent); @Override ProjectScreenModel load(final Path pathToPom); @Override void save(final Path pathToPomXML,
                     final ProjectScreenModel model,
                     final String comment); @Override WorkspaceProject save(final Path pathToPomXML,
                                 final ProjectScreenModel model,
                                 final String comment,
                                 final DeploymentMode mode); @Override void delete(final WorkspaceProject project); @Override void copy(final WorkspaceProject project,
                     final String newName); @Override void reImport(final Path pathToPomXML); }
ProjectScreenServiceImpl implements ProjectScreenService { @Override public void save(final Path pathToPomXML, final ProjectScreenModel model, final String comment) { save(pathToPomXML, model, comment, DeploymentMode.VALIDATED); } ProjectScreenServiceImpl(); @Inject  ProjectScreenServiceImpl(final WorkspaceProjectService projectService,
                                    final RepositoryService repositoryService,
                                    final KieModuleService moduleService,
                                    final ProjectScreenModelLoader loader,
                                    final ProjectScreenModelSaver saver,
                                    final RepositoryCopier repositoryCopier,
                                    final POMService pomService,
                                    final MetadataService metadataService,
                                    final Event<NewProjectEvent> newProjectEvent); @Override ProjectScreenModel load(final Path pathToPom); @Override void save(final Path pathToPomXML,
                     final ProjectScreenModel model,
                     final String comment); @Override WorkspaceProject save(final Path pathToPomXML,
                                 final ProjectScreenModel model,
                                 final String comment,
                                 final DeploymentMode mode); @Override void delete(final WorkspaceProject project); @Override void copy(final WorkspaceProject project,
                     final String newName); @Override void reImport(final Path pathToPomXML);  }