class GeneralSettingsPresenter extends Section<ProjectScreenModel> {

    @Override
    public Promise<Object> validate() {
        view.hideError();

        return promises.all(

                validateStringIsNotEmpty(pom.getName(), view.getEmptyNameMessage())
                        .then(o -> executeValidation(s -> s.isProjectNameValid(pom.getName()), view.getInvalidNameMessage()))
                        .then(o -> executeValidation(projectService,
                                                     s -> s.spaceHasNoProjectsWithName(libraryPlaces.getActiveWorkspace().getOrganizationalUnit(),
                                                                                       pom.getName(),
                                                                                       libraryPlaces.getActiveWorkspace()),
                                                     view.getDuplicatedProjectNameMessage()))
                        .catch_(this::showErrorAndReject),

                validateStringIsNotEmpty(pom.getGav().getGroupId(), view.getEmptyGroupIdMessage())
                        .then(o -> executeValidation(s -> s.validateGroupId(pom.getGav().getGroupId()), view.getInvalidGroupIdMessage()))
                        .catch_(this::showErrorAndReject),

                validateStringIsNotEmpty(pom.getGav().getArtifactId(), view.getEmptyArtifactIdMessage())
                        .then(o -> executeValidation(s -> s.validateArtifactId(pom.getGav().getArtifactId()), view.getInvalidArtifactIdMessage()))
                        .catch_(this::showErrorAndReject),

                validateStringIsNotEmpty(pom.getGav().getVersion(), view.getEmptyVersionMessage())
                        .then(o -> executeValidation(s -> s.validateGAVVersion(pom.getGav().getVersion()), view.getInvalidVersionMessage()))
                        .catch_(this::showErrorAndReject)
        );
    }

    @Inject public  GeneralSettingsPresenter(final View view,
                                    final Promises promises,
                                    final MenuItem<ProjectScreenModel> menuItem,
                                    final Caller<ValidationService> validationService,
                                    final Caller<WorkspaceProjectService> projectService,
                                    final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                    final GAVPreferences gavPreferences,
                                    final ProjectScopedResolutionStrategySupplier projectScopedResolutionStrategySupplier,
                                    final GitUrlsPresenter gitUrlsPresenter,
                                    final LibraryPlaces libraryPlaces);

}