Class PreferenceStorageImpl

  • All Implemented Interfaces:
    org.uberfire.preferences.shared.PreferenceStorage

    @ApplicationScoped
    public class PreferenceStorageImpl
    extends Object
    implements org.uberfire.preferences.shared.PreferenceStorage
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PreferenceStorageImpl()  
        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)  
      void delete​(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key)  
      boolean exists​(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, String key)  
      boolean exists​(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key)  
      void init()  
      <T> T read​(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, String key)  
      <T> T read​(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)  
      void write​(org.uberfire.preferences.shared.PreferenceScope preferenceScope, String key, Object value)  
    • Field Detail

      • 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

      • exists

        public boolean exists​(org.uberfire.preferences.shared.PreferenceScope preferenceScope,
                              String key)
        Specified by:
        exists in interface org.uberfire.preferences.shared.PreferenceStorage
      • exists

        public boolean exists​(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo,
                              String key)
        Specified by:
        exists in interface org.uberfire.preferences.shared.PreferenceStorage
      • read

        public <T> T read​(org.uberfire.preferences.shared.PreferenceScope preferenceScope,
                          String key)
        Specified by:
        read in interface org.uberfire.preferences.shared.PreferenceStorage
      • read

        public <T> T read​(org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo,
                          String key)
        Specified by:
        read in interface org.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:
        readWithScope in interface org.uberfire.preferences.shared.PreferenceStorage
      • write

        public void write​(org.uberfire.preferences.shared.PreferenceScope preferenceScope,
                          String key,
                          Object value)
        Specified by:
        write in interface org.uberfire.preferences.shared.PreferenceStorage
      • delete

        public void delete​(org.uberfire.preferences.shared.PreferenceScope preferenceScope,
                           String key)
        Specified by:
        delete in interface org.uberfire.preferences.shared.PreferenceStorage
      • allKeys

        public Collection<String> allKeys​(org.uberfire.preferences.shared.PreferenceScope scope)
        Specified by:
        allKeys in interface org.uberfire.preferences.shared.PreferenceStorage
      • allKeys

        public Collection<String> allKeys​(List<org.uberfire.preferences.shared.PreferenceScope> scopes)
        Specified by:
        allKeys in interface org.uberfire.preferences.shared.PreferenceStorage