Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2014-01-11 01:38:56 +0000
committerGerrit Code Review @ Eclipse.org2014-01-13 18:52:49 +0000
commit49e09eb4c46b84b2f5510d725b4c6db8986ac1a9 (patch)
treeb847d17456493178ef6db4e10d0a86cd592a38fa /plugins
parent3c82fe963f22246bf32eb341c71ebff41aebfe92 (diff)
downloadorg.eclipse.osee-49e09eb4c46b84b2f5510d725b4c6db8986ac1a9.tar.gz
org.eclipse.osee-49e09eb4c46b84b2f5510d725b4c6db8986ac1a9.tar.xz
org.eclipse.osee-49e09eb4c46b84b2f5510d725b4c6db8986ac1a9.zip
bug[ats_ATS10062]: Remove core.model dependency from REST client
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/URIProviderImpl.java12
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/URIProvider.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OrcsClientModule.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/StandadloneUriProviderImpl.java (renamed from plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandadloneUriProviderImpl.java)25
-rw-r--r--plugins/org.eclipse.osee.rest.client/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/OseeHttpProxyAddress.java (renamed from plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/OseeHttpProxyAddress.java)2
-rw-r--r--plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/OseeServerAddress.java (renamed from plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/OseeServerAddress.java)2
-rw-r--r--plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandadloneWebClientProvider.java1
-rw-r--r--plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandaloneModule.java4
9 files changed, 10 insertions, 43 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/URIProviderImpl.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/URIProviderImpl.java
index 79db9755d8..624382ea27 100644
--- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/URIProviderImpl.java
+++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/URIProviderImpl.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.core.client.internal;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.Map;
import org.eclipse.osee.framework.core.client.server.HttpUrlBuilderClient;
import org.eclipse.osee.framework.core.exception.OseeExceptions;
import org.eclipse.osee.framework.core.services.URIProvider;
@@ -35,15 +34,4 @@ public class URIProviderImpl implements URIProvider {
return toReturn;
}
- @Override
- public URI getEncodedURI(String context, Map<String, String> params) throws OseeCoreException {
- URI toReturn = null;
- try {
- toReturn = new URI(HttpUrlBuilderClient.getInstance().getOsgiServletServiceUrl(context, params));
- } catch (Exception ex) {
- OseeExceptions.wrapAndThrow(ex);
- }
- return toReturn;
- }
-
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/URIProvider.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/URIProvider.java
index 273718c0ce..8e36f82b5c 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/URIProvider.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/URIProvider.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.framework.core.services;
import java.net.URI;
-import java.util.Map;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
@@ -22,6 +21,4 @@ public interface URIProvider {
URI getApplicationServerURI() throws OseeCoreException;
- URI getEncodedURI(String context, Map<String, String> params) throws OseeCoreException;
-
}
diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OrcsClientModule.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OrcsClientModule.java
index 245802ce93..125c3a03bc 100644
--- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OrcsClientModule.java
+++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OrcsClientModule.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.orcs.rest.client.internal;
+import org.eclipse.osee.framework.core.services.URIProvider;
import org.eclipse.osee.orcs.rest.client.OseeClient;
import com.google.inject.AbstractModule;
import com.google.inject.TypeLiteral;
@@ -42,6 +43,7 @@ public class OrcsClientModule extends AbstractModule {
}
};
bindListener(subtypeOf(OseeClientImpl.class), listener);
+ bind(URIProvider.class).to(StandadloneUriProviderImpl.class);
}
private static Matcher<? super TypeLiteral<?>> subtypeOf(Class<?> superclass) {
diff --git a/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandadloneUriProviderImpl.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/StandadloneUriProviderImpl.java
index 787bbfb22a..3aa48e1720 100644
--- a/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandadloneUriProviderImpl.java
+++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/StandadloneUriProviderImpl.java
@@ -8,15 +8,13 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.rest.client.internal;
+package org.eclipse.osee.orcs.rest.client.internal;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.Map;
-import java.util.Map.Entry;
-import javax.ws.rs.core.UriBuilder;
import org.eclipse.osee.framework.core.services.URIProvider;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.rest.client.OseeServerAddress;
import com.google.inject.Inject;
/**
@@ -31,32 +29,15 @@ public class StandadloneUriProviderImpl implements URIProvider {
this.serverAddress = serverAddress;
}
- public String getServerAddress() {
- String value = serverAddress;
- if (!value.endsWith("/")) {
- value += '/';
- }
- return value;
- }
-
@Override
public URI getApplicationServerURI() {
URI toReturn = null;
try {
- toReturn = new URI(getServerAddress());
+ toReturn = new URI(serverAddress);
} catch (URISyntaxException ex) {
throw new OseeCoreException(ex);
}
return toReturn;
}
- @Override
- public URI getEncodedURI(String context, Map<String, String> params) {
- UriBuilder builder = UriBuilder.fromPath(getServerAddress()).path(context);
- for (Entry<String, String> entry : params.entrySet()) {
- builder.queryParam(entry.getKey(), entry.getValue());
- }
- return builder.build();
- }
-
};
diff --git a/plugins/org.eclipse.osee.rest.client/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.rest.client/META-INF/MANIFEST.MF
index cf2d3315ba..d3af4e848b 100644
--- a/plugins/org.eclipse.osee.rest.client/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.rest.client/META-INF/MANIFEST.MF
@@ -17,8 +17,6 @@ Import-Package: com.google.inject,
javax.ws.rs,
javax.ws.rs.core,
org.eclipse.core.net.proxy,
- org.eclipse.osee.framework.core.exception,
- org.eclipse.osee.framework.core.services,
org.eclipse.osee.framework.jdk.core.type,
org.eclipse.osee.framework.jdk.core.util
Export-Package: org.eclipse.osee.rest.client
diff --git a/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/OseeHttpProxyAddress.java b/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/OseeHttpProxyAddress.java
index e156d30885..cab41a43c1 100644
--- a/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/OseeHttpProxyAddress.java
+++ b/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/OseeHttpProxyAddress.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.rest.client.internal;
+package org.eclipse.osee.rest.client;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/OseeServerAddress.java b/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/OseeServerAddress.java
index 7c3bfe1df2..e1f7512b80 100644
--- a/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/OseeServerAddress.java
+++ b/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/OseeServerAddress.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.rest.client.internal;
+package org.eclipse.osee.rest.client;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandadloneWebClientProvider.java b/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandadloneWebClientProvider.java
index 93994d177f..8e32508fdb 100644
--- a/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandadloneWebClientProvider.java
+++ b/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandadloneWebClientProvider.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.rest.client.internal;
import java.net.URI;
import java.util.Map;
import org.eclipse.osee.framework.jdk.core.util.Strings;
+import org.eclipse.osee.rest.client.OseeHttpProxyAddress;
import org.eclipse.osee.rest.client.WebClientProvider;
import com.google.inject.Inject;
import com.sun.jersey.api.client.AsyncWebResource;
diff --git a/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandaloneModule.java b/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandaloneModule.java
index 2266838786..c184a5b651 100644
--- a/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandaloneModule.java
+++ b/plugins/org.eclipse.osee.rest.client/src/org/eclipse/osee/rest/client/internal/StandaloneModule.java
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.eclipse.osee.rest.client.internal;
-import org.eclipse.osee.framework.core.services.URIProvider;
import org.eclipse.osee.rest.client.OseeClientConfig;
+import org.eclipse.osee.rest.client.OseeHttpProxyAddress;
+import org.eclipse.osee.rest.client.OseeServerAddress;
import org.eclipse.osee.rest.client.WebClientProvider;
import com.google.inject.AbstractModule;
@@ -32,6 +33,5 @@ public class StandaloneModule extends AbstractModule {
bindConstant().annotatedWith(OseeHttpProxyAddress.class).to(config.getProxyAddress());
bind(WebClientProvider.class).to(StandadloneWebClientProvider.class);
- bind(URIProvider.class).to(StandadloneUriProviderImpl.class);
}
}

Back to the top