ccc.client.presenters
Class GroupPresenter

java.lang.Object
  extended by ccc.client.core.AbstractPresenter<GroupPresenter.GroupView,Group>
      extended by ccc.client.presenters.GroupPresenter
All Implemented Interfaces:
Editable, EventHandler<CommandType>
Direct Known Subclasses:
CreateGroupPresenter, UpdateGroupPresenter

public abstract class GroupPresenter
extends AbstractPresenter<GroupPresenter.GroupView,Group>
implements Editable

Abstract base class for group presenters.

Author:
Civic Computing Ltd.

Nested Class Summary
static interface GroupPresenter.GroupView
          MVP view of a group.
 
Constructor Summary
GroupPresenter(GroupPresenter.GroupView view)
          Constructor.
GroupPresenter(GroupPresenter.GroupView view, Group group)
          Constructor.
 
Method Summary
protected  void bind(Group dto)
          Extract data from a DTO into the view.
 void cancel()
          Discard the edits.
protected  void render()
          Render this presenter.
protected  void unbind(Group 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
 
Methods inherited from interface ccc.client.core.Editable
save
 
Methods inherited from interface ccc.client.events.EventHandler
handle
 

Constructor Detail

GroupPresenter

public GroupPresenter(GroupPresenter.GroupView view)
Constructor.

Parameters:
view - The MVP view for this presenter.

GroupPresenter

public GroupPresenter(GroupPresenter.GroupView view,
                      Group group)
Constructor.

Parameters:
view - The MVP view for this presenter.
group - The group to update.
Method Detail

render

protected final void render()
Render this presenter.


valid

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

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

cancel

public final void cancel()
Discard the edits.

Specified by:
cancel in interface Editable

bind

protected final void bind(Group dto)
Extract data from a DTO into the view.

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

unbind

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

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


Copyright © 2010. All Rights Reserved.