info.magnolia.ui.contentapp.browser
Class BrowserPresenter
java.lang.Object
info.magnolia.ui.contentapp.browser.BrowserPresenter
- All Implemented Interfaces:
- ActionbarPresenter.Listener, BrowserView.Listener
public class BrowserPresenter
- extends Object
- implements ActionbarPresenter.Listener, BrowserView.Listener
The browser is a core component of AdminCentral. It represents the main hub through which users can interact with
JCR data. It is compounded by three main sub-components:
- a configurable data grid.
- a configurable function toolbar on top of the data grid, providing operations such as switching from tree to list view or thumbnail view or performing searches on data.
- a configurable action bar on the right hand side, showing the available operations for the given workspace and the selected item.
Its main configuration point is the WorkbenchDefinition
through which one defines the JCR workspace to connect to, the columns/properties to display, the available actions and so on.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BrowserPresenter
@Inject
public BrowserPresenter(ActionExecutor actionExecutor,
SubAppContext subAppContext,
BrowserView view,
@Named(value="admincentral")
info.magnolia.event.EventBus admincentralEventBus,
@Named(value="subapp")
info.magnolia.event.EventBus subAppEventBus,
ActionbarPresenter actionbarPresenter,
info.magnolia.objectfactory.ComponentProvider componentProvider,
WorkbenchPresenter workbenchPresenter)
start
public BrowserView start()
getSelectedItemIds
public List<String> getSelectedItemIds()
getDefaultViewType
public String getDefaultViewType()
- Returns:
- The configured default view Type.
If non define, return the first Content Definition as default.
hasViewType
public boolean hasViewType(String viewType)
getView
public BrowserView getView()
getActionbarPresenter
public ActionbarPresenter getActionbarPresenter()
getWorkspace
public String getWorkspace()
resync
public void resync(List<String> itemIds,
String viewType,
String query)
- Synchronizes the underlying view to reflect the status extracted from the Location token, i.e. selected itemId,
view type and optional query (in case of a search view).
onActionbarItemClicked
public void onActionbarItemClicked(String itemName)
- Specified by:
onActionbarItemClicked
in interface ActionbarPresenter.Listener
onActionBarSelection
public void onActionBarSelection(String actionName)
- Specified by:
onActionBarSelection
in interface BrowserView.Listener
getLabel
public String getLabel(String itemName)
- Specified by:
getLabel
in interface ActionbarPresenter.Listener
getIcon
public String getIcon(String itemName)
- Specified by:
getIcon
in interface ActionbarPresenter.Listener
Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.