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:
- AppContext, AppInstanceController, AppView.Listener, UiContext, OverlayLayer
public class AppInstanceControllerImpl
- extends AbstractUIContext
- implements AppContext, AppInstanceController
Implements both - the controlling of an app instance as well as the housekeeping of the context for an app.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AppInstanceControllerImpl
@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)
initializeOverlayPresenter
protected OverlayPresenter initializeOverlayPresenter()
- Specified by:
initializeOverlayPresenter
in class AbstractUIContext
setAppComponentProvider
public void setAppComponentProvider(info.magnolia.objectfactory.ComponentProvider componentProvider)
- Specified by:
setAppComponentProvider
in interface AppInstanceController
setApp
public void setApp(App app)
- Specified by:
setApp
in interface AppInstanceController
getApp
public App getApp()
- Specified by:
getApp
in interface AppInstanceController
getName
public String getName()
- Specified by:
getName
in interface AppContext
getLabel
public String getLabel()
- Specified by:
getLabel
in interface AppContext
getAppDescriptor
public AppDescriptor getAppDescriptor()
- Specified by:
getAppDescriptor
in interface AppContext
getDefaultSubAppDescriptor
public SubAppDescriptor getDefaultSubAppDescriptor()
- Specified by:
getDefaultSubAppDescriptor
in interface AppContext
getView
public AppView getView()
- Specified by:
getView
in interface AppContext
start
public void start(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 AppInstanceController
onLocationUpdate
public void onLocationUpdate(Location location)
- Called when a location change occurs and the app is already running.
- Specified by:
onLocationUpdate
in interface AppInstanceController
onFocus
public void onFocus(String instanceId)
- Specified by:
onFocus
in interface AppView.Listener
onClose
public void onClose(String instanceId)
- Specified by:
onClose
in interface AppView.Listener
mayStop
public String mayStop()
- Specified by:
mayStop
in interface AppInstanceController
stop
public void stop()
- Specified by:
stop
in interface AppInstanceController
getCurrentLocation
public Location getCurrentLocation()
- Specified by:
getCurrentLocation
in interface AppInstanceController
getDefaultLocation
public Location getDefaultLocation()
- Specified by:
getDefaultLocation
in interface AppInstanceController
openSubApp
public void openSubApp(Location location)
- Specified by:
openSubApp
in interface 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 AppContext
updateSubAppLocation
public void updateSubAppLocation(SubAppContext subAppContext,
Location location)
- Used to update the framework about changes to locations inside the app and circumventing the
LocationController
mechanism.
Example Usages:
When ever possible use the LocationController
to not have to do this.
- Specified by:
updateSubAppLocation
in interface AppContext
- Parameters:
subAppContext
- The subAppContext to be updated.location
- The new Location
.
sendUserMessage
public void sendUserMessage(String user,
Message message)
- Specified by:
sendUserMessage
in interface AppContext
sendGroupMessage
public void sendGroupMessage(String group,
Message message)
- Specified by:
sendGroupMessage
in interface AppContext
sendLocalMessage
public void sendLocalMessage(Message message)
- Specified by:
sendLocalMessage
in interface AppContext
broadcastMessage
public void broadcastMessage(Message message)
- Specified by:
broadcastMessage
in interface AppContext
showConfirmationMessage
public void showConfirmationMessage(String message)
- Specified by:
showConfirmationMessage
in interface AppContext
getActiveSubAppContext
public SubAppContext getActiveSubAppContext()
- Specified by:
getActiveSubAppContext
in interface AppContext
Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.