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>>

  • 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 de.knightsoftnet.gwtp.spring.shared.data.AdminResult<Long,​T> entry  
      protected com.gwtplatform.dispatch.rest.delegates.client.ResourceDelegate<? extends AdminService<T>> service  
      protected Session session  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractAdminPresenter​(com.google.web.bindery.event.shared.EventBus peventBus, V pview, P pproxy, com.gwtplatform.dispatch.rest.delegates.client.ResourceDelegate<? extends AdminService<T>> pservice, Session psession, DeleteRequestPresenter pdeleteRequestPresenter, Collection<de.knightsoftnet.gwtp.spring.shared.search.SearchFieldDefinition> psearchFields, Collection<de.knightsoftnet.gwtp.spring.shared.search.TableFieldDefinition<T>> psearchListFields)
      constructor injecting needed data.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract T createNewEntry()  
      void deleteEntry()  
      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.domain.Page<T> result, boolean clearSort)
      display search results.
      Collection<de.knightsoftnet.gwtp.spring.shared.search.SearchFieldDefinition> getSearchFieldDefinitions()  
      Collection<de.knightsoftnet.gwtp.spring.shared.search.TableFieldDefinition<T>> getSearchResultDefinitions()  
      void newEntry()  
      void prepareFromRequest​(com.gwtplatform.mvp.shared.proxy.PlaceRequest prequest)  
      void readEntry​(Long pid)
      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
    • Field Detail

      • 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 Detail

      • AbstractAdminPresenter

        protected AbstractAdminPresenter​(com.google.web.bindery.event.shared.EventBus peventBus,
                                         V pview,
                                         P pproxy,
                                         com.gwtplatform.dispatch.rest.delegates.client.ResourceDelegate<? extends AdminService<T>> pservice,
                                         Session psession,
                                         DeleteRequestPresenter pdeleteRequestPresenter,
                                         Collection<de.knightsoftnet.gwtp.spring.shared.search.SearchFieldDefinition> psearchFields,
                                         Collection<de.knightsoftnet.gwtp.spring.shared.search.TableFieldDefinition<T>> psearchListFields)
        constructor injecting needed data.
    • Method Detail

      • prepareFromRequest

        public void prepareFromRequest​(com.gwtplatform.mvp.shared.proxy.PlaceRequest prequest)
        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 pid)
        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.
      • 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.domain.Page<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()