[java-plugin-storage-jdbc] branch main updated: JJDBC-20 - Extend to support EnumeratableStorageService interface

Scott Cantor cantor.2 at osu.edu
Thu Aug 3 19:04:40 UTC 2023


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-plugin-storage-jdbc.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-storage-jdbc.git;a=commit;h=8d94fe20f7da038519defbcbc934f7e54167bb93

The following commit(s) were added to refs/heads/main by this push:
     new 8d94fe2  JJDBC-20 - Extend to support EnumeratableStorageService interface
8d94fe2 is described below

commit 8d94fe20f7da038519defbcbc934f7e54167bb93
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Aug 3 15:04:37 2023 -0400

    JJDBC-20 - Extend to support EnumeratableStorageService interface
    
    https://shibboleth.atlassian.net/browse/JJDBC-20
    
    Stubbed for now to align to test changes.
---
 .../plugin/storage/jdbc/impl/JDBCStorageService.java    | 17 +++++++++++++++--
 .../storage/jdbc/impl/JDBCStorageServiceTest.java       |  4 ++--
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
index 5564a76..9326eb6 100644
--- a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
+++ b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageService.java
@@ -34,6 +34,7 @@ import javax.annotation.Nullable;
 import javax.sql.DataSource;
 
 import org.opensaml.storage.AbstractStorageService;
+import org.opensaml.storage.EnumeratableStorageService;
 import org.opensaml.storage.MutableStorageRecord;
 import org.opensaml.storage.StorageCapabilities;
 import org.opensaml.storage.StorageRecord;
@@ -55,7 +56,8 @@ import net.shibboleth.shared.primitive.StringSupport;
 /**
  * Implementation of {@link org.opensaml.storage.StorageService} that uses native JDBC to persist to a database.
  */
-public final class JDBCStorageService extends AbstractStorageService implements StorageCapabilities {
+public final class JDBCStorageService extends AbstractStorageService
+        implements StorageCapabilities, EnumeratableStorageService {
     
     /** The context, key and value we test the database with. */
     static final String VERIFY_STRING = "net.shibboleth.plugin.storage.jdbc.impl.test";
@@ -1049,6 +1051,14 @@ public final class JDBCStorageService extends AbstractStorageService implements
             }
         }
     }
+    
+    /** {@inheritDoc} */
+    @Nonnull public Iterable<String> getContextKeys(@Nonnull @NotEmpty final String context) throws IOException {
+        
+        // TODO: implement this
+        return CollectionSupport.emptyList();
+    }
+    
 
     /**
      * Check the database and the presence of a uniqueness constraint.
@@ -1206,4 +1216,7 @@ public final class JDBCStorageService extends AbstractStorageService implements
             }
         }
     }
-}
+
+    /** {@inheritDoc} */
+
+}
\ No newline at end of file
diff --git a/jdbc-storage-impl/src/test/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageServiceTest.java b/jdbc-storage-impl/src/test/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageServiceTest.java
index 81f09c5..833f5ba 100644
--- a/jdbc-storage-impl/src/test/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageServiceTest.java
+++ b/jdbc-storage-impl/src/test/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageServiceTest.java
@@ -30,8 +30,8 @@ import java.util.UUID;
 import javax.annotation.Nonnull;
 
 import org.apache.commons.dbcp2.BasicDataSource;
+import org.opensaml.storage.EnumeratableStorageService;
 import org.opensaml.storage.StorageRecord;
-import org.opensaml.storage.StorageService;
 import org.opensaml.storage.testing.StorageServiceTest;
 import org.testng.Assert;
 import org.testng.TestException;
@@ -163,7 +163,7 @@ public class JDBCStorageServiceTest extends StorageServiceTest {
         }
     }
 
-    @Nonnull protected StorageService getStorageService() {
+    @Nonnull protected EnumeratableStorageService getStorageService() {
         assert storageService!=null;
         return storageService;
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list