Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2020-05-10 05:22:29 +0000
committerRyan D. Brooks2020-12-15 21:40:21 +0000
commitd98a1db51caa4990aa42c49b7152869aed6271c5 (patch)
tree01ee91e3073d63420a98672bbc06e48b2a08b533
parent66ced531218137d3c9feb114ce8535b495004b7e (diff)
downloadorg.eclipse.osee-d98a1db51caa4990aa42c49b7152869aed6271c5.tar.gz
org.eclipse.osee-d98a1db51caa4990aa42c49b7152869aed6271c5.tar.xz
org.eclipse.osee-d98a1db51caa4990aa42c49b7152869aed6271c5.zip
refactor: Add SessionEndpoint to OseeClient
-rw-r--r--plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.client/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/OseeClient.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java6
4 files changed, 11 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java
index bee55ec4f3e..d89bcf78cde 100644
--- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java
+++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java
@@ -105,7 +105,7 @@ public class InternalClientSessionManager {
try {
OseeCredential credential = credentialProvider.getCredential();
clearData();
- oseeSessionGrant = internalAcquireSession(credential);
+ oseeSessionGrant = getSessionEp().createIdeClientSession(credential);
if (oseeSessionGrant == null) {
return;
} else if (SystemUser.UnAuthenticated.getUserId().equals(oseeSessionGrant.getUserToken().getUserId())) {
@@ -181,10 +181,6 @@ public class InternalClientSessionManager {
this.oseeSessionGrant = null;
}
- private OseeSessionGrant internalAcquireSession(OseeCredential credential) {
- return getSessionEp().createIdeClientSession(credential);
- }
-
private SessionEndpoint getSessionEp() {
return jaxRsApi.newProxy("ide", SessionEndpoint.class);
}
diff --git a/plugins/org.eclipse.osee.orcs.rest.client/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.orcs.rest.client/META-INF/MANIFEST.MF
index f58d226cd40..6e95d3a068d 100644
--- a/plugins/org.eclipse.osee.orcs.rest.client/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.orcs.rest.client/META-INF/MANIFEST.MF
@@ -18,6 +18,7 @@ Import-Package: javax.ws.rs,
org.eclipse.osee.framework.core.enums.token,
org.eclipse.osee.framework.jdk.core.type,
org.eclipse.osee.framework.jdk.core.util,
+ org.eclipse.osee.framework.server.ide.api,
org.eclipse.osee.framework.server.ide.api.client,
org.eclipse.osee.jaxrs.client,
org.eclipse.osee.orcs.rest.model,
diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/OseeClient.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/OseeClient.java
index bb3ed5662ea..c0e6c2ac419 100644
--- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/OseeClient.java
+++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/OseeClient.java
@@ -18,6 +18,7 @@ import org.eclipse.osee.define.api.DataRightsEndpoint;
import org.eclipse.osee.define.api.DefineBranchEndpointApi;
import org.eclipse.osee.define.api.RenderEndpoint;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.server.ide.api.SessionEndpoint;
import org.eclipse.osee.framework.server.ide.api.client.ClientEndpoint;
import org.eclipse.osee.orcs.rest.model.ApplicabilityEndpoint;
import org.eclipse.osee.orcs.rest.model.ApplicabilityUiEndpoint;
@@ -69,4 +70,6 @@ public interface OseeClient {
DefineBranchEndpointApi getDefineBranchEndpoint();
+
+ SessionEndpoint getSessionEndpoint();
} \ No newline at end of file
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 ca1f8e2a15e..056cc605745 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
@@ -28,6 +28,7 @@ import org.eclipse.osee.framework.core.JaxRsApi;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.jdk.core.util.Strings;
+import org.eclipse.osee.framework.server.ide.api.SessionEndpoint;
import org.eclipse.osee.framework.server.ide.api.client.ClientEndpoint;
import org.eclipse.osee.jaxrs.client.JaxRsClient;
import org.eclipse.osee.jaxrs.client.JaxRsExceptions;
@@ -205,6 +206,11 @@ public class OseeClientImpl implements OseeClient, QueryExecutor {
public ActivityLogEndpoint getActivityLogEndpoint() {
return jaxRsApi.newProxy("", ActivityLogEndpoint.class);
}
+
+ @Override
+ public SessionEndpoint getSessionEndpoint() {
+ return jaxRsApi.newProxy("", SessionEndpoint.class);
+ }
@Override
public DefineBranchEndpointApi getDefineBranchEndpoint() {

Back to the top