class WorkspaceProjectServiceImpl implements WorkspaceProjectService {

    String createFreshRepositoryAlias(final OrganizationalUnit organizationalUnit,
                                      final String projectName) {
        int index = 0;
        String suffix = "";
        String repositoryAlias = checkNotNull("project name in pom model", NewWorkspaceProjectUtils.sanitizeProjectName(projectName));

        while (repositoryService.getRepositoryFromSpace(organizationalUnit.getSpace(), repositoryAlias + suffix) != null) {
            suffix = "-" + ++index;
        }

        return repositoryAlias + suffix;
    }

    public  WorkspaceProjectServiceImpl();
    @Inject public  WorkspaceProjectServiceImpl(final OrganizationalUnitService organizationalUnitService,
                                       final RepositoryService repositoryService,
                                       final SpacesAPI spaces,
                                       final Event<NewProjectEvent> newProjectEvent,
                                       final Event<RepositoryUpdatedEvent> repositoryUpdatedEvent,
                                       final Event<NewBranchEvent> newBranchEvent,
                                       final Instance<ModuleService<? extends Module>> moduleServices,
                                       final ModuleRepositoryResolver repositoryResolver,
                                       @Named("ioStrategy") final IOService ioService,
                                       final SpaceConfigStorageRegistry spaceConfigStorageRegistry,
                                       final PathUtil pathUtil,
                                       final ChangeRequestService changeRequestService,
                                       final POMService pomService);

}