Uploaded image for project: 'Kernel'
  1. Kernel
  2. KNL-899

StorageUser interface is overly large and should be split

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0
    • Fix Version/s: 10.0
    • Component/s: API, Impl, Utils
    • Labels:
      None

      Description

      StorageUser is implemented by services which use the Single/Double storage classes in the sakai-kernel-storage-util. The same interface is used across both Single and Double storage even though Single storage only uses less that half of the methods in StorageUser. In classes that implement StorageUser but only use Single Storage there are lots of methods that have to be implemented but just return null. This is confusing for people reading the code.

      I'd like to suggest splitting them and removing the methods that are no longer needed.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Repository Revision Date User Message
              Sakai Trunk Repository #105669 Mon Mar 12 06:56:47 CDT 2012 matthew.buckett@oucs.ox.ac.uk KNL-899 Split storageUser interface as it's too large and lots of implementation have methods returning null.

              There is now SingleStorageUser and DoubleStorageUser dependending on which Storage implementation the class is going to use.
              Files Changed
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/event/impl/BaseNotificationService.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/user/impl/DbUserService.java
              MODIFY /kernel/trunk/api/src/main/java/org/sakaiproject/entity/api/serialize/EntityReaderHandler.java
              ADD /kernel/trunk/api/src/main/java/org/sakaiproject/util/SingleStorageUser.java
              MODIFY /kernel/trunk/kernel-storage-util/src/main/java/org/sakaiproject/util/BaseDbFlatStorage.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/user/impl/BasePreferencesService.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/email/impl/DbDigestService.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/content/impl/ContentHostingHandlerResolverImpl.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/site/impl/BaseSiteService.java
              MODIFY /kernel/trunk/api/src/main/java/org/sakaiproject/util/DbSingleStorage.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/event/impl/DbNotificationService.java
              ADD /kernel/trunk/api/src/main/java/org/sakaiproject/util/DoubleStorageUser.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/content/impl/DbContentService.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/alias/impl/DbAliasService.java
              MODIFY /kernel/trunk/kernel-storage-util/src/main/java/org/sakaiproject/util/EntityReaderAdapter.java
              MODIFY /kernel/trunk/kernel-storage-util/src/main/java/org/sakaiproject/util/BaseXmlFileStorage.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/user/impl/BaseUserDirectoryService.java
              MODIFY /kernel/trunk/kernel-storage-util/src/main/java/org/sakaiproject/util/BaseDbDualSingleStorage.java
              MODIFY /kernel/trunk/kernel-storage-util/src/main/java/org/sakaiproject/util/BaseDbSingleStorage.java
              MODIFY /kernel/trunk/kernel-storage-util/src/main/java/org/sakaiproject/util/BaseDbBinarySingleStorage.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/user/impl/DbPreferencesService.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/authz/impl/BaseAuthzGroupService.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/email/impl/BaseDigestService.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/alias/impl/BaseAliasService.java
              MODIFY /kernel/trunk/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java
              MODIFY /kernel/trunk/api/src/main/java/org/sakaiproject/util/StorageUser.java
              MODIFY /kernel/trunk/kernel-storage-util/src/main/java/org/sakaiproject/util/BaseDbDoubleStorage.java

                People

                • Assignee:
                  buckett Matthew Buckett
                  Reporter:
                  buckett Matthew Buckett
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code