ccc.client.presenters
Class CreateUserPresenter

java.lang.Object
  extended by ccc.client.core.AbstractPresenter<CreateUser,User>
      extended by ccc.client.presenters.CreateUserPresenter
All Implemented Interfaces:
Editable, EventHandler<CommandType>

public class CreateUserPresenter
extends AbstractPresenter<CreateUser,User>
implements Editable

A controller for user creation.

Author:
Civic Computing Ltd.

Constructor Summary
CreateUserPresenter(CreateUser view)
          Constructor.
 
Method Summary
 void cancel()
          Discard the edits.
 void handle(Event<CommandType> event)
          Handle an event.
protected  void render()
          Render this presenter.
 void save()
          Confirm the edits.
protected  void unbind(User dto)
          Extract data from the view into a DTO.
protected  boolean valid()
          Check that the data in the view is valid.
 
Methods inherited from class ccc.client.core.AbstractPresenter
clearHandlers, dispose, getModel, getView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateUserPresenter

public CreateUserPresenter(CreateUser view)
Constructor.

Parameters:
view - The create user dialog this controller will manage.
Method Detail

render

protected final void render()
Render this presenter.


cancel

public final void cancel()
Discard the edits.

Specified by:
cancel in interface Editable

save

public void save()
Confirm the edits.

Specified by:
save in interface Editable

valid

protected final boolean valid()
Check that the data in the view is valid.

Returns:
True if the data is valid; false otherwise.

unbind

protected final void unbind(User dto)
Extract data from the view into a DTO.

Parameters:
dto - The DTO that will receive the view's data.

handle

public void handle(Event<CommandType> event)
Handle an event.

Specified by:
handle in interface EventHandler<CommandType>
Parameters:
event - The event to handle.


Copyright © 2010. All Rights Reserved.