Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-07-20 01:10:18 +0000
committerrescobar2010-07-20 01:10:18 +0000
commit1098f57554e51ffb0c89c0407eea6361ad12b491 (patch)
tree0bb4f2e0c6da1ca4356a0f78eccc2fb3e4648da4 /plugins/org.eclipse.osee.framework.core.server
parent8f5b43321674f534d27a72d256b02089c287b041 (diff)
downloadorg.eclipse.osee-1098f57554e51ffb0c89c0407eea6361ad12b491.tar.gz
org.eclipse.osee-1098f57554e51ffb0c89c0407eea6361ad12b491.tar.xz
org.eclipse.osee-1098f57554e51ffb0c89c0407eea6361ad12b491.zip
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.server')
-rw-r--r--plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ServerActivator.java38
-rw-r--r--plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/authentication/DemoAuthenticationProvider.java31
-rw-r--r--plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/authentication/TrustAllAuthenticationProvider.java41
3 files changed, 37 insertions, 73 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ServerActivator.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ServerActivator.java
index 71831cf1b92..f81e51cafb5 100644
--- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ServerActivator.java
+++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ServerActivator.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.framework.core.server.internal;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.osee.framework.core.server.IApplicationServerManager;
-import org.eclipse.osee.framework.core.server.IAuthenticationManager;
import org.eclipse.osee.framework.core.server.ISessionManager;
import org.eclipse.osee.framework.core.server.internal.session.SessionManagerTrackingHandler;
import org.eclipse.osee.framework.core.util.ServiceDependencyTracker;
@@ -27,10 +26,7 @@ import org.osgi.util.tracker.ServiceTracker;
public class ServerActivator implements BundleActivator {
private ServiceTracker applicationManagerTracker;
- // private ServiceTracker applicationLookupTracker;
- private ServiceTracker authenticationServiceTracker;
private ServiceTracker sessionServiceTracker;
- // private ServiceTracker scheduledServerTracker;
private static List<ServiceRegistration> services;
private static ServerActivator instance;
@@ -54,18 +50,10 @@ public class ServerActivator implements BundleActivator {
applicationManagerTracker = new ServiceTracker(context, IApplicationServerManager.class.getName(), null);
applicationManagerTracker.open();
- //
- // applicationLookupTracker = new ServiceTracker(context, IApplicationServerLookup.class.getName(), null);
- // applicationLookupTracker.open();
- //
- authenticationServiceTracker = new ServiceTracker(context, IAuthenticationManager.class.getName(), null);
- authenticationServiceTracker.open();
- //
+
sessionServiceTracker = new ServiceTracker(context, ISessionManager.class.getName(), null);
sessionServiceTracker.open();
- //
- // scheduledServerTracker = new ServiceTracker(context, IServerTaskScheduler.class.getName(), null);
- // scheduledServerTracker.open();
+
}
@Override
@@ -90,26 +78,11 @@ public class ServerActivator implements BundleActivator {
applicationManagerTracker = null;
}
- // if (applicationLookupTracker != null) {
- // applicationLookupTracker.close();
- // applicationLookupTracker = null;
- // }
-
- if (authenticationServiceTracker != null) {
- authenticationServiceTracker.close();
- authenticationServiceTracker = null;
- }
-
if (sessionServiceTracker != null) {
sessionServiceTracker.close();
sessionServiceTracker = null;
}
- // if (scheduledServerTracker != null) {
- // scheduledServerTracker.close();
- // scheduledServerTracker = null;
- // }
-
for (ServiceRegistration service : services) {
service.unregister();
}
@@ -117,13 +90,6 @@ public class ServerActivator implements BundleActivator {
instance = null;
}
- public static IAuthenticationManager getAuthenticationManager() {
- if (instance.authenticationServiceTracker != null) {
- return (IAuthenticationManager) instance.authenticationServiceTracker.getService();
- }
- return null;
- }
-
public static ISessionManager getSessionManager() {
if (instance != null && instance.sessionServiceTracker != null) {
return (ISessionManager) instance.sessionServiceTracker.getService();
diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/authentication/DemoAuthenticationProvider.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/authentication/DemoAuthenticationProvider.java
index 7d4fb144d7d..82870212ec4 100644
--- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/authentication/DemoAuthenticationProvider.java
+++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/authentication/DemoAuthenticationProvider.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.core.server.internal.authentication;
import org.eclipse.osee.framework.core.data.IOseeUserInfo;
import org.eclipse.osee.framework.core.data.OseeCredential;
-import org.eclipse.osee.framework.core.exception.OseeAuthenticationException;
import org.eclipse.osee.framework.core.server.IAuthenticationProvider;
import org.eclipse.osee.framework.core.server.UserDataStore;
@@ -21,23 +20,23 @@ import org.eclipse.osee.framework.core.server.UserDataStore;
*/
public class DemoAuthenticationProvider implements IAuthenticationProvider {
- private final boolean autoAuthenticate = true;
- private final String DEMO_USER = "Joe Smith";
+ private final boolean autoAuthenticate = true;
+ private final String DEMO_USER = "Joe Smith";
- @Override
- public IOseeUserInfo asOseeUserId(OseeCredential credential) throws OseeAuthenticationException {
- IOseeUserInfo oseeUserInfo = UserDataStore.getOseeUserFromOseeDb(DEMO_USER);
- return oseeUserInfo != null ? oseeUserInfo : UserDataStore.createUser(true, DEMO_USER, DEMO_USER, "", true);
- }
+ @Override
+ public IOseeUserInfo asOseeUserId(OseeCredential credential) {
+ IOseeUserInfo oseeUserInfo = UserDataStore.getOseeUserFromOseeDb(DEMO_USER);
+ return oseeUserInfo != null ? oseeUserInfo : UserDataStore.createUser(true, DEMO_USER, DEMO_USER, "", true);
+ }
- @Override
- public boolean authenticate(OseeCredential credential) throws OseeAuthenticationException {
- return autoAuthenticate;
- }
+ @Override
+ public boolean authenticate(OseeCredential credential) {
+ return autoAuthenticate;
+ }
- @Override
- public String getProtocol() {
- return "demo";
- }
+ @Override
+ public String getProtocol() {
+ return "demo";
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/authentication/TrustAllAuthenticationProvider.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/authentication/TrustAllAuthenticationProvider.java
index 178c6993856..1afabd8f908 100644
--- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/authentication/TrustAllAuthenticationProvider.java
+++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/authentication/TrustAllAuthenticationProvider.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.framework.core.server.internal.authentication;
import org.eclipse.osee.framework.core.data.IOseeUserInfo;
import org.eclipse.osee.framework.core.data.OseeCredential;
import org.eclipse.osee.framework.core.data.SystemUser;
-import org.eclipse.osee.framework.core.exception.OseeAuthenticationException;
import org.eclipse.osee.framework.core.server.IAuthenticationProvider;
import org.eclipse.osee.framework.core.server.UserDataStore;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -23,27 +22,27 @@ import org.eclipse.osee.framework.jdk.core.util.Strings;
*/
public class TrustAllAuthenticationProvider implements IAuthenticationProvider {
- @Override
- public boolean authenticate(OseeCredential credential) throws OseeAuthenticationException {
- return true;
- }
+ @Override
+ public boolean authenticate(OseeCredential credential) {
+ return true;
+ }
- @Override
- public String getProtocol() {
- return "trustAll";
- }
+ @Override
+ public String getProtocol() {
+ return "trustAll";
+ }
- @Override
- public IOseeUserInfo asOseeUserId(OseeCredential credential) throws OseeAuthenticationException {
- IOseeUserInfo oseeUserId = SystemUser.Guest;
- String userName = credential.getUserName();
- if (Strings.isValid(userName)) {
- oseeUserId = UserDataStore.getOseeUserFromOseeDb(userName);
- if (oseeUserId == null) {
- oseeUserId = UserDataStore.createUser(true, userName, userName, "", true);
- }
- }
- return oseeUserId;
- }
+ @Override
+ public IOseeUserInfo asOseeUserId(OseeCredential credential) {
+ IOseeUserInfo oseeUserId = SystemUser.Guest;
+ String userName = credential.getUserName();
+ if (Strings.isValid(userName)) {
+ oseeUserId = UserDataStore.getOseeUserFromOseeDb(userName);
+ if (oseeUserId == null) {
+ oseeUserId = UserDataStore.createUser(true, userName, userName, "", true);
+ }
+ }
+ return oseeUserId;
+ }
}

Back to the top