portal.core.login
Interface LoginClient

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
SimpleLoginClient

public interface LoginClient
extends java.io.Serializable

This interface can be implemented to create a custom login user interface. It is then the responsibility of the implementation to create the required user interface components to ask the user for a username and password.

When the framework instantiates the configured implementation, the init method is called and is passed an implementation of the LoginCallback interface. Using this interface the login client implementation can initiate an actual login after it acquired the necessary information from the user.

The method getComponent is called when the framework will actually render the login client to the user.

After a call to the passed login callback succeeds, the framework will instruct this login client to destroy itself by calling the destroy method.

See also LoginCallback.

Since:
0.9
Author:
bavodr

Method Summary
 void destroy()
          Called when the login client is no longer used and can clean up any resources it holds.
 Component getComponent()
          Retrieves the top level component representing the user interface of this login client.
 void init(LoginCallback callback)
          Initialize the login client.
 

Method Detail

init

public void init(LoginCallback callback)
          throws PortalException

Initialize the login client. This method will only be called once. A reference to a login callback is passed for further use in the login process.

Parameters:
callback - an instance of the LoginCallback interface
Throws:
PortalException

getComponent

public Component getComponent()
                       throws PortalException

Retrieves the top level component representing the user interface of this login client.

Returns:
the top level component representing the user interface of this login client
Throws:
PortalException

destroy

public void destroy()
             throws PortalException

Called when the login client is no longer used and can clean up any resources it holds.

Throws:
PortalException