class ArchetypePreferencesManager {

    public void setDefaultArchetype(final String archetype) {
        archetypePreferences.load();
        if (setDefaultArchetypePreference(archetype)) {
            archetypePreferences.save(getGlobalScope());
        }

        getOuIdentifiers().forEach(identifier -> {
            final PreferenceScopeResolutionStrategyInfo info =
                    workbenchPreferenceScopeResolutionStrategies.getSpaceInfoFor(identifier);

            archetypePreferences.load(info);
            if (setDefaultArchetypePreference(archetype)) {
                archetypePreferences.save(info);
            }
        });
    }

    public  ArchetypePreferencesManager();
    @Inject public  ArchetypePreferencesManager(final PreferenceScopeFactory scopeFactory,
                                       final WorkbenchPreferenceScopeResolutionStrategies workbenchPreferenceScopeResolutionStrategies,
                                       final ArchetypePreferences archetypePreferences,
                                       final OrganizationalUnitService ouService);

}