[java-identity-provider] 01/02: GEN-348 Investigate and Remove implementation classes from the jetty plugin
Rod Widdowson
rdw at steadingsoftware.com
Wed Oct 23 13:18:44 UTC 2024
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=b495836bf5b02df792213d782049b1d798e2200e
commit b495836bf5b02df792213d782049b1d798e2200e
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Oct 23 13:38:27 2024 +0100
GEN-348 Investigate and Remove implementation classes from the jetty plugin
https://shibboleth.atlassian.net/browse/GEN-348
Rename impl/InstallerProperties to impl/InstallerPropertiesImpl
(allows us to introduce a new 'api' InstallerProperties)
---
.../idp/installer/impl/CopyDistribution.java | 4 ++--
.../idp/installer/impl/CurrentInstallState.java | 2 +-
.../shibboleth/idp/installer/impl/IdPInstallerCLI.java | 18 +++++++++---------
...lerProperties.java => InstallerPropertiesImpl.java} | 14 +++++++-------
.../net/shibboleth/idp/installer/impl/V5Install.java | 4 ++--
.../net/shibboleth/idp/installer/TestInstallerCLI.java | 4 ++--
6 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java
index 829863b4a..e41ac17cd 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java
@@ -41,12 +41,12 @@ public final class CopyDistribution {
@Nonnull private final Logger log = LoggerFactory.getLogger(CopyDistribution.class);
/** Properties for the job. */
- @Nonnull private final InstallerProperties installerProps;
+ @Nonnull private final InstallerPropertiesImpl installerProps;
/** Constructor.
* @param props The environment for the work.
*/
- public CopyDistribution(@Nonnull final InstallerProperties props) {
+ public CopyDistribution(@Nonnull final InstallerPropertiesImpl props) {
installerProps = props;
}
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CurrentInstallState.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CurrentInstallState.java
index ab359aaa5..e0b971ec0 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CurrentInstallState.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CurrentInstallState.java
@@ -84,7 +84,7 @@ public final class CurrentInstallState extends AbstractInitializableComponent {
/** Constructor.
* @param installerProps the installer situation.
*/
- public CurrentInstallState(final InstallerProperties installerProps) {
+ public CurrentInstallState(final InstallerPropertiesImpl installerProps) {
targetDir = installerProps.getTargetDir();
enabledModules = CollectionSupport.emptySet();
}
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerCLI.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerCLI.java
index 3e7b30c99..254a9fa88 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerCLI.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/IdPInstallerCLI.java
@@ -113,19 +113,19 @@ public class IdPInstallerCLI extends AbstractCommandLine<IdPInstallerArguments>
}
if (args.isUnattended()) {
- System.setProperty(InstallerProperties.NO_PROMPT, "true");
+ System.setProperty(InstallerPropertiesImpl.NO_PROMPT, "true");
}
- setIfNotNull(args.getPropertyFile(), InstallerProperties.PROPERTY_SOURCE_FILE);
- setIfNotNull(args.getTargetDirectory(), InstallerProperties.TARGET_DIR);
- setIfNotNull(args.getHostName(), InstallerProperties.HOST_NAME);
- setIfNotNull(args.getScope(), InstallerProperties.SCOPE);
- setIfNotNull(args.getEntityID(), InstallerProperties.ENTITY_ID);
- setIfNotNull(args.getKeystorePassword(), InstallerProperties.KEY_STORE_PASSWORD);
- setIfNotNull(args.getSealerPassword(), InstallerProperties.SEALER_PASSWORD);
+ setIfNotNull(args.getPropertyFile(), InstallerPropertiesImpl.PROPERTY_SOURCE_FILE);
+ setIfNotNull(args.getTargetDirectory(), InstallerPropertiesImpl.TARGET_DIR);
+ setIfNotNull(args.getHostName(), InstallerPropertiesImpl.HOST_NAME);
+ setIfNotNull(args.getScope(), InstallerPropertiesImpl.SCOPE);
+ setIfNotNull(args.getEntityID(), InstallerPropertiesImpl.ENTITY_ID);
+ setIfNotNull(args.getKeystorePassword(), InstallerPropertiesImpl.KEY_STORE_PASSWORD);
+ setIfNotNull(args.getSealerPassword(), InstallerPropertiesImpl.SEALER_PASSWORD);
try {
- final InstallerProperties ip = new InstallerProperties(source);
+ final InstallerPropertiesImpl ip = new InstallerPropertiesImpl(source);
ip.doInitialize();
final CurrentInstallState ic = new CurrentInstallState(ip);
ic.initialize();
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerProperties.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerPropertiesImpl.java
similarity index 98%
rename from idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerProperties.java
rename to idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerPropertiesImpl.java
index 6ba8736fd..cd354d3fd 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerProperties.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerPropertiesImpl.java
@@ -53,7 +53,7 @@ import net.shibboleth.shared.primitive.StringSupport;
NOTE Updated to this properties should be reflected in the "PropertyDriverInstallation" wiki page."/
*/
-public class InstallerProperties {
+public class InstallerPropertiesImpl {
/** The name of a property file to fill in some or all of the above. This file is deleted after processing. */
@Nonnull @NotEmpty public static final String PROPERTY_SOURCE_FILE = "idp.property.file";
@@ -125,7 +125,7 @@ public class InstallerProperties {
CollectionSupport.setOf("idp.authn.Password", "idp.admin.Hello");
/** Class logger. */
- @Nonnull private final Logger log = LoggerFactory.getLogger(InstallerProperties.class);
+ @Nonnull private final Logger log = LoggerFactory.getLogger(InstallerPropertiesImpl.class);
/** The properties driving the install. */
@NonnullAfterInit private Properties installerProperties;
@@ -177,7 +177,7 @@ public class InstallerProperties {
*
* @param sourceDir Where the *source* installation is
*/
- public InstallerProperties(@Nonnull final Path sourceDir) {
+ public InstallerPropertiesImpl(@Nonnull final Path sourceDir) {
srcDir = sourceDir;
inputHandler = getInputHandler();
}
@@ -493,7 +493,7 @@ public class InstallerProperties {
@Nonnull @NotLive @Unmodifiable public Set<String> getModulesToEnable() {
String prop = StringSupport.trimOrNull(installerProperties.getProperty(INITIAL_INSTALL_MODULES));
if (prop == null) {
- return InstallerProperties.DEFAULT_MODULES;
+ return InstallerPropertiesImpl.DEFAULT_MODULES;
}
final boolean additive = prop.startsWith("+");
if (additive) {
@@ -505,8 +505,8 @@ public class InstallerProperties {
final Set<String> result = CollectionSupport.copyToSet(CollectionSupport.arrayAsList(modules));
return result;
}
- final Set<String> result = new HashSet<>(modules.length + InstallerProperties.DEFAULT_MODULES.size());
- result.addAll(InstallerProperties.DEFAULT_MODULES);
+ final Set<String> result = new HashSet<>(modules.length + InstallerPropertiesImpl.DEFAULT_MODULES.size());
+ result.addAll(InstallerPropertiesImpl.DEFAULT_MODULES);
result.addAll(Arrays.asList(modules));
return CollectionSupport.copyToSet(result);
}
@@ -515,7 +515,7 @@ public class InstallerProperties {
* @return the modules
*/
@Nonnull @NotLive @Unmodifiable public Set<String> getCoreModules() {
- return InstallerProperties.CORE_MODULES;
+ return InstallerPropertiesImpl.CORE_MODULES;
}
/**
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/V5Install.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/V5Install.java
index 808a89f5d..366a27a71 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/V5Install.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/V5Install.java
@@ -79,7 +79,7 @@ public class V5Install {
@Nonnull private final Logger log = LoggerFactory.getLogger(V5Install.class);
/** Installer Properties. */
- @Nonnull private final InstallerProperties installerProps;
+ @Nonnull private final InstallerPropertiesImpl installerProps;
/** Current Install. */
@Nonnull private final CurrentInstallState currentState;
@@ -100,7 +100,7 @@ public class V5Install {
* @param securityParams {@link HttpClientSecurityParameters} to use on any Plugin operations
*
*/
- public V5Install(@Nonnull final InstallerProperties props, @Nonnull final CurrentInstallState installState,
+ public V5Install(@Nonnull final InstallerPropertiesImpl props, @Nonnull final CurrentInstallState installState,
@Nonnull final HttpClient client, @Nullable final HttpClientSecurityParameters securityParams) {
if (!installState.isInitialized()) {
throw new UninitializedComponentException("Installer State not Initialized");
diff --git a/idp-installer/src/test/java/net/shibboleth/idp/installer/TestInstallerCLI.java b/idp-installer/src/test/java/net/shibboleth/idp/installer/TestInstallerCLI.java
index 7661f3328..540ce5906 100644
--- a/idp-installer/src/test/java/net/shibboleth/idp/installer/TestInstallerCLI.java
+++ b/idp-installer/src/test/java/net/shibboleth/idp/installer/TestInstallerCLI.java
@@ -17,7 +17,7 @@ package net.shibboleth.idp.installer;
import org.testng.annotations.Test;
import net.shibboleth.idp.installer.impl.IdPInstallerCLI;
-import net.shibboleth.idp.installer.impl.InstallerProperties;
+import net.shibboleth.idp.installer.impl.InstallerPropertiesImpl;
import net.shibboleth.idp.installer.impl.UpdateIdPCLI;
//import net.shibboleth.idp.installer.impl.UpdateIdPCLI;
/**
@@ -27,7 +27,7 @@ public class TestInstallerCLI {
@Test(enabled = false)
public void install() {
- System.setProperty(InstallerProperties.HOST_NAME, "machine.org.uk");
+ System.setProperty(InstallerPropertiesImpl.HOST_NAME, "machine.org.uk");
IdPInstallerCLI.runMain(new String[] {
"-t", "h:\\downloads\\idp",
"-s",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list