class AddArchetypeModalPresenter implements HasBusyIndicator {

    public void add() {
        final String archetypeGroupId = view.getArchetypeGroupId();
        final String archetypeArtifactId = view.getArchetypeArtifactId();
        final String archetypeVersion = view.getArchetypeVersion();

        validateFields(archetypeGroupId,
                       archetypeArtifactId,
                       archetypeVersion,
                       () -> {
                           beginAddArchetype();
                           final GAV archetypeGAV = new GAV(archetypeGroupId.trim(),
                                                            archetypeArtifactId.trim(),
                                                            archetypeVersion.trim());

                           archetypeService.call(v -> {
                               endAddArchetype();
                               hide();
                           }, addActionErrorCallback()).add(archetypeGAV);
                       });
    }

    @Inject public  AddArchetypeModalPresenter(final View view,
                                      final TranslationService ts,
                                      final Caller<ArchetypeService> archetypeService,
                                      final BusyIndicatorView busyIndicatorView);

}