Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2013-01-18 19:31:46 +0000
committerRoberto E. Escobar2013-01-18 19:37:25 +0000
commit1be9de09381c28eebb3df604ae645f3210d9474c (patch)
tree7adb1584383fcb58a4fe6e45334056788b060227 /plugins/org.eclipse.osee.framework.core.client
parent020d9bb530a0f53cc18e2be4520c8bed49fb3dcc (diff)
downloadorg.eclipse.osee-1be9de09381c28eebb3df604ae645f3210d9474c.tar.gz
org.eclipse.osee-1be9de09381c28eebb3df604ae645f3210d9474c.tar.xz
org.eclipse.osee-1be9de09381c28eebb3df604ae645f3210d9474c.zip
feature[ats_L63H6]: Implement client rest search api
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.client')
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/OSGI-INF/client.uri.provider.xml7
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/URIProviderImpl.java49
3 files changed, 58 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.client/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.core.client/META-INF/MANIFEST.MF
index 8885a23285f..a6310825f07 100644
--- a/plugins/org.eclipse.osee.framework.core.client/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.core.client/META-INF/MANIFEST.MF
@@ -12,6 +12,7 @@ Import-Package: org.eclipse.core.runtime,
org.eclipse.osee.framework.core.data,
org.eclipse.osee.framework.core.enums,
org.eclipse.osee.framework.core.exception,
+ org.eclipse.osee.framework.core.services,
org.eclipse.osee.framework.core.util,
org.eclipse.osee.framework.database.core,
org.eclipse.osee.framework.jdk.core.util,
@@ -23,4 +24,4 @@ Import-Package: org.eclipse.core.runtime,
Export-Package: org.eclipse.osee.framework.core.client,
org.eclipse.osee.framework.core.client.server,
org.eclipse.osee.framework.core.client.task
-Service-Component: OSGI-INF/client.database.provider.xml
+Service-Component: OSGI-INF/*.xml
diff --git a/plugins/org.eclipse.osee.framework.core.client/OSGI-INF/client.uri.provider.xml b/plugins/org.eclipse.osee.framework.core.client/OSGI-INF/client.uri.provider.xml
new file mode 100644
index 00000000000..ca0646b675d
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.client/OSGI-INF/client.uri.provider.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.framework.core.client.internal.URIProviderImpl">
+ <implementation class="org.eclipse.osee.framework.core.client.internal.URIProviderImpl"/>
+ <service>
+ <provide interface="org.eclipse.osee.framework.core.services.URIProvider"/>
+ </service>
+</scr:component>
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
new file mode 100644
index 00000000000..135c6def290
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/URIProviderImpl.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+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.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.OseeExceptions;
+import org.eclipse.osee.framework.core.services.URIProvider;
+
+/**
+ * @author John Misinco
+ * @author Roberto E. Escobar
+ */
+public class URIProviderImpl implements URIProvider {
+
+ @Override
+ public URI getApplicationServerURI() throws OseeCoreException {
+ URI toReturn = null;
+ try {
+ toReturn = new URI(HttpUrlBuilderClient.getInstance().getApplicationServerPrefix());
+ } catch (URISyntaxException ex) {
+ OseeExceptions.wrapAndThrow(ex);
+ }
+ 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;
+ }
+
+}

Back to the top