Package org.uberfire.preferences.backend
Class PreferenceStorageImpl
- java.lang.Object
-
- org.uberfire.preferences.backend.PreferenceStorageImpl
-
- All Implemented Interfaces:
org.uberfire.preferences.shared.PreferenceStorage
@ApplicationScoped public class PreferenceStorageImpl extends Object implements org.uberfire.preferences.shared.PreferenceStorage
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILE_FORMATstatic intFILE_FORMAT_SIZE
-
Constructor Summary
Constructors Modifier Constructor Description protectedPreferenceStorageImpl()PreferenceStorageImpl(org.uberfire.io.IOService ioService, org.uberfire.rpc.SessionInfo sessionInfo, org.uberfire.preferences.shared.PreferenceScopeTypes scopeTypes, org.uberfire.preferences.shared.PreferenceScopeFactory scopeFactory, org.uberfire.backend.server.io.object.ObjectStorage objectStorage, org.uberfire.spaces.SpacesAPI spaces, javax.enterprise.event.Event<org.uberfire.preferences.shared.event.PreferenceUpdatedEvent> preferenceUpdatedEvent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>allKeys(List<org.uberfire.preferences.shared.PreferenceScope> scopes)Collection<String>allKeys(org.uberfire.preferences.shared.PreferenceScope scope)voiddelete(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key)booleanexists(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, String key)booleanexists(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key)voidinit()<T> Tread(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, String key)<T> Tread(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key)<T> org.uberfire.preferences.shared.impl.PreferenceScopedValue<T>readWithScope(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, String key)voidwrite(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key, Object value)
-
-
-
Field Detail
-
FILE_FORMAT
public static final String FILE_FORMAT
- See Also:
- Constant Field Values
-
FILE_FORMAT_SIZE
public static final int FILE_FORMAT_SIZE
-
-
Constructor Detail
-
PreferenceStorageImpl
protected PreferenceStorageImpl()
-
PreferenceStorageImpl
@Inject public PreferenceStorageImpl(@Named("ioStrategy") org.uberfire.io.IOService ioService, org.uberfire.rpc.SessionInfo sessionInfo, org.uberfire.preferences.shared.PreferenceScopeTypes scopeTypes, org.uberfire.preferences.shared.PreferenceScopeFactory scopeFactory, org.uberfire.backend.server.io.object.ObjectStorage objectStorage, org.uberfire.spaces.SpacesAPI spaces, javax.enterprise.event.Event<org.uberfire.preferences.shared.event.PreferenceUpdatedEvent> preferenceUpdatedEvent)
-
-
Method Detail
-
init
@PostConstruct public void init()
-
exists
public boolean exists(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key)- Specified by:
existsin interfaceorg.uberfire.preferences.shared.PreferenceStorage
-
exists
public boolean exists(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, String key)- Specified by:
existsin interfaceorg.uberfire.preferences.shared.PreferenceStorage
-
read
public <T> T read(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key)- Specified by:
readin interfaceorg.uberfire.preferences.shared.PreferenceStorage
-
read
public <T> T read(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, String key)- Specified by:
readin interfaceorg.uberfire.preferences.shared.PreferenceStorage
-
readWithScope
public <T> org.uberfire.preferences.shared.impl.PreferenceScopedValue<T> readWithScope(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, String key)- Specified by:
readWithScopein interfaceorg.uberfire.preferences.shared.PreferenceStorage
-
write
public void write(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key, Object value)- Specified by:
writein interfaceorg.uberfire.preferences.shared.PreferenceStorage
-
delete
public void delete(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key)- Specified by:
deletein interfaceorg.uberfire.preferences.shared.PreferenceStorage
-
allKeys
public Collection<String> allKeys(org.uberfire.preferences.shared.PreferenceScope scope)
- Specified by:
allKeysin interfaceorg.uberfire.preferences.shared.PreferenceStorage
-
allKeys
public Collection<String> allKeys(List<org.uberfire.preferences.shared.PreferenceScope> scopes)
- Specified by:
allKeysin interfaceorg.uberfire.preferences.shared.PreferenceStorage
-
-