use of com.adaptris.core.ServiceWrapper in project interlok by adaptris.
the class ServiceUtil method rewriteConnectionsForTesting.
public static Service rewriteConnectionsForTesting(Service service) throws CoreException {
Service rewritten = service;
if (rewritten instanceof ConnectedService) {
ConnectedService connectedService = (ConnectedService) rewritten;
connectedService.setConnection(cloneForTesting(connectedService.getConnection()));
}
if (rewritten instanceof ServiceCollection) {
rewriteConnectionsForTesting((ServiceCollection) rewritten);
}
if (rewritten instanceof ServiceWrapper) {
rewriteConnectionsForTesting((ServiceWrapper) rewritten);
}
return rewritten;
}
Aggregations