info.magnolia.ui.admincentral.app.simple
Class AppContextImpl

java.lang.Object
  extended by info.magnolia.ui.admincentral.app.simple.AppContextImpl
All Implemented Interfaces:
AppFrameView.Listener, info.magnolia.ui.framework.app.AppContext

public class AppContextImpl
extends Object
implements info.magnolia.ui.framework.app.AppContext, AppFrameView.Listener

Implementation of AppContext. See MGNLUI-379.


Field Summary
static String COMMON_APP_COMPONENTS_ID
           
static String COMMON_SUB_APP_COMPONENTS_ID
           
static String COMPONENTS_ID_PREFIX
           
 
Constructor Summary
AppContextImpl(info.magnolia.module.ModuleRegistry moduleRegistry, info.magnolia.objectfactory.ComponentProvider componentProvider, info.magnolia.ui.framework.app.AppController appController, info.magnolia.ui.framework.location.LocationController locationController, info.magnolia.ui.framework.shell.Shell shell, info.magnolia.ui.framework.message.MessagesManager messagesManager, info.magnolia.ui.framework.app.AppDescriptor appDescriptor)
           
 
Method Summary
 void broadcastMessage(info.magnolia.ui.framework.message.Message message)
           
 info.magnolia.objectfactory.ComponentProvider createAppComponentProvider(String name, info.magnolia.ui.framework.app.AppContext appContext)
          Creates a ComponentProvider dedicated for the app with the AdminCentral ComponentProvider as its parent.
 void enterFullScreenMode()
           
 void exitFullScreenMode()
           
 info.magnolia.ui.framework.app.App getApp()
           
 info.magnolia.ui.framework.app.AppDescriptor getAppDescriptor()
           
 info.magnolia.ui.framework.location.Location getCurrentLocation()
           
 info.magnolia.ui.framework.location.Location getDefaultLocation()
           
 info.magnolia.ui.framework.app.SubAppDescriptor getDefaultSubAppDescriptor()
           
 String getName()
           
 info.magnolia.ui.framework.view.View getView()
           
 String mayStop()
           
 void onActiveTabSet(info.magnolia.ui.vaadin.tabsheet.MagnoliaTab tab)
           
 void onLocationUpdate(info.magnolia.ui.framework.location.Location location)
          Called when a location change occurs and the app is already running.
 void onTabClosed(info.magnolia.ui.vaadin.tabsheet.MagnoliaTab tab)
           
 void openSubApp(info.magnolia.ui.framework.location.Location location)
           
 void sendLocalMessage(info.magnolia.ui.framework.message.Message message)
           
 void sendUserMessage(String user, info.magnolia.ui.framework.message.Message message)
           
 void setApp(info.magnolia.ui.framework.app.App app)
           
 void setSubAppLocation(info.magnolia.ui.framework.app.SubApp subApp, info.magnolia.ui.framework.location.Location location)
           
 void showConfirmationMessage(String message)
           
 void start(info.magnolia.ui.framework.location.Location location)
          Called when the app is launched from the app launcher OR a location change event triggers it to start.
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMON_APP_COMPONENTS_ID

public static final String COMMON_APP_COMPONENTS_ID
See Also:
Constant Field Values

COMMON_SUB_APP_COMPONENTS_ID

public static final String COMMON_SUB_APP_COMPONENTS_ID
See Also:
Constant Field Values

COMPONENTS_ID_PREFIX

public static final String COMPONENTS_ID_PREFIX
See Also:
Constant Field Values
Constructor Detail

AppContextImpl

public AppContextImpl(info.magnolia.module.ModuleRegistry moduleRegistry,
                      info.magnolia.objectfactory.ComponentProvider componentProvider,
                      info.magnolia.ui.framework.app.AppController appController,
                      info.magnolia.ui.framework.location.LocationController locationController,
                      info.magnolia.ui.framework.shell.Shell shell,
                      info.magnolia.ui.framework.message.MessagesManager messagesManager,
                      info.magnolia.ui.framework.app.AppDescriptor appDescriptor)
Method Detail

setApp

public void setApp(info.magnolia.ui.framework.app.App app)
Specified by:
setApp in interface info.magnolia.ui.framework.app.AppContext

