public class AppInstanceControllerImpl extends Object implements info.magnolia.ui.api.app.AppContext, info.magnolia.ui.api.app.AppInstanceController
Constructor and Description |
---|
AppInstanceControllerImpl(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.monitoring.SystemMonitor systemMonitor,
info.magnolia.i18nsystem.I18nizer i18nizer,
info.magnolia.i18nsystem.SimpleTranslator i18n) |
Modifier and Type | Method and Description |
---|---|
void |
broadcastMessage(info.magnolia.ui.api.message.Message message) |
void |
closeSubApp(String instanceId)
Used to close a running subApp from server side.
|
info.magnolia.ui.api.app.SubAppContext |
getActiveSubAppContext() |
info.magnolia.ui.api.app.App |
getApp() |
info.magnolia.ui.api.app.AppDescriptor |
getAppDescriptor() |
info.magnolia.ui.api.location.Location |
getCurrentLocation() |
info.magnolia.ui.api.location.Location |
getDefaultLocation() |
info.magnolia.ui.api.app.SubAppDescriptor |
getDefaultSubAppDescriptor() |
String |
getLabel() |
String |
getName() |
info.magnolia.ui.api.overlay.OverlayLayer |
getOverlayDelegate() |
Collection<info.magnolia.ui.api.app.SubAppContext> |
getSubAppContexts() |
info.magnolia.ui.api.app.AppView |
getView() |
boolean |
isHeaderApp() |
String |
mayStop() |
void |
onClose(String instanceId) |
void |
onFocus(String instanceId) |
void |
onLocationUpdate(info.magnolia.ui.api.location.Location location)
Called when a location change occurs and the app is already running.
|
void |
openSubApp(info.magnolia.ui.api.location.Location location) |
void |
sendGroupMessage(String group,
info.magnolia.ui.api.message.Message message) |
void |
sendLocalMessage(info.magnolia.ui.api.message.Message message) |
void |
sendUserMessage(String user,
info.magnolia.ui.api.message.Message message) |
void |
setApp(info.magnolia.ui.api.app.App app) |
void |
setAppComponentProvider(info.magnolia.objectfactory.ComponentProvider componentProvider) |
void |
showConfirmationMessage(String message) |
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.
|
void |
stop() |
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. |
@Inject public AppInstanceControllerImpl(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.monitoring.SystemMonitor systemMonitor, info.magnolia.i18nsystem.I18nizer i18nizer, info.magnolia.i18nsystem.SimpleTranslator i18n)
public void setAppComponentProvider(info.magnolia.objectfactory.ComponentProvider componentProvider)
setAppComponentProvider
in interface info.magnolia.ui.api.app.AppInstanceController
public void setApp(info.magnolia.ui.api.app.App app)
setApp
in interface info.magnolia.ui.api.app.AppInstanceController
public info.magnolia.ui.api.app.App getApp()
getApp
in interface info.magnolia.ui.api.app.AppInstanceController
public String getName()
getName
in interface info.magnolia.ui.api.app.AppContext
public String getLabel()
getLabel
in interface info.magnolia.ui.api.app.AppContext
public info.magnolia.ui.api.app.AppDescriptor getAppDescriptor()
getAppDescriptor
in interface info.magnolia.ui.api.app.AppContext
public info.magnolia.ui.api.app.SubAppDescriptor getDefaultSubAppDescriptor()
getDefaultSubAppDescriptor
in interface info.magnolia.ui.api.app.AppContext
public info.magnolia.ui.api.app.AppView getView()
getView
in interface info.magnolia.ui.api.app.AppContext
public void start(info.magnolia.ui.api.location.Location location)
start
in interface info.magnolia.ui.api.app.AppInstanceController
public void onLocationUpdate(info.magnolia.ui.api.location.Location location)
onLocationUpdate
in interface info.magnolia.ui.api.app.AppInstanceController
public void onFocus(String instanceId)
onFocus
in interface info.magnolia.ui.api.app.AppView.Listener
public void onClose(String instanceId)
onClose
in interface info.magnolia.ui.api.app.AppView.Listener
public String mayStop()
mayStop
in interface info.magnolia.ui.api.app.AppInstanceController
public void stop()
stop
in interface info.magnolia.ui.api.app.AppInstanceController
public info.magnolia.ui.api.location.Location getCurrentLocation()
getCurrentLocation
in interface info.magnolia.ui.api.app.AppInstanceController
public info.magnolia.ui.api.location.Location getDefaultLocation()
getDefaultLocation
in interface info.magnolia.ui.api.app.AppInstanceController
public void openSubApp(info.magnolia.ui.api.location.Location location)
openSubApp
in interface info.magnolia.ui.api.app.AppContext
public void closeSubApp(String instanceId)
AppView.closeSubAppView(String)
.
The actual closing and cleaning up, will be handled by the callback AppView.Listener#onClose(String)
implemented in onClose(String)
.closeSubApp
in interface info.magnolia.ui.api.app.AppContext
public Collection<info.magnolia.ui.api.app.SubAppContext> getSubAppContexts()
getSubAppContexts
in interface info.magnolia.ui.api.app.AppContext
public void updateSubAppLocation(info.magnolia.ui.api.app.SubAppContext subAppContext, info.magnolia.ui.api.location.Location location)
LocationController
mechanism.
Example Usages:
SubAppContext.getLocation()
and the Shell
fragmentLocationController
to not have to do this.updateSubAppLocation
in interface info.magnolia.ui.api.app.AppContext
subAppContext
- The subAppContext to be updated.location
- The new Location
.public void sendUserMessage(String user, info.magnolia.ui.api.message.Message message)
sendUserMessage
in interface info.magnolia.ui.api.app.AppContext
public void sendGroupMessage(String group, info.magnolia.ui.api.message.Message message)
sendGroupMessage
in interface info.magnolia.ui.api.app.AppContext
public void sendLocalMessage(info.magnolia.ui.api.message.Message message)
sendLocalMessage
in interface info.magnolia.ui.api.app.AppContext
public void broadcastMessage(info.magnolia.ui.api.message.Message message)
broadcastMessage
in interface info.magnolia.ui.api.app.AppContext
public void showConfirmationMessage(String message)
showConfirmationMessage
in interface info.magnolia.ui.api.app.AppContext
public info.magnolia.ui.api.app.SubAppContext getActiveSubAppContext()
getActiveSubAppContext
in interface info.magnolia.ui.api.app.AppContext
public boolean isHeaderApp()
isHeaderApp
in interface info.magnolia.ui.api.app.AppInstanceController
public info.magnolia.ui.api.overlay.OverlayLayer getOverlayDelegate()
getOverlayDelegate
in interface info.magnolia.ui.api.context.UiContext
Copyright © 2019 Magnolia International Ltd.. All rights reserved.