org.eclipse.emf.emfstore.internal.client.ui.dialogs.login
Class BasicUISessionProvider

java.lang.Object
  extended by org.eclipse.emf.emfstore.client.sessionprovider.ESAbstractSessionProvider
      extended by org.eclipse.emf.emfstore.internal.client.ui.dialogs.login.BasicUISessionProvider

public class BasicUISessionProvider
extends ESAbstractSessionProvider

An implementation of a session providers that uses a server selection and a login dialog to authenticate users.

Author:
wesendon, emueller

Constructor Summary
BasicUISessionProvider()
           
 
Method Summary
 ESUsersession login(ESUsersession usersession)
           This method is called by the SessionManager in order to login a given user session.
 ESUsersession provideUsersession(ESServer server)
           This is the template method for ESAbstractSessionProvider.provideUsersession(ESServer).
 
Methods inherited from class org.eclipse.emf.emfstore.client.sessionprovider.ESAbstractSessionProvider
provideUsersession
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicUISessionProvider

public BasicUISessionProvider()
Method Detail

provideUsersession

public ESUsersession provideUsersession(ESServer server)
                                 throws ESException

This is the template method for ESAbstractSessionProvider.provideUsersession(ESServer). It is called, if the latter couldn't determine a suitable user session. Use this in order to implement a session selection UI or a headless selection logic.

Specified by:
provideUsersession in class ESAbstractSessionProvider
Parameters:
server - This parameter is a hint from the ESServer. For that reason it can be null. A common example is share, where the user first has to select the server before logging in. If ESServer is set you should allow the user to select the account for the given server.
Returns:
an user session. It is not specified whether this session is logged in or logged out.
Throws:
ESException - in case an exception occurred while obtaining the user session
See Also:
ESAbstractSessionProvider.provideUsersession(org.eclipse.emf.emfstore.client.ESServer)

login

public ESUsersession login(ESUsersession usersession)
                    throws ESException
Description copied from class: ESAbstractSessionProvider

This method is called by the SessionManager in order to login a given user session. If the given session can not be logged in, it is the provider's responsibility to either throw an exception or to provide another valid session, e.g. by means of calling a login hdialog that will create a new session.

Specified by:
login in class ESAbstractSessionProvider
Parameters:
usersession - the session to be logged in
Returns:
a logged in user session, possibly another one as the one passed in. It is the provider's responsibility to determine whether the passed in session and the one that is returned need to differ
Throws:
ESException - in case an exception occurred while logging in the given session


Copyright © 2015. All Rights Reserved.