From 33fe5835eaccc4eab2f84e8c57a93223f861daad Mon Sep 17 00:00:00 2001 From: Bartosz Spyrko-Smietanko Date: Fri, 29 Nov 2024 13:06:48 +0000 Subject: [PATCH] [#27] Add operation to check if the server at given path can be managed by Installation Manager --- .../spi/InstallationManagerFactory.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/wildfly/installationmanager/spi/InstallationManagerFactory.java b/src/main/java/org/wildfly/installationmanager/spi/InstallationManagerFactory.java index 0aeb9fe..c910011 100644 --- a/src/main/java/org/wildfly/installationmanager/spi/InstallationManagerFactory.java +++ b/src/main/java/org/wildfly/installationmanager/spi/InstallationManagerFactory.java @@ -27,12 +27,22 @@ public interface InstallationManagerFactory { * Creates InstallationManger for server instance located at {@code installationDir}. * If the provided directory is empty, the manger needs to install the server before attempting any other operations. * - * @param installationDir the directory where the server is installed - * @param mavenOptions the options to be used by the manager + * @param installationDir + * @param mavenOptions * @return the InstallationManager instance + * @return */ InstallationManager create(Path installationDir, MavenOptions mavenOptions) throws Exception; + /** + * Checks if the installation can be managed by the installation manager. + * + * @param installationDir - path to the root of the server installation + * @return true if the installation contains required metadata, + * false otherwise + */ + boolean isManagedInstallation(Path installationDir); + /** * Gets the name of InstallationManager instance *