class AbstractModuleRepositoriesServiceImpl implements ModuleRepositoriesService {

    @Override
    public ModuleRepositories create(final Path path) {
        final org.uberfire.java.nio.file.Path nioPath = Paths.convert(path);
        if (ioService.exists(nioPath)) {
            throw new FileAlreadyExistsException(path.toString());
        }

        try {
            ioService.startBatch(nioPath.getFileSystem(),
                                 commentedOptionFactory.makeCommentedOption("Creating " + path.toString() + "..."));

            final T project = getModule(path);
            final Set<MavenRepositoryMetadata> content = new HashSet<MavenRepositoryMetadata>();
            if (project == null) {
                content.addAll(repositoryResolver.getRemoteRepositoriesMetaData());
            } else {
                content.addAll(repositoryResolver.getRemoteRepositoriesMetaData(project));
            }

            final ModuleRepositories repositories = createProjectRepositories(content);
            ioService.write(Paths.convert(path),
                            contentHandler.toString(repositories));

            return repositories;
        } finally {
            ioService.endBatch();
        }
    }

    public  AbstractModuleRepositoriesServiceImpl();
    public  AbstractModuleRepositoriesServiceImpl(final IOService ioService,
                                                 final ModuleRepositoryResolver repositoryResolver,
                                                 final ModuleRepositoriesContentHandler contentHandler,
                                                 final CommentedOptionFactory commentedOptionFactory);

}