Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2014-06-13 18:35:17 -0400
committerRoberto E. Escobar2014-08-28 19:58:32 -0400
commit084c45c60fc7a165829f21c535299b22ed0620fd (patch)
tree08fc80de7f22151c78d3685ab02f39a3f9d1d2e9
parentce7d49e399ac53c7eef4295ff3ce5c0a3f51b667 (diff)
downloadorg.eclipse.osee-084c45c60fc7a165829f21c535299b22ed0620fd.tar.gz
org.eclipse.osee-084c45c60fc7a165829f21c535299b22ed0620fd.tar.xz
org.eclipse.osee-084c45c60fc7a165829f21c535299b22ed0620fd.zip
refactor: Rename WebClientProvider to JaxRsClient
-rw-r--r--plugins/org.eclipse.osee.account.rest.client/OSGI-INF/account.rest.client.xml2
-rw-r--r--plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java38
-rw-r--r--plugins/org.eclipse.osee.jaxrs.client/OSGI-INF/web.client.provider.xml4
-rw-r--r--plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/JaxRsClient.java (renamed from plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/WebClientProvider.java)5
-rw-r--r--plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/JaxRsClientImpl.java (renamed from plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/WebClientProviderImpl.java)11
-rw-r--r--plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/StandadloneWebClientProvider.java2
-rw-r--r--plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/StandaloneModule.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.client/OSGI-INF/osee.client.xml2
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java14
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryExecutorV1.java6
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/OSGI-INF/ote.master.rest.client.xml2
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java6
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/GetAvailableServers.java6
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java14
-rw-r--r--plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java6
-rw-r--r--plugins/org.eclipse.osee.ote.rest.client/OSGI-INF/ote.client.xml2
-rw-r--r--plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/ConfigureOteServer.java8
-rw-r--r--plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/GetOteServerFile.java6
-rw-r--r--plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/OteClientImpl.java18
-rw-r--r--plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/PrepareOteServerFile.java6
-rw-r--r--plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/RunTests.java6
21 files changed, 79 insertions, 89 deletions
diff --git a/plugins/org.eclipse.osee.account.rest.client/OSGI-INF/account.rest.client.xml b/plugins/org.eclipse.osee.account.rest.client/OSGI-INF/account.rest.client.xml
index f244843eb5..85b25f4875 100644
--- a/plugins/org.eclipse.osee.account.rest.client/OSGI-INF/account.rest.client.xml
+++ b/plugins/org.eclipse.osee.account.rest.client/OSGI-INF/account.rest.client.xml
@@ -4,5 +4,5 @@
<service>
<provide interface="org.eclipse.osee.account.rest.client.AccountClient"/>
</service>
- <reference bind="setWebClientProvider" cardinality="1..1" interface="org.eclipse.osee.jaxrs.client.WebClientProvider" name="WebClientProvider" policy="static"/>
+ <reference bind="setJaxRsClient" cardinality="1..1" interface="org.eclipse.osee.jaxrs.client.JaxRsClient" name="JaxRsClient" policy="static"/>
</scr:component>
diff --git a/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java b/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java
index 2b7afe6e6e..04485d28b3 100644
--- a/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java
+++ b/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java
@@ -32,8 +32,8 @@ import org.eclipse.osee.account.rest.model.AccountSessionDetailsData;
import org.eclipse.osee.account.rest.model.SubscriptionData;
import org.eclipse.osee.framework.jdk.core.type.ResultSet;
import org.eclipse.osee.framework.jdk.core.type.ResultSets;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.jaxrs.client.OseeClientProperties;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
import com.google.inject.Inject;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.UniformInterfaceException;
@@ -44,12 +44,12 @@ import com.sun.jersey.api.client.WebResource;
*/
public class AccountClientImpl implements AccountClient {
- private WebClientProvider clientProvider;
+ private JaxRsClient client;
private URI serverUri;
@Inject
- public void setWebClientProvider(WebClientProvider clientProvider) {
- this.clientProvider = clientProvider;
+ public void setJaxRsClient(JaxRsClient client) {
+ this.client = client;
}
public void start() {
@@ -66,11 +66,11 @@ public class AccountClientImpl implements AccountClient {
}
private <T> T get(URI uri, Class<T> clazz) {
- WebResource resource = clientProvider.createResource(uri);
+ WebResource resource = client.createResource(uri);
try {
return resource.accept(MediaType.APPLICATION_JSON_TYPE).get(clazz);
} catch (UniformInterfaceException ex) {
- throw clientProvider.handleException(ex);
+ throw client.handleException(ex);
}
}
@@ -85,11 +85,11 @@ public class AccountClientImpl implements AccountClient {
data.setPassword(password);
data.setScheme(scheme);
- WebResource resource = clientProvider.createResource(uri);
+ WebResource resource = client.createResource(uri);
try {
return resource.post(AccountSessionData.class, data);
} catch (UniformInterfaceException ex) {
- throw clientProvider.handleException(ex);
+ throw client.handleException(ex);
}
}
@@ -99,7 +99,7 @@ public class AccountClientImpl implements AccountClient {
.path(AccountContexts.ACCOUNT_LOGOUT)//
.build();
- WebResource resource = clientProvider.createResource(uri);
+ WebResource resource = client.createResource(uri);
int status;
try {
ClientResponse response = resource.post(ClientResponse.class, session);
@@ -108,7 +108,7 @@ public class AccountClientImpl implements AccountClient {
ClientResponse clientResponse = ex.getResponse();
status = clientResponse.getStatus();
if (Status.NOT_MODIFIED.getStatusCode() != status) {
- throw clientProvider.handleException(ex);
+ throw client.handleException(ex);
}
}
return Status.OK.getStatusCode() == status;
@@ -120,14 +120,14 @@ public class AccountClientImpl implements AccountClient {
.path(AccountContexts.ACCOUNT_USERNAME_TEMPLATE)//
.build(userName);
- WebResource resource = clientProvider.createResource(uri);
+ WebResource resource = client.createResource(uri);
try {
AccountInfoData data =
resource.accept(MediaType.APPLICATION_JSON_TYPE).type(MediaType.APPLICATION_JSON_TYPE).post(
AccountInfoData.class, input);
return data;
} catch (UniformInterfaceException ex) {
- throw clientProvider.handleException(ex);
+ throw client.handleException(ex);
}
}
@@ -136,13 +136,13 @@ public class AccountClientImpl implements AccountClient {
URI uri = newBuilder()//
.path(AccountContexts.ACCOUNT_ID_TEMPLATE)//
.build(accountId);
- WebResource resource = clientProvider.createResource(uri);
+ WebResource resource = client.createResource(uri);
ClientResponse response;
try {
response = resource.delete(ClientResponse.class);
} catch (UniformInterfaceException ex) {
- throw clientProvider.handleException(ex);
+ throw client.handleException(ex);
}
int status = response.getStatus();
return Status.OK.getStatusCode() == status;
@@ -190,7 +190,7 @@ public class AccountClientImpl implements AccountClient {
.path(AccountContexts.ACCOUNT_ID_TEMPLATE)//
.path(AccountContexts.ACCOUNT_ACTIVE)//
.build(accountId);
- WebResource resource = clientProvider.createResource(uri);
+ WebResource resource = client.createResource(uri);
boolean result;
if (active) {
result = setAccountActive(resource);
@@ -219,7 +219,7 @@ public class AccountClientImpl implements AccountClient {
ClientResponse clientResponse = ex.getResponse();
status = clientResponse.getStatus();
if (Status.NOT_MODIFIED.getStatusCode() != status) {
- throw clientProvider.handleException(ex);
+ throw client.handleException(ex);
}
}
return Status.OK.getStatusCode() == status;
@@ -234,7 +234,7 @@ public class AccountClientImpl implements AccountClient {
ClientResponse clientResponse = ex.getResponse();
status = clientResponse.getStatus();
if (Status.NOT_MODIFIED.getStatusCode() != status) {
- throw clientProvider.handleException(ex);
+ throw client.handleException(ex);
}
}
return Status.OK.getStatusCode() == status;
@@ -250,7 +250,7 @@ public class AccountClientImpl implements AccountClient {
AccountPreferencesInput input = new AccountPreferencesInput();
input.setMap(preferences);
- WebResource resource = clientProvider.createResource(uri);
+ WebResource resource = client.createResource(uri);
int status;
try {
ClientResponse response = resource.put(ClientResponse.class, input);
@@ -259,7 +259,7 @@ public class AccountClientImpl implements AccountClient {
ClientResponse clientResponse = ex.getResponse();
status = clientResponse.getStatus();
if (Status.NOT_MODIFIED.getStatusCode() != status) {
- throw clientProvider.handleException(ex);
+ throw client.handleException(ex);
}
}
return Status.OK.getStatusCode() == status;
diff --git a/plugins/org.eclipse.osee.jaxrs.client/OSGI-INF/web.client.provider.xml b/plugins/org.eclipse.osee.jaxrs.client/OSGI-INF/web.client.provider.xml
index 319c0f619a..cdd564872f 100644
--- a/plugins/org.eclipse.osee.jaxrs.client/OSGI-INF/web.client.provider.xml
+++ b/plugins/org.eclipse.osee.jaxrs.client/OSGI-INF/web.client.provider.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" >
- <implementation class="org.eclipse.osee.jaxrs.client.internal.WebClientProviderImpl"/>
+ <implementation class="org.eclipse.osee.jaxrs.client.internal.JaxRsClientImpl"/>
<service>
- <provide interface="org.eclipse.osee.jaxrs.client.WebClientProvider"/>
+ <provide interface="org.eclipse.osee.jaxrs.client.JaxRsClient"/>
</service>
</scr:component>
diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/WebClientProvider.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/JaxRsClient.java
index 9f2421e82b..d844de6be0 100644
--- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/WebClientProvider.java
+++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/JaxRsClient.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.jaxrs.client;
import java.net.URI;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import com.sun.jersey.api.client.AsyncWebResource;
import com.sun.jersey.api.client.UniformInterfaceException;
import com.sun.jersey.api.client.WebResource;
@@ -20,12 +19,10 @@ import com.sun.jersey.api.client.WebResource;
* @author John Misinco
* @author Roberto E. Escobar
*/
-public interface WebClientProvider {
+public interface JaxRsClient {
WebResource createResource(URI uri) throws OseeCoreException;
- AsyncWebResource createAsyncResource(URI uri) throws OseeCoreException;
-
RuntimeException handleException(UniformInterfaceException ex);
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/WebClientProviderImpl.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/JaxRsClientImpl.java
index 3096d3f549..30b9bfcbc2 100644
--- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/WebClientProviderImpl.java
+++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/JaxRsClientImpl.java
@@ -14,8 +14,7 @@ import java.net.URI;
import java.util.Map;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.jaxrs.ErrorResponse;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
-import com.sun.jersey.api.client.AsyncWebResource;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.UniformInterfaceException;
@@ -27,7 +26,7 @@ import com.sun.jersey.client.apache.config.DefaultApacheHttpClientConfig;
/**
* @author Roberto E. Escobar
*/
-public class WebClientProviderImpl implements WebClientProvider {
+public class JaxRsClientImpl implements JaxRsClient {
private Client client;
@@ -38,12 +37,6 @@ public class WebClientProviderImpl implements WebClientProvider {
}
@Override
- public AsyncWebResource createAsyncResource(URI uri) {
- Client client = createClient(uri);
- return client.asyncResource(uri);
- }
-
- @Override
public RuntimeException handleException(UniformInterfaceException ex) {
String message = null;
try {
diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/StandadloneWebClientProvider.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/StandadloneWebClientProvider.java
index fe5d769419..009f75631a 100644
--- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/StandadloneWebClientProvider.java
+++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/StandadloneWebClientProvider.java
@@ -21,7 +21,7 @@ import com.sun.jersey.client.apache.config.ApacheHttpClientConfig;
/**
* @author Roberto E. Escobar
*/
-public class StandadloneWebClientProvider extends WebClientProviderImpl {
+public class StandadloneWebClientProvider extends JaxRsClientImpl {
private final String proxyAddress;
diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/StandaloneModule.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/StandaloneModule.java
index d31bc1a0af..a3c08826cb 100644
--- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/StandaloneModule.java
+++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/StandaloneModule.java
@@ -13,7 +13,7 @@ package org.eclipse.osee.jaxrs.client.internal;
import org.eclipse.osee.jaxrs.client.OseeClientConfig;
import org.eclipse.osee.jaxrs.client.OseeHttpProxyAddress;
import org.eclipse.osee.jaxrs.client.OseeServerAddress;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import com.google.inject.AbstractModule;
/**
@@ -32,6 +32,6 @@ public class StandaloneModule extends AbstractModule {
bindConstant().annotatedWith(OseeServerAddress.class).to(config.getServerAddress());
bindConstant().annotatedWith(OseeHttpProxyAddress.class).to(config.getProxyAddress());
- bind(WebClientProvider.class).to(StandadloneWebClientProvider.class);
+ bind(JaxRsClient.class).to(StandadloneWebClientProvider.class);
}
}
diff --git a/plugins/org.eclipse.osee.orcs.rest.client/OSGI-INF/osee.client.xml b/plugins/org.eclipse.osee.orcs.rest.client/OSGI-INF/osee.client.xml
index fa3684b502..d8217c5754 100644
--- a/plugins/org.eclipse.osee.orcs.rest.client/OSGI-INF/osee.client.xml
+++ b/plugins/org.eclipse.osee.orcs.rest.client/OSGI-INF/osee.client.xml
@@ -4,5 +4,5 @@
<service>
<provide interface="org.eclipse.osee.orcs.rest.client.OseeClient"/>
</service>
- <reference bind="setWebClientProvider" cardinality="1..1" interface="org.eclipse.osee.jaxrs.client.WebClientProvider" name="WebClientProvider" policy="static"/>
+ <reference bind="setJaxRsClient" cardinality="1..1" interface="org.eclipse.osee.jaxrs.client.JaxRsClient" name="JaxRsClient" policy="static"/>
</scr:component>
diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java
index 768ab0ce08..da8aef5228 100644
--- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java
+++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java
@@ -17,8 +17,8 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.OseeCodeVersion;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.jaxrs.client.OseeClientProperties;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
import org.eclipse.osee.orcs.rest.client.OseeClient;
import org.eclipse.osee.orcs.rest.client.QueryBuilder;
import org.eclipse.osee.orcs.rest.client.internal.search.PredicateFactory;
@@ -42,16 +42,16 @@ public class OseeClientImpl implements OseeClient, BaseUriBuilder {
private PredicateFactory predicateFactory;
private QueryExecutorV1 executor;
- private WebClientProvider clientProvider;
+ private JaxRsClient client;
@Inject
- public void setWebClientProvider(WebClientProvider clientProvider) {
- this.clientProvider = clientProvider;
+ public void setJaxRsClient(JaxRsClient client) {
+ this.client = client;
}
public void start() {
predicateFactory = new PredicateFactoryImpl();
- executor = new QueryExecutorV1(clientProvider, this);
+ executor = new QueryExecutorV1(client, this);
}
public void stop() {
@@ -76,7 +76,7 @@ public class OseeClientImpl implements OseeClient, BaseUriBuilder {
public boolean isClientVersionSupportedByApplicationServer() {
boolean result = false;
URI uri = newBuilder().path("client").build();
- WebResource resource = clientProvider.createResource(uri);
+ WebResource resource = client.createResource(uri);
Client clientResult = null;
try {
clientResult = resource.accept(MediaType.APPLICATION_XML).get(Client.class);
@@ -84,7 +84,7 @@ public class OseeClientImpl implements OseeClient, BaseUriBuilder {
result = clientResult.getSupportedVersions().contains(OseeCodeVersion.getVersion());
}
} catch (UniformInterfaceException ex) {
- throw clientProvider.handleException(ex);
+ throw client.handleException(ex);
}
return result;
}
diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryExecutorV1.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryExecutorV1.java
index 4115a844c8..38bc14bedf 100644
--- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryExecutorV1.java
+++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryExecutorV1.java
@@ -16,7 +16,7 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.orcs.rest.model.search.artifact.OutputFormat;
import org.eclipse.osee.orcs.rest.model.search.artifact.Predicate;
import org.eclipse.osee.orcs.rest.model.search.artifact.RequestType;
@@ -35,10 +35,10 @@ public class QueryExecutorV1 implements QueryExecutor {
UriBuilder newBuilder();
}
- private final WebClientProvider clientProvider;
+ private final JaxRsClient clientProvider;
private final BaseUriBuilder baseUriBuilder;
- public QueryExecutorV1(WebClientProvider clientProvider, BaseUriBuilder baseUriBuilder) {
+ public QueryExecutorV1(JaxRsClient clientProvider, BaseUriBuilder baseUriBuilder) {
super();
this.clientProvider = clientProvider;
this.baseUriBuilder = baseUriBuilder;
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/OSGI-INF/ote.master.rest.client.xml b/plugins/org.eclipse.osee.ote.master.rest.client/OSGI-INF/ote.master.rest.client.xml
index 10ff996630..a2fd383204 100644
--- a/plugins/org.eclipse.osee.ote.master.rest.client/OSGI-INF/ote.master.rest.client.xml
+++ b/plugins/org.eclipse.osee.ote.master.rest.client/OSGI-INF/ote.master.rest.client.xml
@@ -4,5 +4,5 @@
<service>
<provide interface="org.eclipse.osee.ote.master.rest.client.OTEMasterServer"/>
</service>
- <reference bind="setWebClientProvider" cardinality="1..1" interface="org.eclipse.osee.jaxrs.client.WebClientProvider" name="WebClientProvider" policy="static"/>
+ <reference bind="setJaxRsClient" cardinality="1..1" interface="org.eclipse.osee.jaxrs.client.JaxRsClient" name="JaxRsClient" policy="static"/>
</scr:component>
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java
index 9aab0fbb8f..d05e927ffd 100644
--- a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java
+++ b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/AddServer.java
@@ -3,18 +3,18 @@ package org.eclipse.osee.ote.master.rest.client.internal;
import java.net.URI;
import java.util.concurrent.Callable;
import javax.ws.rs.core.MediaType;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServerResult;
import org.eclipse.osee.ote.master.rest.model.OTEServer;
import com.sun.jersey.api.client.WebResource;
public class AddServer implements Callable<OTEMasterServerResult> {
- private final WebClientProvider webClientProvider;
+ private final JaxRsClient webClientProvider;
private final OTEServer server;
private final URI uri;
- public AddServer(WebClientProvider webClientProvider, URI uri, OTEServer server) {
+ public AddServer(JaxRsClient webClientProvider, URI uri, OTEServer server) {
this.webClientProvider = webClientProvider;
this.uri = uri;
this.server = server;
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/GetAvailableServers.java b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/GetAvailableServers.java
index 7449c0f795..d1fbe75b59 100644
--- a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/GetAvailableServers.java
+++ b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/GetAvailableServers.java
@@ -3,17 +3,17 @@ package org.eclipse.osee.ote.master.rest.client.internal;
import java.net.URI;
import java.util.concurrent.Callable;
import javax.ws.rs.core.MediaType;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServerAvailableNodes;
import org.eclipse.osee.ote.master.rest.model.OTEServer;
import com.sun.jersey.api.client.WebResource;
public class GetAvailableServers implements Callable<OTEMasterServerAvailableNodes> {
- private final WebClientProvider webClientProvider;
+ private final JaxRsClient webClientProvider;
private final URI uri;
- public GetAvailableServers(WebClientProvider webClientProvider, URI uri) {
+ public GetAvailableServers(JaxRsClient webClientProvider, URI uri) {
this.webClientProvider = webClientProvider;
this.uri = uri;
}
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java
index c7993e93ed..a395da7fe2 100644
--- a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java
+++ b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/OTEMasterServerImpl.java
@@ -5,7 +5,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServer;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServerAvailableNodes;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServerResult;
@@ -16,11 +16,11 @@ public class OTEMasterServerImpl implements OTEMasterServer {
static final String CONTEXT_NAME = "otemaster";
static final String CONTEXT_SERVERS = "servers";
- private WebClientProvider webClientProvider;
+ private JaxRsClient client;
private ExecutorService executor;
- public void setWebClientProvider(WebClientProvider webClientProvider) {
- this.webClientProvider = webClientProvider;
+ public void setJaxRsClient(JaxRsClient client) {
+ this.client = client;
}
public void start() {
@@ -43,17 +43,17 @@ public class OTEMasterServerImpl implements OTEMasterServer {
@Override
public Future<OTEMasterServerAvailableNodes> getAvailableServers(URI uri) {
- return executor.submit(new GetAvailableServers(webClientProvider, uri));
+ return executor.submit(new GetAvailableServers(client, uri));
}
@Override
public Future<OTEMasterServerResult> addServer(URI uri, OTEServer server) {
- return executor.submit(new AddServer(webClientProvider, uri, server));
+ return executor.submit(new AddServer(client, uri, server));
}
@Override
public Future<OTEMasterServerResult> removeServer(URI uri, OTEServer server) {
- return executor.submit(new RemoveServer(webClientProvider, uri, server));
+ return executor.submit(new RemoveServer(client, uri, server));
}
}
diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java
index 6f8b2d2fcf..e29a6b00ee 100644
--- a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java
+++ b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/internal/RemoveServer.java
@@ -3,18 +3,18 @@ package org.eclipse.osee.ote.master.rest.client.internal;
import java.net.URI;
import java.util.concurrent.Callable;
import javax.ws.rs.core.MediaType;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.master.rest.client.OTEMasterServerResult;
import org.eclipse.osee.ote.master.rest.model.OTEServer;
import com.sun.jersey.api.client.WebResource;
public class RemoveServer implements Callable<OTEMasterServerResult> {
- private final WebClientProvider webClientProvider;
+ private final JaxRsClient webClientProvider;
private final OTEServer server;
private final URI uri;
- public RemoveServer(WebClientProvider webClientProvider, URI uri, OTEServer server) {
+ public RemoveServer(JaxRsClient webClientProvider, URI uri, OTEServer server) {
this.webClientProvider = webClientProvider;
this.uri = uri;
this.server = server;
diff --git a/plugins/org.eclipse.osee.ote.rest.client/OSGI-INF/ote.client.xml b/plugins/org.eclipse.osee.ote.rest.client/OSGI-INF/ote.client.xml
index 0f7cffa469..8d857e8f93 100644
--- a/plugins/org.eclipse.osee.ote.rest.client/OSGI-INF/ote.client.xml
+++ b/plugins/org.eclipse.osee.ote.rest.client/OSGI-INF/ote.client.xml
@@ -4,5 +4,5 @@
<service>
<provide interface="org.eclipse.osee.ote.rest.client.OteClient"/>
</service>
- <reference bind="setWebClientProvider" cardinality="1..1" interface="org.eclipse.osee.jaxrs.client.WebClientProvider" name="WebClientProvider" policy="static"/>
+ <reference bind="setJaxRsClient" cardinality="1..1" interface="org.eclipse.osee.jaxrs.client.JaxRsClient" name="JaxRsClient" policy="static"/>
</scr:component>
diff --git a/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/ConfigureOteServer.java b/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/ConfigureOteServer.java
index 99bfd102b5..c0d3bb6e6b 100644
--- a/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/ConfigureOteServer.java
+++ b/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/ConfigureOteServer.java
@@ -6,7 +6,7 @@ import java.net.URI;
import java.util.List;
import javax.ws.rs.core.MediaType;
import org.eclipse.osee.framework.jdk.core.util.network.PortUtil;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.core.BundleInfo;
import org.eclipse.osee.ote.rest.client.Progress;
import org.eclipse.osee.ote.rest.client.internal.jarserver.HeadlessClassServer;
@@ -22,12 +22,12 @@ public class ConfigureOteServer extends BaseClientCallable<Progress> {
private final URI uri;
private List<File> jars;
private final Progress progress;
- private final WebClientProvider factory;
+ private final JaxRsClient factory;
private OTEJobStatus status;
private HeadlessClassServer classServer;
private OTEConfiguration configuration;
- public ConfigureOteServer(URI uri, List<File> jars, Progress progress, WebClientProvider factory) {
+ public ConfigureOteServer(URI uri, List<File> jars, Progress progress, JaxRsClient factory) {
super(progress);
this.uri = uri;
this.jars = jars;
@@ -35,7 +35,7 @@ public class ConfigureOteServer extends BaseClientCallable<Progress> {
this.factory = factory;
}
- public ConfigureOteServer(URI uri, OTEConfiguration configuration, Progress progress, WebClientProvider factory) {
+ public ConfigureOteServer(URI uri, OTEConfiguration configuration, Progress progress, JaxRsClient factory) {
super(progress);
this.uri = uri;
this.configuration = configuration;
diff --git a/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/GetOteServerFile.java b/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/GetOteServerFile.java
index fc14831b00..8210d9c5cf 100644
--- a/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/GetOteServerFile.java
+++ b/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/GetOteServerFile.java
@@ -6,7 +6,7 @@ import java.io.InputStream;
import java.net.URI;
import javax.ws.rs.core.MediaType;
import org.eclipse.osee.framework.jdk.core.util.Lib;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.rest.client.Progress;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
@@ -17,10 +17,10 @@ public class GetOteServerFile extends BaseClientCallable<Progress> {
private final String filePath;
@SuppressWarnings("unused")
private final Progress progress;
- private final WebClientProvider factory;
+ private final JaxRsClient factory;
private final File destination;
- public GetOteServerFile(URI uri, File destination, String filePath, Progress progress, WebClientProvider factory) {
+ public GetOteServerFile(URI uri, File destination, String filePath, Progress progress, JaxRsClient factory) {
super(progress);
this.uri = uri;
this.filePath = filePath;
diff --git a/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/OteClientImpl.java b/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/OteClientImpl.java
index 0fc34e0fcb..78b9cd4e6c 100644
--- a/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/OteClientImpl.java
+++ b/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/OteClientImpl.java
@@ -17,7 +17,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.rest.client.OTECacheItem;
import org.eclipse.osee.ote.rest.client.OteClient;
import org.eclipse.osee.ote.rest.client.Progress;
@@ -31,10 +31,10 @@ import org.eclipse.osee.ote.rest.model.OTETestRun;
public class OteClientImpl implements OteClient {
private ExecutorService executor;
- private WebClientProvider provider;
+ private JaxRsClient client;
- public void setWebClientProvider(WebClientProvider provider) {
- this.provider = provider;
+ public void setJaxRsClient(JaxRsClient client) {
+ this.client = client;
}
public void start() {
@@ -57,27 +57,27 @@ public class OteClientImpl implements OteClient {
@Override
public Future<Progress> getFile(URI uri, File destination, String filePath, final Progress progress) {
- return executor.submit(new GetOteServerFile(uri, destination, filePath, progress, provider));
+ return executor.submit(new GetOteServerFile(uri, destination, filePath, progress, client));
}
@Override
public Future<Progress> configureServerEnvironment(URI uri, List<File> jars, final Progress progress) {
- return executor.submit(new ConfigureOteServer(uri, jars, progress, provider));
+ return executor.submit(new ConfigureOteServer(uri, jars, progress, client));
}
@Override
public Future<Progress> updateServerJarCache(URI uri, String baseJarURL, List<OTECacheItem> jars, Progress progress) {
- return executor.submit(new PrepareOteServerFile(uri, baseJarURL, jars, progress, provider));
+ return executor.submit(new PrepareOteServerFile(uri, baseJarURL, jars, progress, client));
}
@Override
public Future<ProgressWithCancel> runTest(URI uri, OTETestRun tests, Progress progress) {
- return executor.submit(new RunTests(uri, tests, progress, provider));
+ return executor.submit(new RunTests(uri, tests, progress, client));
}
@Override
public Future<Progress> configureServerEnvironment(URI uri, OTEConfiguration configuration, Progress progress) {
- return executor.submit(new ConfigureOteServer(uri, configuration, progress, provider));
+ return executor.submit(new ConfigureOteServer(uri, configuration, progress, client));
}
}
diff --git a/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/PrepareOteServerFile.java b/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/PrepareOteServerFile.java
index 1a5d2ed27e..3d249bd7a9 100644
--- a/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/PrepareOteServerFile.java
+++ b/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/PrepareOteServerFile.java
@@ -3,7 +3,7 @@ package org.eclipse.osee.ote.rest.client.internal;
import java.net.URI;
import java.util.List;
import javax.ws.rs.core.MediaType;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.rest.client.OTECacheItem;
import org.eclipse.osee.ote.rest.client.Progress;
import org.eclipse.osee.ote.rest.model.OTEConfiguration;
@@ -18,11 +18,11 @@ public class PrepareOteServerFile extends BaseClientCallable<Progress> {
private final URI uri;
private final List<OTECacheItem> jars;
private final Progress progress;
- private final WebClientProvider factory;
+ private final JaxRsClient factory;
private OTEJobStatus status;
private final String baseJarURL;
- public PrepareOteServerFile(URI uri, String baseJarURL, List<OTECacheItem> jars, Progress progress, WebClientProvider factory) {
+ public PrepareOteServerFile(URI uri, String baseJarURL, List<OTECacheItem> jars, Progress progress, JaxRsClient factory) {
super(progress);
this.uri = uri;
this.jars = jars;
diff --git a/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/RunTests.java b/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/RunTests.java
index f87cf1703a..77aec5cac2 100644
--- a/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/RunTests.java
+++ b/plugins/org.eclipse.osee.ote.rest.client/src/org/eclipse/osee/ote/rest/client/internal/RunTests.java
@@ -5,7 +5,7 @@ import java.util.concurrent.Callable;
import java.util.logging.Level;
import javax.ws.rs.core.MediaType;
import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.jaxrs.client.WebClientProvider;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.ote.rest.client.Progress;
import org.eclipse.osee.ote.rest.client.ProgressWithCancel;
import org.eclipse.osee.ote.rest.model.OTEJobStatus;
@@ -17,11 +17,11 @@ public class RunTests implements ProgressWithCancel, Callable<ProgressWithCancel
private final URI uri;
private final OTETestRun tests;
private final Progress progress;
- private final WebClientProvider factory;
+ private final JaxRsClient factory;
private OTEJobStatus status;
private String id;
- public RunTests(URI uri, OTETestRun tests, Progress progress, WebClientProvider factory) {
+ public RunTests(URI uri, OTETestRun tests, Progress progress, JaxRsClient factory) {
this.uri = uri;
this.tests = tests;
this.progress = progress;

Back to the top