info.magnolia.ui.framework.app
Class AppInstanceControllerImpl
java.lang.Object
info.magnolia.ui.framework.context.AbstractUIContext
info.magnolia.ui.framework.app.AppInstanceControllerImpl
- All Implemented Interfaces:
- info.magnolia.ui.api.app.AppContext, info.magnolia.ui.api.app.AppInstanceController, info.magnolia.ui.api.app.AppView.Listener, info.magnolia.ui.api.context.UiContext, info.magnolia.ui.api.overlay.OverlayLayer
public class AppInstanceControllerImpl
- extends AbstractUIContext
- implements info.magnolia.ui.api.app.AppContext, info.magnolia.ui.api.app.AppInstanceController
Implements both - the controlling of an app instance as well as the housekeeping of the context for an app.
Nested classes/interfaces inherited from interface info.magnolia.ui.api.overlay.OverlayLayer |
info.magnolia.ui.api.overlay.OverlayLayer.ModalityDomain, info.magnolia.ui.api.overlay.OverlayLayer.ModalityLevel |
Constructor Summary |
AppInstanceControllerImpl(info.magnolia.module.ModuleRegistry moduleRegistry,
info.magnolia.ui.api.app.AppController appController,
info.magnolia.ui.api.location.LocationController locationController,
info.magnolia.ui.api.shell.Shell shell,
MessagesManager messagesManager,
info.magnolia.ui.api.app.AppDescriptor appDescriptor,
info.magnolia.ui.api.app.launcherlayout.AppLauncherLayoutManager appLauncherLayoutManager,
info.magnolia.monitoring.SystemMonitor systemMonitor,
info.magnolia.i18nsystem.I18nizer i18nizer,
info.magnolia.i18nsystem.SimpleTranslator i18n)
|
Methods inherited from class info.magnolia.ui.framework.context.AbstractUIContext |
openAlert, openAlert, openAlert, openConfirmation, openConfirmation, openConfirmation, openNotification, openNotification, openNotification, openOverlay, openOverlay |
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.api.overlay.OverlayLayer |
openAlert, openAlert, openAlert, openConfirmation, openConfirmation, openConfirmation, openNotification, openNotification, openNotification, openOverlay, openOverlay |
AppInstanceControllerImpl
@Inject
public AppInstanceControllerImpl(info.magnolia.module.ModuleRegistry moduleRegistry,
info.magnolia.ui.api.app.AppController appController,
info.magnolia.ui.api.location.LocationController locationController,
info.magnolia.ui.api.shell.Shell shell,
MessagesManager messagesManager,
info.magnolia.ui.api.app.AppDescriptor appDescriptor,
info.magnolia.ui.api.app.launcherlayout.AppLauncherLayoutManager appLauncherLayoutManager,
info.magnolia.monitoring.SystemMonitor systemMonitor,
info.magnolia.i18nsystem.I18nizer i18nizer,
info.magnolia.i18nsystem.SimpleTranslator i18n)
initializeOverlayPresenter
protected OverlayPresenter initializeOverlayPresenter()
- Specified by:
initializeOverlayPresenter
in class AbstractUIContext
setAppComponentProvider
public void setAppComponentProvider(info.magnolia.objectfactory.ComponentProvider componentProvider)
- Specified by:
setAppComponentProvider
in interface info.magnolia.ui.api.app.AppInstanceController
setApp
public void setApp(info.magnolia.ui.api.app.App app)
- Specified by:
setApp
in interface info.magnolia.ui.api.app.AppInstanceController
getApp
public info.magnolia.ui.api.app.App getApp()
- Specified by:
getApp
in interface info.magnolia.ui.api.app.AppInstanceController
getName
public String getName()
- Specified by:
getName
in interface info.magnolia.ui.api.app.AppContext
getLabel
public String getLabel()
- Specified by:
getLabel
in interface info.magnolia.ui.api.app.AppContext
getAppDescriptor
public info.magnolia.ui.api.app.AppDescriptor getAppDescriptor()
- Specified by:
getAppDescriptor
in interface info.magnolia.ui.api.app.AppContext
getDefaultSubAppDescriptor
public info.magnolia.ui.api.app.SubAppDescriptor getDefaultSubAppDescriptor()
- Specified by:
getDefaultSubAppDescriptor
in interface info.magnolia.ui.api.app.AppContext
getView
public info.magnolia.ui.api.app.AppView getView()
- Specified by:
getView
in interface info.magnolia.ui.api.app.AppContext
start
public void start(info.magnolia.ui.api.location.Location location)
- Called when the app is launched from the app launcher OR a location change event triggers
it to start.
- Specified by:
start
in interface info.magnolia.ui.api.app.AppInstanceController
onLocationUpdate
public void onLocationUpdate(info.magnolia.ui.api.location.Location location)
- Called when a location change occurs and the app is already running.
- Specified by:
onLocationUpdate
in interface info.magnolia.ui.api.app.AppInstanceController
onFocus
public void onFocus(String instanceId)
- Specified by:
onFocus
in interface info.magnolia.ui.api.app.AppView.Listener
onClose
public void onClose(String instanceId)
- Specified by:
onClose
in interface info.magnolia.ui.api.app.AppView.Listener
mayStop
public String mayStop()
- Specified by:
mayStop
in interface info.magnolia.ui.api.app.AppInstanceController
stop
public void stop()
- Specified by:
stop
in interface info.magnolia.ui.api.app.AppInstanceController
getCurrentLocation
public info.magnolia.ui.api.location.Location getCurrentLocation()
- Specified by:
getCurrentLocation
in interface info.magnolia.ui.api.app.AppInstanceController
getDefaultLocation
public info.magnolia.ui.api.location.Location getDefaultLocation()
- Specified by:
getDefaultLocation
in interface info.magnolia.ui.api.app.AppInstanceController
openSubApp
public void openSubApp(info.magnolia.ui.api.location.Location location)
- Specified by:
openSubApp
in interface info.magnolia.ui.api.app.AppContext
closeSubApp
public void closeSubApp(String instanceId)
- Used to close a running subApp from server side. Delegates to
AppView.closeSubAppView(String)
.
The actual closing and cleaning up, will be handled by the callback AppView.Listener#onClose(String)
implemented in onClose(String)
.
- Specified by:
closeSubApp
in interface info.magnolia.ui.api.app.AppContext
updateSubAppLocation
public void updateSubAppLocation(info.magnolia.ui.api.app.SubAppContext subAppContext,
info.magnolia.ui.api.location.Location location)
- Used to update the framework about changes to locations inside the app and circumventing the
LocationController
mechanism.
Example Usages:
- Inside ContentApp framework to update
SubAppContext.getLocation()
and the Shell
fragment
- In the Pages App when navigating pages inside the PageEditor
When ever possible use the LocationController
to not have to do this.
- Specified by:
updateSubAppLocation
in interface info.magnolia.ui.api.app.AppContext
- Parameters:
subAppContext
- The subAppContext to be updated.location
- The new Location
.
sendUserMessage
public void sendUserMessage(String user,
info.magnolia.ui.api.message.Message message)
- Specified by:
sendUserMessage
in interface info.magnolia.ui.api.app.AppContext
sendGroupMessage
public void sendGroupMessage(String group,
info.magnolia.ui.api.message.Message message)
- Specified by:
sendGroupMessage
in interface info.magnolia.ui.api.app.AppContext
sendLocalMessage
public void sendLocalMessage(info.magnolia.ui.api.message.Message message)
- Specified by:
sendLocalMessage
in interface info.magnolia.ui.api.app.AppContext
broadcastMessage
public void broadcastMessage(info.magnolia.ui.api.message.Message message)
- Specified by:
broadcastMessage
in interface info.magnolia.ui.api.app.AppContext
showConfirmationMessage
public void showConfirmationMessage(String message)
- Specified by:
showConfirmationMessage
in interface info.magnolia.ui.api.app.AppContext
getActiveSubAppContext
public info.magnolia.ui.api.app.SubAppContext getActiveSubAppContext()
- Specified by:
getActiveSubAppContext
in interface info.magnolia.ui.api.app.AppContext
Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.