getApp

public info.magnolia.ui.framework.app.App getApp()
Specified by:
getApp in interface info.magnolia.ui.framework.app.AppContext

getName

public String getName()
Specified by:
getName in interface info.magnolia.ui.framework.app.AppContext

getAppDescriptor

public info.magnolia.ui.framework.app.AppDescriptor getAppDescriptor()
Specified by:
getAppDescriptor in interface info.magnolia.ui.framework.app.AppContext

getDefaultSubAppDescriptor

public info.magnolia.ui.framework.app.SubAppDescriptor getDefaultSubAppDescriptor()
Specified by:
getDefaultSubAppDescriptor in interface info.magnolia.ui.framework.app.AppContext

getView

public info.magnolia.ui.framework.view.View getView()
Specified by:
getView in interface info.magnolia.ui.framework.app.AppContext

start

public void start(info.magnolia.ui.framework.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.framework.app.AppContext

onLocationUpdate

public void onLocationUpdate(info.magnolia.ui.framework.location.Location location)
Called when a location change occurs and the app is already running.

Specified by:
onLocationUpdate in interface info.magnolia.ui.framework.app.AppContext

onActiveTabSet

public void onActiveTabSet(info.magnolia.ui.vaadin.tabsheet.MagnoliaTab tab)
Specified by:
onActiveTabSet in interface AppFrameView.Listener

onTabClosed

public void onTabClosed(info.magnolia.ui.vaadin.tabsheet.MagnoliaTab tab)
Specified by:
onTabClosed in interface AppFrameView.Listener

mayStop

public String mayStop()
Specified by:
mayStop in interface info.magnolia.ui.framework.app.AppContext

stop

public void stop()
Specified by:
stop in interface info.magnolia.ui.framework.app.AppContext

getCurrentLocation

public info.magnolia.ui.framework.location.Location getCurrentLocation()
Specified by:
getCurrentLocation in interface info.magnolia.ui.framework.app.AppContext

getDefaultLocation

public info.magnolia.ui.framework.location.Location getDefaultLocation()
Specified by:
getDefaultLocation in interface info.magnolia.ui.framework.app.AppContext

openSubApp

public void openSubApp(info.magnolia.ui.framework.location.Location location)
Specified by:
openSubApp in interface info.magnolia.ui.framework.app.AppContext

setSubAppLocation

public void setSubAppLocation(info.magnolia.ui.framework.app.SubApp subApp,
                              info.magnolia.ui.framework.location.Location location)
Specified by:
setSubAppLocation in interface info.magnolia.ui.framework.app.AppContext

sendUserMessage

public void sendUserMessage(String user,
                            info.magnolia.ui.framework.message.Message message)
Specified by:
sendUserMessage in interface info.magnolia.ui.framework.app.AppContext

sendLocalMessage

public void sendLocalMessage(info.magnolia.ui.framework.message.Message message)
Specified by:
sendLocalMessage in interface info.magnolia.ui.framework.app.AppContext

broadcastMessage

public void broadcastMessage(info.magnolia.ui.framework.message.Message message)
Specified by:
broadcastMessage in interface info.magnolia.ui.framework.app.AppContext

showConfirmationMessage

public void showConfirmationMessage(String message)
Specified by:
showConfirmationMessage in interface info.magnolia.ui.framework.app.AppContext

enterFullScreenMode

public void enterFullScreenMode()
Specified by:
enterFullScreenMode in interface info.magnolia.ui.framework.app.AppContext

exitFullScreenMode

public void exitFullScreenMode()
Specified by:
exitFullScreenMode in interface info.magnolia.ui.framework.app.AppContext

createAppComponentProvider

public info.magnolia.objectfactory.ComponentProvider createAppComponentProvider(String name,
                                                                                info.magnolia.ui.framework.app.AppContext appContext)
Creates a ComponentProvider dedicated for the app with the AdminCentral ComponentProvider as its parent. This gives us the ability to inject the AppContext into App components. The components are read from module descriptors using the convention "app-" + name of the app and merged with the components defined for all apps with the id "app".

Specified by:
createAppComponentProvider in interface info.magnolia.ui.framework.app.AppContext


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.