Skip to content

Commit a6bafc8

Browse files
committed
[#47] Use default method implementations to avoid chnages in WildFly Core and Prospero
Signed-off-by: Yeray Borges <yborgess@redhat.com>
1 parent 75343d6 commit a6bafc8

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/main/java/org/wildfly/installationmanager/spi/InstallationManager.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ public interface InstallationManager {
9393
* @throws IllegalArgumentException if the Path is not writable.
9494
* @throws Exception In case of an error.
9595
*/
96-
boolean prepareUpdate(Path candidatePath, List<Repository> repositories, boolean allowManifestDowngrades) throws Exception;
96+
default boolean prepareUpdate(Path candidatePath, List<Repository> repositories, boolean allowManifestDowngrades) throws Exception {
97+
throw new UnsupportedOperationException("This method is not implemented yet.");
98+
}
9799

98100
/**
99101
* Prepares an updated version of the server installation in {@code candidatePath}.
@@ -108,7 +110,9 @@ public interface InstallationManager {
108110
* @throws IllegalArgumentException if the Path is not writable.
109111
* @throws Exception In case of an error.
110112
*/
111-
boolean prepareUpdate(Path candidatePath, List<Repository> repositories, List<ManifestVersion> manifestVersions, boolean allowManifestDowngrades) throws Exception;
113+
default boolean prepareUpdate(Path candidatePath, List<Repository> repositories, List<ManifestVersion> manifestVersions, boolean allowManifestDowngrades) throws Exception {
114+
throw new UnsupportedOperationException("This method is not implemented yet.");
115+
}
112116

113117
/**
114118
* Lists updates available for the server installation.
@@ -131,7 +135,9 @@ public interface InstallationManager {
131135
* @return {@link InstallationUpdates} collections of artifact and Wildfly Channel manifests that can be updated.
132136
* @throws Exception In case of an error.
133137
*/
134-
InstallationUpdates findInstallationUpdates(List<Repository> repositories) throws Exception;
138+
default InstallationUpdates findInstallationUpdates(List<Repository> repositories) throws Exception {
139+
throw new UnsupportedOperationException("This method is not implemented yet.");
140+
}
135141

136142
/**
137143
* Lists updates available for the server installation.
@@ -142,7 +148,9 @@ public interface InstallationManager {
142148
* @return {@link InstallationUpdates} collections of artifact and Wildfly Channel manifests that can be updated.
143149
* @throws Exception In case of an error.
144150
*/
145-
InstallationUpdates findInstallationUpdates(List<Repository> repositories, List<ManifestVersion> manifestVersions) throws Exception;
151+
default InstallationUpdates findInstallationUpdates(List<Repository> repositories, List<ManifestVersion> manifestVersions) throws Exception {
152+
throw new UnsupportedOperationException("This method is not implemented yet.");
153+
}
146154

147155
/**
148156
* Lists possible upgrades for subscribed manifests. The results may not include manifests for which no upgrades
@@ -153,7 +161,9 @@ public interface InstallationManager {
153161
* @param includeDowngrades If true, manifest versions lower than currently used manifest version will be listed as well.
154162
* @return list of AvailableManifestVersions objects containing manifest info and list of available manifest versions.
155163
*/
156-
List<AvailableManifestVersions> findAvailableManifestVersions(List<Repository> repositories, boolean includeDowngrades) throws Exception;
164+
default List<AvailableManifestVersions> findAvailableManifestVersions(List<Repository> repositories, boolean includeDowngrades) throws Exception {
165+
throw new UnsupportedOperationException("This method is not implemented yet.");
166+
}
157167

158168
/**
159169
* Lists channels the server installation is subscribed to.

0 commit comments

Comments
 (0)