Skip to content

Commit 75343d6

Browse files
committed
Add default methods and fix deprecated annotations
1 parent 8f703e8 commit 75343d6

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

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

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public interface InstallationManager {
207207
* @return a CLI command.
208208
* @throws OperationNotAvailableException - if the installation manager CLI support is not installed
209209
*/
210-
@Deprecated
210+
@Deprecated(forRemoval = true)
211211
String generateApplyUpdateCommand(Path scriptHome, Path candidatePath) throws OperationNotAvailableException;
212212

213213
/**
@@ -219,7 +219,7 @@ public interface InstallationManager {
219219
* @return a CLI command.
220220
* @throws OperationNotAvailableException - if the installation manager CLI support is not installed
221221
*/
222-
@Deprecated
222+
@Deprecated(forRemoval = true)
223223
String generateApplyRevertCommand(Path scriptHome, Path candidatePath) throws OperationNotAvailableException;
224224

225225
/**
@@ -232,7 +232,7 @@ public interface InstallationManager {
232232
* @return a CLI command.
233233
* @throws OperationNotAvailableException - if the installation manager CLI support is not installed
234234
*/
235-
@Deprecated
235+
@Deprecated(forRemoval = true)
236236
String generateApplyUpdateCommand(Path scriptHome, Path candidatePath, OsShell shell) throws OperationNotAvailableException;
237237

238238
/**
@@ -245,7 +245,7 @@ public interface InstallationManager {
245245
* @return a CLI command.
246246
* @throws OperationNotAvailableException - if the installation manager CLI support is not installed
247247
*/
248-
@Deprecated
248+
@Deprecated(forRemoval = true)
249249
String generateApplyRevertCommand(Path scriptHome, Path candidatePath, OsShell shell) throws OperationNotAvailableException;
250250

251251
/**
@@ -259,7 +259,9 @@ public interface InstallationManager {
259259
* @return a CLI command.
260260
* @throws OperationNotAvailableException - if the installation manager CLI support is not installed
261261
*/
262-
String generateApplyUpdateCommand(Path scriptHome, Path candidatePath, OsShell shell, boolean noConflictsOnly) throws OperationNotAvailableException;
262+
default String generateApplyUpdateCommand(Path scriptHome, Path candidatePath, OsShell shell, boolean noConflictsOnly) throws OperationNotAvailableException{
263+
throw new UnsupportedOperationException("Method using noConflictsOnly argument is not implemented");
264+
}
263265

264266
/**
265267
* Generate an apply rollback CLI command.
@@ -272,7 +274,9 @@ public interface InstallationManager {
272274
* @return a CLI command.
273275
* @throws OperationNotAvailableException - if the installation manager CLI support is not installed
274276
*/
275-
String generateApplyRevertCommand(Path scriptHome, Path candidatePath, OsShell shell, boolean noConflictsOnly) throws OperationNotAvailableException;
277+
default String generateApplyRevertCommand(Path scriptHome, Path candidatePath, OsShell shell, boolean noConflictsOnly) throws OperationNotAvailableException {
278+
throw new UnsupportedOperationException("Method using noConflictsOnly argument is not implemented");
279+
}
276280

277281
/**
278282
* Reports latest versions of manifests used in latest update/install operation for each registered channels.
@@ -289,5 +293,7 @@ public interface InstallationManager {
289293
* @return collection of the {@code FileConflicts} or an empty collection if no conflicts were found.
290294
* @throws Exception - if there was an exception accessing the server information or if the candidate is invalid
291295
*/
292-
Collection<FileConflict> verifyCandidate(Path candidatePath, CandidateType candidateType) throws Exception;
296+
default Collection<FileConflict> verifyCandidate(Path candidatePath, CandidateType candidateType) throws Exception {
297+
throw new UnsupportedOperationException("Method verifyCandidate is not implemented");
298+
}
293299
}

0 commit comments

Comments
 (0)