Class AbstractAdminPresenter<T extends org.springframework.data.domain.Persistable<Long>,P extends com.gwtplatform.mvp.client.proxy.Proxy<?>,V extends AbstractAdminPresenter.MyViewDef<T,P,V>>

java.lang.Object
com.gwtplatform.mvp.client.HandlerContainerImpl
com.gwtplatform.mvp.client.PresenterWidget<V>
com.gwtplatform.mvp.client.Presenter<V,P>
de.knightsoftnet.mtwidgets.client.ui.page.admin.AbstractAdminPresenter<T,P,V>
Type Parameters:
T - Type of the entity to edit
P - Proxy object
V - View interface
All Implemented Interfaces:
com.google.gwt.event.shared.HasHandlers, IsWidget, com.gwtplatform.mvp.client.HandlerContainer, com.gwtplatform.mvp.client.HasPopupSlot, com.gwtplatform.mvp.client.HasSlots, HasDelete

public abstract class AbstractAdminPresenter<T extends org.springframework.data.domain.Persistable<Long>,P extends com.gwtplatform.mvp.client.proxy.Proxy<?>,V extends AbstractAdminPresenter.MyViewDef<T,P,V>> extends com.gwtplatform.mvp.client.Presenter<V,P> implements HasDelete
Activity/Presenter of the administration page, implementation.
Author:
Manfred Tremmel
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    AbstractAdminPresenter.MyViewDef<T extends org.springframework.data.domain.Persistable<Long>,P extends com.gwtplatform.mvp.client.proxy.Proxy<?>,V extends AbstractAdminPresenter.MyViewDef<T,P,V>>
     

    Nested classes/interfaces inherited from class com.gwtplatform.mvp.client.Presenter

    com.gwtplatform.mvp.client.Presenter.RevealType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final de.knightsoftnet.gwtp.spring.shared.data.AdminResult<Long,T>
     
    protected final com.gwtplatform.dispatch.rest.delegates.client.ResourceDelegate<? extends AdminService<T>>
     
    protected final Session
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractAdminPresenter(com.google.web.bindery.event.shared.EventBus eventBus, V view, P proxy, com.gwtplatform.dispatch.rest.delegates.client.ResourceDelegate<? extends AdminService<T>> service, Session session, DeleteRequestPresenter deleteRequestPresenter, Collection<de.knightsoftnet.gwtp.spring.shared.search.SearchFieldDefinition> searchFields, Collection<de.knightsoftnet.gwtp.spring.shared.search.TableFieldDefinition<T>> searchListFields)
    constructor injecting needed data.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract T
     
    void
     
    void
    deleteEntry(Long entryId)
    delete one entry.
    protected void
    displayChangedEntry(de.knightsoftnet.gwtp.spring.shared.data.AdminResult<Long,T> displayEntry)
     
    void
    displaySearchResult(org.springframework.data.web.PagedModel<T> result, boolean clearSort)
    display search results.
    Collection<de.knightsoftnet.gwtp.spring.shared.search.SearchFieldDefinition>
     
    Collection<de.knightsoftnet.gwtp.spring.shared.search.TableFieldDefinition<T>>
     
    void
     
    void
    prepareFromRequest(com.gwtplatform.mvp.shared.proxy.PlaceRequest request)
     
    void
    read one entry.
    void
    search(String search)
    search for entries.
    void
    search(String search, org.springframework.data.domain.Pageable pageable)
    search for entries.
    void
    updateEntry(T updateEntry)
    update one entry.

    Methods inherited from class com.gwtplatform.mvp.client.Presenter

    bind, forceReveal, getProxy, getRevealType, getSlot, revealInParent, setRevealType, setSlot, unbind, useManualReveal

    Methods inherited from class com.gwtplatform.mvp.client.PresenterWidget

    addHandler, addRegisteredHandler, addToPopupSlot, addToPopupSlot, addToSlot, addToSlot, addVisibleHandler, asWidget, clearSlot, clearSlot, equals, fireEvent, fireEvent, getChild, getChildren, getChildren, getEventBus, getView, hashCode, isVisible, onHide, onReset, onReveal, registerVisibleHandler, removeFromParentSlot, removeFromPopupSlot, removeFromSlot, removeFromSlot, setInSlot, setInSlot, setInSlot, setInSlot

    Methods inherited from class com.gwtplatform.mvp.client.HandlerContainerImpl

    isBound, onBind, onUnbind, registerHandler

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • session

      protected final Session session
    • service

      protected final com.gwtplatform.dispatch.rest.delegates.client.ResourceDelegate<? extends AdminService<T extends org.springframework.data.domain.Persistable<Long>>> service
    • entry

      protected final de.knightsoftnet.gwtp.spring.shared.data.AdminResult<Long,T extends org.springframework.data.domain.Persistable<Long>> entry
  • Constructor Details

    • AbstractAdminPresenter

      protected AbstractAdminPresenter(com.google.web.bindery.event.shared.EventBus eventBus, V view, P proxy, com.gwtplatform.dispatch.rest.delegates.client.ResourceDelegate<? extends AdminService<T>> service, Session session, DeleteRequestPresenter deleteRequestPresenter, Collection<de.knightsoftnet.gwtp.spring.shared.search.SearchFieldDefinition> searchFields, Collection<de.knightsoftnet.gwtp.spring.shared.search.TableFieldDefinition<T>> searchListFields)
      constructor injecting needed data.
  • Method Details

    • prepareFromRequest

      public void prepareFromRequest(com.gwtplatform.mvp.shared.proxy.PlaceRequest request)
      Overrides:
      prepareFromRequest in class com.gwtplatform.mvp.client.Presenter<V extends AbstractAdminPresenter.MyViewDef<T,P,V>,P extends com.gwtplatform.mvp.client.proxy.Proxy<?>>
    • readEntry

      public void readEntry(Long id)
      read one entry.
    • newEntry

      public void newEntry()
    • createNewEntry

      protected abstract T createNewEntry()
    • displayChangedEntry

      protected void displayChangedEntry(de.knightsoftnet.gwtp.spring.shared.data.AdminResult<Long,T> displayEntry)
    • updateEntry

      public void updateEntry(T updateEntry)
      update one entry.
    • deleteEntry

      public void deleteEntry(Long entryId)
      delete one entry.
    • deleteEntry

      public void deleteEntry()
      Specified by:
      deleteEntry in interface HasDelete
    • search

      public void search(String search, org.springframework.data.domain.Pageable pageable)
      search for entries.
      Parameters:
      search - search values
      pageable - paging and sorting
    • search

      public void search(String search)
      search for entries.
      Parameters:
      search - search values
    • displaySearchResult

      public void displaySearchResult(org.springframework.data.web.PagedModel<T> result, boolean clearSort)
      display search results.
      Parameters:
      result - page object with search results
      clearSort - if true, sort is reseted
    • getSearchFieldDefinitions

      public Collection<de.knightsoftnet.gwtp.spring.shared.search.SearchFieldDefinition> getSearchFieldDefinitions()
    • getSearchResultDefinitions

      public Collection<de.knightsoftnet.gwtp.spring.shared.search.TableFieldDefinition<T>> getSearchResultDefinitions()