class WorkbenchPreferenceScopeTypes implements PreferenceScopeTypes {

    @Override
    public String getDefaultKeyFor(final String type) throws InvalidPreferenceScopeException {
        validateType(type);

        final DefaultKey defaultKey = defaultKeyByType.get(type);

        if (defaultKey == null) {
            throw new InvalidPreferenceScopeException("The type " + type + " does not have a default key.");
        }

        return defaultKey.get();
    }

    protected  WorkbenchPreferenceScopeTypes();
    @Inject public  WorkbenchPreferenceScopeTypes(final UsernameProvider usernameProvider);

}