[java-identity-provider] branch main updated: IDP-1665 Remove "module function" from Plugin API

Rod Widdowson rdw at steadingsoftware.com
Mon Sep 21 14:25:50 UTC 2020


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

rdw pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=144e8d9e5623123c4b2d75638f5376854247d598

The following commit(s) were added to refs/heads/main by this push:
       new  144e8d9e5 IDP-1665  Remove "module function" from Plugin API
144e8d9e5 is described below

commit 144e8d9e5623123c4b2d75638f5376854247d598
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Sep 21 15:16:43 2020 +0100

    IDP-1665  Remove "module function" from Plugin API
    
    https://issues.shibboleth.net/jira/browse/IDP-1665
    
    More specifically remote all the property management functions.
    Also supress all tests relying on existing plugins - the API is changing.
---
 .../idp/plugin/AbstractPluginDescription.java       | 10 ----------
 .../shibboleth/idp/plugin/PluginDescription.java    | 21 ---------------------
 .../idp/installer/plugin/impl/PluginInstaller.java  |  9 ---------
 .../idp/installer/plugin/impl/PluginCLITest.java    | 10 +++++-----
 .../installer/plugin/impl/PluginInstallerTest.java  |  2 +-
 5 files changed, 6 insertions(+), 46 deletions(-)

