class PomEditorServiceImpl implements PomEditorService {

    @Override
    public Path save(final Path pomPath,
                     final String pomXml,
                     final Metadata metadata,
                     final String comment,
                     final DeploymentMode mode) {
        if (DeploymentMode.VALIDATED.equals(mode)) {
            checkRepositories(pomPath,
                              pomXml);
        }

        try {
            final org.uberfire.java.nio.file.Path nioPomPath = Paths.convert(pomPath);
            ioService.startBatch(nioPomPath.getFileSystem());
            ioService.write(nioPomPath,
                            pomXml,
                            metadataService.setUpAttributes(pomPath,
                                                            metadata),
                            commentedOptionFactory.makeCommentedOption(comment));

            return pomPath;
        } catch (Exception e) {
            throw ExceptionUtilities.handleException(e);
        } finally {
            ioService.endBatch();
        }
    }

    public  PomEditorServiceImpl();
    @Inject public  PomEditorServiceImpl(final @Named("ioStrategy") IOService ioService,
                                final DefaultEditorService defaultEditorService,
                                final MetadataServerSideService metadataService,
                                final CommentedOptionFactory commentedOptionFactory,
                                final KieModuleService moduleService,
                                final POMContentHandler pomContentHandler,
                                final ModuleRepositoryResolver repositoryResolver,
                                final ModuleRepositoriesService moduleRepositoriesService,
                                final RenameService renameService,
                                final SaveAndRenameServiceImpl<String, Metadata> saveAndRenameService);

}