public abstract class AbstractContentPresenterBase extends Object implements ContentPresenter, ContentView.Listener
ContentPresenter
implementation.Modifier and Type | Field and Description |
---|---|
protected com.vaadin.v7.data.Container |
container |
protected 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 and Description |
---|
AbstractContentPresenterBase(info.magnolia.objectfactory.ComponentProvider componentProvider) |
Modifier and Type | Method and Description |
---|---|
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.v7.data.Item item) |
protected ContentPresenterDefinition |
getPresenterDefinition() |
Object |
getSelectedItemId() |
List<Object> |
getSelectedItemIds() |
protected abstract com.vaadin.v7.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,
ContentConnector contentConnector)
Initializes the presenter with the workbench definition, eventBus and viewType name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
refresh
protected static final String ICON_PROPERTY
protected static final String ICON_TRASH
protected info.magnolia.event.EventBus eventBus
protected WorkbenchDefinition workbenchDefinition
protected String viewTypeName
protected ContentConnector contentConnector
protected com.vaadin.v7.data.Container container
public AbstractContentPresenterBase(info.magnolia.objectfactory.ComponentProvider componentProvider)
protected info.magnolia.objectfactory.ComponentProvider getComponentProvider()
public ContentView start(WorkbenchDefinition workbenchDefinition, info.magnolia.event.EventBus eventBus, String viewTypeName, ContentConnector contentConnector)
ContentPresenter
start
in interface ContentPresenter
workbenchDefinition
- the workbench definition that defines which data to presenteventBus
- the event bus to fire e.g. selection events onviewTypeName
- the view type as defined in the presenter definitionpublic List<Object> getSelectedItemIds()
getSelectedItemIds
in interface ContentPresenter
public Object getSelectedItemId()
public void setSelectedItemIds(List<Object> selectedItemIds)
ContentPresenter
setSelectedItemIds
in interface ContentPresenter
public void onItemSelection(Set<Object> itemIds)
onItemSelection
in interface ContentView.Listener
public void onDoubleClick(Object itemId)
onDoubleClick
in interface ContentView.Listener
public void onRightClick(Object itemId, int clickX, int clickY)
onRightClick
in interface ContentView.Listener
public void onShortcutKey(int keyCode, int[] modifierKeys)
onShortcutKey
in interface ContentView.Listener
protected Iterator<ColumnDefinition> getColumnsIterator()
public abstract String getIcon(com.vaadin.v7.data.Item item)
getIcon
in interface ContentView.Listener
protected List<ColumnDefinition> getAvailableColumns(List<ColumnDefinition> allColumns)
public void select(List<Object> itemIds)
ContentPresenter
select
in interface ContentPresenter
public void expand(Object itemId)
ContentPresenter
expand
in interface ContentPresenter
protected abstract com.vaadin.v7.data.Container initializeContainer()
protected ContentPresenterDefinition getPresenterDefinition()
Copyright © 2020 Magnolia International Ltd.. All rights reserved.