This repository has been archived by the owner on Nov 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Server.java
95 lines (83 loc) · 2.3 KB
/
Server.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
* #%L
* Fuse Patch :: Core
* %%
* Copyright (C) 2015 Private
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package org.wildfly.extras.patch;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Path;
import java.util.List;
/**
* A server instance.
*
* @author thomas.diesler@jboss.com
* @since 10-Jun-2015
*/
public interface Server {
PatchId SERVER_ID = PatchId.fromString("server");
/**
* Get the server home path
* @return The path to the server home
*/
Path getServerHome();
/**
* Get the default repository URL
* @return The URL for the default repository
*/
URL getDefaultRepositoryURL();
/**
* Get the audit log
* @return A list containing the audit log content
*/
List<String> getAuditLog();
/**
* Query the list of applied packages
* @return A list of applied patches
*/
List<PatchId> queryAppliedPatches();
/**
* Query managed server paths
* @param pathsPattern The path pattern to query for
* @return A list of managed server paths
*/
List<ManagedPath> queryManagedPaths(String pathsPattern);
/**
* Get the applied package for a given prefix
* @param prefix The patch prefix
* @return package or null
*/
Patch getPatch(String prefix);
/**
* Get the applied package for the given id
* @param patchId The patch id
* @return The patch
*/
Patch getPatch(PatchId patchId);
/**
* Apply a smart patch and return the result
* @param smartPatch The patch to apply
* @param force Whether to force application of the patch
* @return The patched that was applied
* @throws java.io.IOException If an IO exception occurred
*/
Patch applySmartPatch(SmartPatch smartPatch, boolean force) throws IOException;
/**
* Apply cleanup tasks to a server
*/
void cleanUp();
}