info.magnolia.ui.workbench
Class AbstractContentPresenterBase

java.lang.Object
  extended by info.magnolia.ui.workbench.AbstractContentPresenterBase
All Implemented Interfaces:
ContentPresenter, ContentView.Listener
Direct Known Subclasses:
AbstractContentPresenter

public abstract class AbstractContentPresenterBase
extends Object
implements ContentPresenter, ContentView.Listener

Abstract JCR-agnostic ContentPresenter implementation.


Field Summary
protected  com.vaadin.data.Container container
           
protected  info.magnolia.ui.vaadin.integration.contentconnector.ContentConnector contentConnector
           
protected  info.magnolia.event.EventBus eventBus
           
protected static String ICON_PROPERTY
           
protected static String ICON_TRASH
           
protected  String viewTypeName
           
protected  WorkbenchDefinition workbenchDefinition
           
 
Constructor Summary
AbstractContentPresenterBase(info.magnolia.objectfactory.ComponentProvider componentProvider)
           
 
Method Summary
 void expand(Object itemId)
          Make sure the given items are visible in the content view.
protected  List<ColumnDefinition> getAvailableColumns(List<ColumnDefinition> allColumns)
           
protected  Iterator<ColumnDefinition> getColumnsIterator()
           
protected  info.magnolia.objectfactory.ComponentProvider getComponentProvider()
           
abstract  String getIcon(com.vaadin.data.Item item)
           
protected  ContentPresenterDefinition getPresenterDefinition()
           
 Object getSelectedItemId()
           
 List<Object> getSelectedItemIds()
           
protected abstract  com.vaadin.data.Container initializeContainer()
           
 void onDoubleClick(Object itemId)
           
 void onItemSelection(Set<Object> itemIds)
           
 void onRightClick(Object itemId, int clickX, int clickY)
           
 void onShortcutKey(int keyCode, int[] modifierKeys)
           
 void select(List<Object> itemIds)
          Selects the given items in the content view.
 void setSelectedItemIds(List<Object> selectedItemIds)
          Sets the selected item ids for this presenter to react on, e.g.
 ContentView start(WorkbenchDefinition workbenchDefinition, info.magnolia.event.EventBus eventBus, String viewTypeName, info.magnolia.ui.vaadin.integration.contentconnector.ContentConnector contentConnector)
          Initializes the presenter with the workbench definition, eventBus and viewType name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.magnolia.ui.workbench.ContentPresenter
refresh
 

Field Detail

ICON_PROPERTY

protected static final String ICON_PROPERTY
See Also:
Constant Field Values

ICON_TRASH

protected static final String ICON_TRASH
See Also:
Constant Field Values

eventBus

protected info.magnolia.event.EventBus eventBus

workbenchDefinition

protected WorkbenchDefinition workbenchDefinition

viewTypeName

protected String viewTypeName

contentConnector

protected info.magnolia.ui.vaadin.integration.contentconnector.ContentConnector contentConnector

container

protected com.vaadin.data.Container container
Constructor Detail

AbstractContentPresenterBase

public AbstractContentPresenterBase(info.magnolia.objectfactory.ComponentProvider componentProvider)
Method Detail

getComponentProvider

protected info.magnolia.objectfactory.ComponentProvider getComponentProvider()

start

public ContentView start(WorkbenchDefinition workbenchDefinition,
                         info.magnolia.event.EventBus eventBus,
                         String viewTypeName,
                         info.magnolia.ui.vaadin.integration.contentconnector.ContentConnector contentConnector)
Description copied from interface: ContentPresenter
Initializes the presenter with the workbench definition, eventBus and viewType name.

Specified by:
start in interface ContentPresenter
Parameters:
workbenchDefinition - the workbench definition that defines which data to present
eventBus - the event bus to fire e.g. selection events on
viewTypeName - the view type as defined in the presenter definition
Returns:
the content view

getSelectedItemIds

public List<Object> getSelectedItemIds()
Specified by:
getSelectedItemIds in interface ContentPresenter
Returns:
the selected item ids in the content view.

getSelectedItemId

public Object getSelectedItemId()

setSelectedItemIds

public void setSelectedItemIds(List<Object> selectedItemIds)
Description copied from interface: ContentPresenter
Sets the selected item ids for this presenter to react on, e.g. with keyboard shortcuts.

Specified by:
setSelectedItemIds in interface ContentPresenter

onItemSelection

public void onItemSelection(Set<Object> itemIds)
Specified by:
onItemSelection in interface ContentView.Listener

onDoubleClick

public void onDoubleClick(Object itemId)
Specified by:
onDoubleClick in interface ContentView.Listener

onRightClick

public void onRightClick(Object itemId,
                         int clickX,
                         int clickY)
Specified by:
onRightClick in interface ContentView.Listener

onShortcutKey

public void onShortcutKey(int keyCode,
                          int[] modifierKeys)
Specified by:
onShortcutKey in interface ContentView.Listener

getColumnsIterator

protected Iterator<ColumnDefinition> getColumnsIterator()

getIcon

public abstract String getIcon(com.vaadin.data.Item item)
Specified by:
getIcon in interface ContentView.Listener

getAvailableColumns

protected List<ColumnDefinition> getAvailableColumns(List<ColumnDefinition> allColumns)

select

public void select(List<Object> itemIds)
Description copied from interface: ContentPresenter
Selects the given items in the content view.

Specified by:
select in interface ContentPresenter

expand

public void expand(Object itemId)
Description copied from interface: ContentPresenter
Make sure the given items are visible in the content view.

Specified by:
expand in interface ContentPresenter

initializeContainer

protected abstract com.vaadin.data.Container initializeContainer()

getPresenterDefinition

protected ContentPresenterDefinition getPresenterDefinition()


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.