class PreferenceStorageImpl implements PreferenceStorage {

    String buildScopePath(final PreferenceScope scope) {
        if (scope == null) {
            throw new InvalidPreferenceScopeException("The scope must not be null when building a scope path.");
        }

        String path = "/config/";

        for (PreferenceScope currentScope = scope; currentScope != null; currentScope = currentScope.childScope()) {
            path += currentScope.type() + "/" + currentScope.key() + "/";
        }

        return path;
    }

    protected  PreferenceStorageImpl();
    @Inject public  PreferenceStorageImpl(@Named("ioStrategy") final IOService ioService,
                                 final SessionInfo sessionInfo,
                                 @Customizable final PreferenceScopeTypes scopeTypes,
                                 final PreferenceScopeFactory scopeFactory,
                                 final ObjectStorage objectStorage,
                                 final SpacesAPI spaces,
                                 final Event<PreferenceUpdatedEvent> preferenceUpdatedEvent);

}