diff options
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/BaseCredentialProvider.java')
-rw-r--r-- | plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/BaseCredentialProvider.java | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/BaseCredentialProvider.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/BaseCredentialProvider.java index 4dea3bfccc1..dfb0d77bae9 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/BaseCredentialProvider.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/BaseCredentialProvider.java @@ -1,47 +1,47 @@ -/*******************************************************************************
- * Copyright (c) 2004, 2007 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;
-
-import java.net.InetAddress;
-import java.util.logging.Level;
-import org.eclipse.osee.framework.core.client.server.HttpServer;
-import org.eclipse.osee.framework.core.data.OseeCodeVersion;
-import org.eclipse.osee.framework.core.data.OseeCredential;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.osee.framework.logging.OseeLog;
-
-/**
- * @author Roberto E. Escobar
- */
-public abstract class BaseCredentialProvider implements ICredentialProvider {
-
- @Override
- public OseeCredential getCredential() throws OseeCoreException {
- OseeCredential credential = new OseeCredential();
- credential.setUserName("");
- credential.setDomain("");
- credential.setPassword("");
- credential.setAuthenticationProtocol("");
- String localAddress = HttpServer.getServerAddressForExternalCommunication();
-
- credential.setClientAddress(Strings.isValid(localAddress) ? localAddress : "Unknown",
- HttpServer.getDefaultServicePort());
- credential.setClientVersion(OseeCodeVersion.getVersion());
- try {
- credential.setClientMachineName(InetAddress.getLocalHost().getHostName());
- } catch (Exception ex) {
- credential.setClientMachineName("Unknown");
- OseeLog.log(CoreClientActivator.class, Level.SEVERE, ex);
- }
- return credential;
- }
-}
+/******************************************************************************* + * Copyright (c) 2004, 2007 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; + +import java.net.InetAddress; +import java.util.logging.Level; +import org.eclipse.osee.framework.core.client.server.HttpServer; +import org.eclipse.osee.framework.core.data.OseeCodeVersion; +import org.eclipse.osee.framework.core.data.OseeCredential; +import org.eclipse.osee.framework.core.exception.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.util.Strings; +import org.eclipse.osee.framework.logging.OseeLog; + +/** + * @author Roberto E. Escobar + */ +public abstract class BaseCredentialProvider implements ICredentialProvider { + + @Override + public OseeCredential getCredential() throws OseeCoreException { + OseeCredential credential = new OseeCredential(); + credential.setUserName(""); + credential.setDomain(""); + credential.setPassword(""); + credential.setAuthenticationProtocol(""); + String localAddress = HttpServer.getServerAddressForExternalCommunication(); + + credential.setClientAddress(Strings.isValid(localAddress) ? localAddress : "Unknown", + HttpServer.getDefaultServicePort()); + credential.setClientVersion(OseeCodeVersion.getVersion()); + try { + credential.setClientMachineName(InetAddress.getLocalHost().getHostName()); + } catch (Exception ex) { + credential.setClientMachineName("Unknown"); + OseeLog.log(CoreClientActivator.class, Level.SEVERE, ex); + } + return credential; + } +} |