diff --git a/idp-admin-api/src/main/java/net/shibboleth/idp/plugin/AbstractPluginDescription.java b/idp-admin-api/src/main/java/net/shibboleth/idp/plugin/AbstractPluginDescription.java
index 9adf9ef57..e3bc3c8fd 100644
--- a/idp-admin-api/src/main/java/net/shibboleth/idp/plugin/AbstractPluginDescription.java
+++ b/idp-admin-api/src/main/java/net/shibboleth/idp/plugin/AbstractPluginDescription.java
@@ -33,11 +33,6 @@ import net.shibboleth.utilities.java.support.collection.Pair;
  */
 public abstract class AbstractPluginDescription implements PluginDescription {
     
-    /** {@inheritDoc} */
-    @Nonnull public List<String> getAdditionalPropertyFiles() {
-        return Collections.emptyList();
-    }
-    
     /** {@inheritDoc} */
     @Nonnull public List<Path> getFilePathsToCopy() {
         return Collections.emptyList();
@@ -47,11 +42,6 @@ public abstract class AbstractPluginDescription implements PluginDescription {
     @Nonnull public List<Pair<URL, Path>> getExternalFilePathsToCopy() throws IOException {
         return Collections.emptyList();
     }
-
-    /** {@inheritDoc} */
-    @Nonnull public List<Pair<Path, List<String>>> getPropertyMerges() {
-        return Collections.emptyList();
-    }
     
     /** {@inheritDoc} */
     @Nonnegative public int getPatchVersion() {
diff --git a/idp-admin-api/src/main/java/net/shibboleth/idp/plugin/PluginDescription.java b/idp-admin-api/src/main/java/net/shibboleth/idp/plugin/PluginDescription.java
index efdeca8f8..edbe2d185 100644
--- a/idp-admin-api/src/main/java/net/shibboleth/idp/plugin/PluginDescription.java
+++ b/idp-admin-api/src/main/java/net/shibboleth/idp/plugin/PluginDescription.java
@@ -46,12 +46,6 @@ public interface PluginDescription {
      */
     @Nonnull @NotEmpty public String getPluginId();
 
-    /** Return the list of file names to be appended to
-     * <code>idp.additional.properties</code>.
-     * @return The list of names, potentially empty.
-     */
-    @Nonnull public List<String> getAdditionalPropertyFiles();
-    
     /** Return the list of (idp.home) relative paths (of files, <em>not directories </em>) 
      * to copy from the distribution into the IdP installation.
      *
@@ -88,21 +82,6 @@ public interface PluginDescription {
      */
     @Nonnull @NonnullElements public List<URL> getUpdateURLs() throws IOException;
     
-    /** Return this properties that require list merging.  
-     * 
-     * <em>Not currently supported</em>
-     * 
-     * <p>Given
-     * an property called (say) <code>idp.service.foo</code> in file <code>services.property</code>
-     * and an init setting of <code>idp.service.foo.bar</code>, the output would be:</p>
-     * <pre> idp.service.foo = BEAN.idp.service.foo.plugin-id.net.shibboleth.foo
-     * idp.service.foo.OLD.plugin-id = shibboleth.AttributeFilterResources</pre>
-     *
-     * @return A list of pairs, the first element of the pair is the (relative) path of the property file
-     * and the second is a list of property names to edit within that file.
-     */
-    @Nonnull public List<Pair<Path, List<String>>> getPropertyMerges();
-    
     /** Return the major version, (as defined by the 
      * <a href="https://wiki.shibboleth.net/confluence/display/DEV/Java+Product+Version+Policy">
      * Java Product Version Policy</a>.
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstaller.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstaller.java
index be9b72541..28226a045 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstaller.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstaller.java
@@ -232,15 +232,6 @@ public final class PluginInstaller extends AbstractInitializableComponent implem
         LOG.info("Installing Plugin {} version {}.{}.{}", pluginId,
                 description.getMajorVersion(),description.getMinorVersion(), description.getPatchVersion());
 
-        if (!description.getAdditionalPropertyFiles().isEmpty()) {
-            LOG.error("Additional property files not supported");
-            throw new BuildException("Uninstallable plugin");
-        }
-        if (!description.getPropertyMerges().isEmpty()) {
-            LOG.error("Prroperty merges not supported");
-            throw new BuildException("Uninstallable plugin");
-        }
-
         final Path myWebApp = idpHome.resolve("dist").resolve("edit-webapp-" + pluginId);
 
         InstallerSupport.setReadOnly(myWebApp, false);
diff --git a/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginCLITest.java b/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginCLITest.java
index b240d0f70..478108bc3 100644
--- a/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginCLITest.java
+++ b/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginCLITest.java
@@ -51,31 +51,31 @@ public class PluginCLITest extends BasePluginTest {
         assertEquals(PluginInstallerCLI.runMain(new String[] { "-fl", } ), AbstractCommandLine.RC_OK);
     }
 
-    @Test(enabled = true) public void testWrong() {
+    @Test(enabled = false) public void testWrong() {
         assertEquals(PluginInstallerCLI.runMain(new String[] { "-i", "a"}), AbstractCommandLine.RC_INIT);
     }
 
-    @Test(enabled = true, dependsOnMethods = {"testRhinoLocal"}) public void testRhinoWeb() {
+    @Test(enabled = false, dependsOnMethods = {"testRhinoLocal"}) public void testRhinoWeb() {
             assertEquals(PluginInstallerCLI.runMain(new String[] { 
                     "-i", RHINO_DISTRO,
                     "-p", "net.shibboleth.idp.plugin.rhino"}),
                     AbstractCommandLine.RC_OK);
     }
 
-    @Test(dependsOnMethods = {"testRhinoWeb"})  public void testUpdate() {
+    @Test(enabled = false, dependsOnMethods = {"testRhinoWeb"})  public void testUpdate() {
         assertEquals(PluginInstallerCLI.runMain(new String[] {
                 "-u", "net.shibboleth.idp.plugin.rhino"}),
                 AbstractCommandLine.RC_OK);
     }
 
-    @Test(dependsOnMethods = {"testUpdate"})  public void testForceUpdate() {
+    @Test(enabled = false, dependsOnMethods = {"testUpdate"})  public void testForceUpdate() {
         assertEquals(PluginInstallerCLI.runMain(new String[] {
                 "-u", "net.shibboleth.idp.plugin.rhino",
                 "-fu", "0.1.2" }),
                 AbstractCommandLine.RC_OK);
     }
 
-    @Test(enabled = true) public void testRhinoLocal() throws Exception {
+    @Test(enabled = false) public void testRhinoLocal() throws Exception {
         Path unpack = null;
         try {
             unpack = Files.createTempDirectory("rhinoLocal");
diff --git a/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerTest.java b/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerTest.java
index 48b2e1da4..5871b5b1d 100644
--- a/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerTest.java
+++ b/idp-installer/src/test/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerTest.java
@@ -101,7 +101,7 @@ public class PluginInstallerTest extends BasePluginTest {
     }
 
     
-    @Test(enabled = true) public void testUnpackTgz() throws ComponentInitializationException, IOException {
+    @Test(enabled = false) public void testUnpackTgz() throws ComponentInitializationException, IOException {
         try (final PluginInstaller inst = new PluginInstaller()) {
             inst.setPluginId("net.shibboleth.idp.plugin.rhino");
             inst.setIdpHome(getIdpHome());

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


More information about the commits mailing list