class DataModelerServiceHelper {

    public Package ensurePackageStructure(final Module module,
                                          final String packageName) {
        if (packageName == null || "".equals(packageName) || module == null) {
            return null;
        }
        final Package defaultPackage = moduleService.resolveDefaultPackage(module);
        final Path defaultPackagePath = Paths.convert(defaultPackage.getPackageMainSrcPath());
        final String newPackageName = packageName.replace(".", "/");
        final Path newPackagePath = defaultPackagePath.resolve(newPackageName);
        if (!ioService.exists(newPackagePath)) {
            return moduleService.newPackage(defaultPackage,
                                            packageName);
        } else {
            return moduleService.resolvePackage(Paths.convert(newPackagePath));
        }
    }

    public  DataModelerServiceHelper();
    @Inject public  DataModelerServiceHelper(final KieModuleService moduleService,
                                    final @Named("ioStrategy") IOService ioService,
                                    final CommentedOptionFactory commentedOptionFactory);

}