D
- The OpenCreateDialogActionDefinition
type.public abstract class AbstractAddResourceAction<D extends OpenCreateDialogActionDefinition> extends AbstractResourceAction<D>
This action opens a dialog to the user for typing the resource/folder name. Once the dialog is confirmed, it
triggers the method addResource()
and creates a new resource (see AddResourceAction
) or a new folder
(see AddResourceFolderAction
).
OpenCreateDialogActionDefinition
Modifier and Type | Field and Description |
---|---|
protected AppContext |
appContext |
protected ResourcesContentConnector |
contentConnector |
protected info.magnolia.event.EventBus |
eventBus |
protected info.magnolia.i18nsystem.SimpleTranslator |
i18n |
protected LocationController |
locationController |
protected UiContext |
uiContext |
DETAIL_SUBAPP_NAME, HOTFIX_SUBAPP_NAME
Constructor and Description |
---|
AbstractAddResourceAction(D definition,
Item resourceItem,
FormDialogPresenterFactory formDialogPresenterFactory,
AppContext appContext,
UiContext uiContext,
ContentConnector contentConnector,
info.magnolia.i18nsystem.SimpleTranslator i18n,
LocationController locationController,
info.magnolia.resourceloader.ResourceOrigin origin,
info.magnolia.event.EventBus eventBus) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addResource()
Implement this method for the
EditorCallback#onSuccess(String) case to add the resource to the
ResourcesContentConnector . |
void |
execute() |
protected PropertysetItem |
getNewResourceItem() |
protected info.magnolia.resourceloader.Resource |
getParentResource() |
unwrapResource
protected final AppContext appContext
protected final UiContext uiContext
protected final info.magnolia.i18nsystem.SimpleTranslator i18n
protected final ResourcesContentConnector contentConnector
protected final LocationController locationController
protected final info.magnolia.event.EventBus eventBus
public AbstractAddResourceAction(D definition, Item resourceItem, FormDialogPresenterFactory formDialogPresenterFactory, AppContext appContext, UiContext uiContext, ContentConnector contentConnector, info.magnolia.i18nsystem.SimpleTranslator i18n, LocationController locationController, info.magnolia.resourceloader.ResourceOrigin origin, @Named(value=<error>) info.magnolia.event.EventBus eventBus)
public void execute() throws ActionExecutionException
ActionExecutionException
protected info.magnolia.resourceloader.Resource getParentResource()
protected PropertysetItem getNewResourceItem()
protected abstract void addResource()
EditorCallback#onSuccess(String)
case to add the resource to the
ResourcesContentConnector
.Copyright © 2015 Magnolia International Ltd.. All rights reserved.