Skip to content
Snippets Groups Projects
Commit 495d4c5b authored by cramakri's avatar cramakri
Browse files

LMS-1505 Added the ScreeningOpenbisServiceFacadeFactory.

SVN: 15917
parent cd36f406
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ public class ScreeningClientApiTest ...@@ -67,7 +67,7 @@ public class ScreeningClientApiTest
System.out.println(String.format("Connecting to the server '%s' as a user '%s.", serverUrl, System.out.println(String.format("Connecting to the server '%s' as a user '%s.", serverUrl,
userId)); userId));
IScreeningOpenbisServiceFacade facade = IScreeningOpenbisServiceFacade facade =
ScreeningOpenbisServiceFacade.tryCreate(userId, userPassword, serverUrl); ScreeningOpenbisServiceFacadeFactory.tryCreate(userId, userPassword, serverUrl);
if (facade == null) if (facade == null)
{ {
System.err.println("Authentication failed: check the user name and password."); System.err.println("Authentication failed: check the user name and password.");
......
/*
* Copyright 2010 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.plugin.screening.client.api.v1;
/**
* @author Chandrasekhar Ramakrishnan
*/
public class ScreeningOpenbisServiceFacadeFactory
{
/**
* Creates a service facade which communicates with the openBIS server at the specified URL.
* Authenticates the user.
*
* @return null if the user could not be authenticated.
*/
public static IScreeningOpenbisServiceFacade tryCreate(String userId, String userPassword,
String serverUrl)
{
return ScreeningOpenbisServiceFacade.tryCreate(userId, userPassword, serverUrl);
}
/**
* Creates a service facade which communicates with the openBIS server at the specified URL for
* an authenticated user.
*
* @param sessionToken The session token for the authenticated user
* @param serverUrl The URL for the openBIS application server
*/
public static IScreeningOpenbisServiceFacade tryCreate(String sessionToken, String serverUrl)
{
return ScreeningOpenbisServiceFacade.tryCreate(sessionToken, serverUrl);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment