class AbstractModuleService implements ModuleServiceCore<T>,
                   ModuleFactory<T> {

    @Override
    public void createModuleDirectories(final Path repositoryRoot) {
        final org.uberfire.java.nio.file.Path modulePath = Paths.convert(repositoryRoot);

        try {
            ioService.startBatch(modulePath.getFileSystem(),
                                 commentedOptionFactory.makeCommentedOption("Adding module directories"));

            final Path mainResourcesPath = Paths.convert(modulePath.resolve(ModuleResourcePaths.MAIN_RESOURCES_PATH));
            final Package defaultPackage = resourceResolver.resolvePackage(mainResourcesPath);

            final Path pomPath = Paths.convert(modulePath.resolve(POMServiceImpl.POM_XML));
            final POM modulePom = pomService.load(pomPath);
            final String workspacePath = resourceResolver.getDefaultWorkspacePath(modulePom.getGav());

            resourceResolver.newPackage(defaultPackage,
                                        workspacePath,
                                        false);
        } finally {
            ioService.endBatch();
        }
    }

    protected  AbstractModuleService();
    public  AbstractModuleService(final IOService ioService,
                                 final POMService pomService,
                                 final RepositoryService repoService,
                                 final Event<NewModuleEvent> newModuleEvent,
                                 final Event<NewPackageEvent> newPackageEvent,
                                 final Event<InvalidateDMOModuleCacheEvent> invalidateDMOCache,
                                 final SessionInfo sessionInfo,
                                 final CommentedOptionFactory commentedOptionFactory,
                                 final ModuleFinder moduleFinder,
                                 final ResourceResolver resourceResolver);

}