public class AppInstanceControllerImpl extends AbstractUIContext implements AppContext, AppInstanceController
OverlayLayer.ModalityDomain, OverlayLayer.ModalityLevel
Constructor and Description |
---|
AppInstanceControllerImpl(info.magnolia.module.ModuleRegistry moduleRegistry,
AppController appController,
LocationController locationController,
Shell shell,
MessagesManager messagesManager,
AppDescriptor appDescriptor,
AppLauncherLayoutManager appLauncherLayoutManager,
info.magnolia.monitoring.SystemMonitor systemMonitor,
info.magnolia.i18nsystem.I18nizer i18nizer,
info.magnolia.i18nsystem.SimpleTranslator i18n)
|
AppInstanceControllerImpl(info.magnolia.module.ModuleRegistry moduleRegistry,
AppController appController,
LocationController locationController,
Shell shell,
MessagesManager messagesManager,
AppDescriptor appDescriptor,
AppLauncherLayoutManager appLauncherLayoutManager,
info.magnolia.monitoring.SystemMonitor systemMonitor,
info.magnolia.i18nsystem.I18nizer i18nizer,
info.magnolia.i18nsystem.SimpleTranslator i18n,
info.magnolia.context.Context context) |
Modifier and Type | Method and Description |
---|---|
void |
broadcastMessage(Message message) |
void |
closeSubApp(String instanceId)
Used to close a running subApp from server side.
|
SubAppContext |
getActiveSubAppContext() |
App |
getApp() |
AppDescriptor |
getAppDescriptor() |
Location |
getCurrentLocation() |
Location |
getDefaultLocation() |
SubAppDescriptor |
getDefaultSubAppDescriptor() |
String |
getLabel() |
String |
getName() |
AppView |
getView() |
protected OverlayPresenter |
initializeOverlayPresenter() |
String |
mayStop() |
void |
onClose(String instanceId) |
void |
onFocus(String instanceId) |
void |
onLocationUpdate(Location location)
Called when a location change occurs and the app is already running.
|
void |
openSubApp(Location location) |
void |
sendGroupMessage(String group,
Message message) |
void |
sendLocalMessage(Message message) |
void |
sendUserMessage(String user,
Message message) |
void |
setApp(App app) |
void |
setAppComponentProvider(info.magnolia.objectfactory.ComponentProvider componentProvider) |
void |
showConfirmationMessage(String message) |
void |
start(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(SubAppContext subAppContext,
Location location)
Used to update the framework about changes to locations inside the app and circumventing the
LocationController mechanism. |
openAlert, openAlert, openAlert, openConfirmation, openConfirmation, openConfirmation, openNotification, openNotification, openNotification, openOverlay, openOverlay
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
openAlert, openAlert, openAlert, openConfirmation, openConfirmation, openConfirmation, openNotification, openNotification, openNotification, openOverlay, openOverlay
@Inject public AppInstanceControllerImpl(info.magnolia.module.ModuleRegistry moduleRegistry, AppController appController, LocationController locationController, Shell shell, MessagesManager messagesManager, AppDescriptor appDescriptor, AppLauncherLayoutManager appLauncherLayoutManager, info.magnolia.monitoring.SystemMonitor systemMonitor, info.magnolia.i18nsystem.I18nizer i18nizer, info.magnolia.i18nsystem.SimpleTranslator i18n, info.magnolia.context.Context context)
@Deprecated public AppInstanceControllerImpl(info.magnolia.module.ModuleRegistry moduleRegistry, AppController appController, LocationController locationController, Shell shell, MessagesManager messagesManager, AppDescriptor appDescriptor, AppLauncherLayoutManager appLauncherLayoutManager, info.magnolia.monitoring.SystemMonitor systemMonitor, info.magnolia.i18nsystem.I18nizer i18nizer, info.magnolia.i18nsystem.SimpleTranslator i18n)
protected OverlayPresenter initializeOverlayPresenter()
initializeOverlayPresenter
in class AbstractUIContext
public void setAppComponentProvider(info.magnolia.objectfactory.ComponentProvider componentProvider)
setAppComponentProvider
in interface AppInstanceController
public void setApp(App app)
setApp
in interface AppInstanceController
public App getApp()
getApp
in interface AppInstanceController
public String getName()
getName
in interface AppContext
public String getLabel()
getLabel
in interface AppContext
public AppDescriptor getAppDescriptor()
getAppDescriptor
in interface AppContext
public SubAppDescriptor getDefaultSubAppDescriptor()
getDefaultSubAppDescriptor
in interface AppContext
public AppView getView()
getView
in interface AppContext
public void start(Location location)
start
in interface AppInstanceController
public void onLocationUpdate(Location location)
onLocationUpdate
in interface AppInstanceController
public void onFocus(String instanceId)
onFocus
in interface AppView.Listener
public void onClose(String instanceId)
onClose
in interface AppView.Listener
public String mayStop()
mayStop
in interface AppInstanceController
public void stop()
stop
in interface AppInstanceController
public Location getCurrentLocation()
getCurrentLocation
in interface AppInstanceController
public Location getDefaultLocation()
getDefaultLocation
in interface AppInstanceController
public void openSubApp(Location location)
openSubApp
in interface 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 AppContext
public void updateSubAppLocation(SubAppContext subAppContext, Location location)
LocationController
mechanism.
Example Usages:
SubAppContext.getLocation()
and the Shell
fragmentLocationController
to not have to do this.updateSubAppLocation
in interface AppContext
subAppContext
- The subAppContext to be updated.location
- The new Location
.public void sendUserMessage(String user, Message message)
sendUserMessage
in interface AppContext
public void sendGroupMessage(String group, Message message)
sendGroupMessage
in interface AppContext
public void sendLocalMessage(Message message)
sendLocalMessage
in interface AppContext
public void broadcastMessage(Message message)
broadcastMessage
in interface AppContext
public void showConfirmationMessage(String message)
showConfirmationMessage
in interface AppContext
public SubAppContext getActiveSubAppContext()
getActiveSubAppContext
in interface AppContext
Copyright © 2017 Magnolia International Ltd.. All rights reserved.