PreferenceStorageImpl implements PreferenceStorage { String buildScopedPreferencePath(final PreferenceScope scope, final String key) { return buildScopePath(scope) + key + FILE_FORMAT; } protected  PreferenceStorageImpl(); @Inject  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); @PostConstruct void init(); @Override boolean exists(final PreferenceScope preferenceScope,
                          final String key); @Override boolean exists(final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo,
                          final String key); @Override T read(final PreferenceScope preferenceScope,
                      final String key); @Override T read(final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo,
                      final String key); @Override PreferenceScopedValue<T> readWithScope(final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo,
                                                      final String key); @Override void write(final PreferenceScope preferenceScope,
                      final String key,
                      final Object value); @Override void delete(final PreferenceScope preferenceScope,
                       final String key); @Override Collection<String> allKeys(final PreferenceScope scope); @Override Collection<String> allKeys(final List<PreferenceScope> scopes); static final String FILE_FORMAT; static final int FILE_FORMAT_SIZE; }
@Test public void buildStoragePathForUserScope() { final String path = preferenceStorageServiceBackendImpl.buildScopedPreferencePath(userEntireApplicationScope, "my.preference.key"); assertEquals("/config/user/my-user/entire-application/entire-application/my.preference.key.preferences", path); }
@Test public void buildStoragePathForGlobalScope() { final String path = preferenceStorageServiceBackendImpl.buildScopedPreferencePath(allUsersEntireApplicationScope, "my.preference.key"); assertEquals("/config/all-users/all-users/entire-application/entire-application/my.preference.key.preferences", path); }