Package org.opencms.ui.apps
Class CmsAppView
- java.lang.Object
-
- org.opencms.ui.apps.CmsAppView
-
- All Implemented Interfaces:
com.vaadin.event.Action.Handler
,com.vaadin.event.SerializableEventListener
,com.vaadin.navigator.View
,com.vaadin.navigator.ViewChangeListener
,com.vaadin.server.Page.BrowserWindowResizeListener
,java.io.Serializable
,java.util.EventListener
,I_CmsWindowCloseListener
,I_CmsAppView
public class CmsAppView extends java.lang.Object implements com.vaadin.navigator.ViewChangeListener, I_CmsWindowCloseListener, I_CmsAppView, com.vaadin.event.Action.Handler, com.vaadin.server.Page.BrowserWindowResizeListener
Displays the selected app.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsAppView.CacheStatus
Enum representing caching status of a view.protected class
CmsAppView.NotAvailableApp
Used in case the requested app can not be displayed to the current user.
-
Constructor Summary
Constructors Constructor Description CmsAppView(I_CmsWorkplaceAppConfiguration appConfig)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event)
boolean
beforeViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event)
void
browserWindowResized(com.vaadin.server.Page.BrowserWindowResizeEvent event)
void
disableGlobalShortcuts()
Disables the global keyboard shortcuts.void
enableGlobalShortcuts()
Enables the global keyboard shortcuts.void
enter(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event)
void
enter(java.lang.String newState)
Enters the view.com.vaadin.event.Action[]
getActions(java.lang.Object target, java.lang.Object sender)
CmsAppView.CacheStatus
getCacheStatus()
Gets the cache status of the view.CmsAppViewLayout
getComponent()
Returns the app component, initializes it if required.java.lang.String
getName()
Returns the view name.void
handleAction(com.vaadin.event.Action action, java.lang.Object sender, java.lang.Object target)
boolean
isCachable()
Returns whether this view should be cached within the user session.void
onWindowClose()
Executed on window close.CmsAppViewLayout
reinitComponent()
Creates a new component instance.boolean
requiresRestore()
Returns whether this view needs to be restored from cache.void
restoreFromCache()
Restores the view from cache.void
setCacheStatus(CmsAppView.CacheStatus status)
Sets the cache status.void
setRequiresRestore(boolean restored)
Sets the requires restore from cache flag.java.lang.String
toString()
-
-
-
Constructor Detail
-
CmsAppView
public CmsAppView(I_CmsWorkplaceAppConfiguration appConfig)
Constructor.- Parameters:
appConfig
- the app configuration
-
-
Method Detail
-
afterViewChange
public void afterViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event)
- Specified by:
afterViewChange
in interfacecom.vaadin.navigator.ViewChangeListener
- See Also:
ViewChangeListener.afterViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent)
-
beforeViewChange
public boolean beforeViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event)
- Specified by:
beforeViewChange
in interfacecom.vaadin.navigator.ViewChangeListener
- See Also:
ViewChangeListener.beforeViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent)
-
browserWindowResized
public void browserWindowResized(com.vaadin.server.Page.BrowserWindowResizeEvent event)
- Specified by:
browserWindowResized
in interfacecom.vaadin.server.Page.BrowserWindowResizeListener
- See Also:
Page.BrowserWindowResizeListener.browserWindowResized(com.vaadin.server.Page.BrowserWindowResizeEvent)
-
disableGlobalShortcuts
public void disableGlobalShortcuts()
Description copied from interface:I_CmsAppView
Disables the global keyboard shortcuts.- Specified by:
disableGlobalShortcuts
in interfaceI_CmsAppView
- See Also:
I_CmsAppView.disableGlobalShortcuts()
-
enableGlobalShortcuts
public void enableGlobalShortcuts()
Description copied from interface:I_CmsAppView
Enables the global keyboard shortcuts.- Specified by:
enableGlobalShortcuts
in interfaceI_CmsAppView
- See Also:
I_CmsAppView.enableGlobalShortcuts()
-
enter
public void enter(java.lang.String newState)
Description copied from interface:I_CmsAppView
Enters the view.- Specified by:
enter
in interfaceI_CmsAppView
- Parameters:
newState
- the state to set- See Also:
I_CmsAppView.enter(java.lang.String)
-
enter
public void enter(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event)
- Specified by:
enter
in interfacecom.vaadin.navigator.View
- See Also:
View.enter(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent)
-
getActions
public com.vaadin.event.Action[] getActions(java.lang.Object target, java.lang.Object sender)
- Specified by:
getActions
in interfacecom.vaadin.event.Action.Handler
- See Also:
Action.Handler.getActions(java.lang.Object, java.lang.Object)
-
getCacheStatus
public CmsAppView.CacheStatus getCacheStatus()
Gets the cache status of the view.- Returns:
- the cache status of the view
-
getComponent
public CmsAppViewLayout getComponent()
Description copied from interface:I_CmsAppView
Returns the app component, initializes it if required.- Specified by:
getComponent
in interfaceI_CmsAppView
- Returns:
- the component
- See Also:
I_CmsAppView.getComponent()
-
getName
public java.lang.String getName()
Description copied from interface:I_CmsAppView
Returns the view name.- Specified by:
getName
in interfaceI_CmsAppView
- Returns:
- the view name
- See Also:
I_CmsAppView.getName()
-
handleAction
public void handleAction(com.vaadin.event.Action action, java.lang.Object sender, java.lang.Object target)
- Specified by:
handleAction
in interfacecom.vaadin.event.Action.Handler
- See Also:
Action.Handler.handleAction(com.vaadin.event.Action, java.lang.Object, java.lang.Object)
-
isCachable
public boolean isCachable()
Description copied from interface:I_CmsAppView
Returns whether this view should be cached within the user session.- Specified by:
isCachable
in interfaceI_CmsAppView
- Returns:
true
if the view is cachable- See Also:
I_CmsAppView.isCachable()
-
onWindowClose
public void onWindowClose()
Description copied from interface:I_CmsWindowCloseListener
Executed on window close.- Specified by:
onWindowClose
in interfaceI_CmsWindowCloseListener
- See Also:
I_CmsWindowCloseListener.onWindowClose()
-
reinitComponent
public CmsAppViewLayout reinitComponent()
Description copied from interface:I_CmsAppView
Creates a new component instance.- Specified by:
reinitComponent
in interfaceI_CmsAppView
- Returns:
- the new component
- See Also:
I_CmsAppView.reinitComponent()
-
requiresRestore
public boolean requiresRestore()
Description copied from interface:I_CmsAppView
Returns whether this view needs to be restored from cache.- Specified by:
requiresRestore
in interfaceI_CmsAppView
- Returns:
true
if this view needs to be restored from cache- See Also:
I_CmsAppView.requiresRestore()
-
restoreFromCache
public void restoreFromCache()
Restores the view from cache.- Specified by:
restoreFromCache
in interfaceI_CmsAppView
-
setCacheStatus
public void setCacheStatus(CmsAppView.CacheStatus status)
Sets the cache status.- Parameters:
status
- the new cache status
-
setRequiresRestore
public void setRequiresRestore(boolean restored)
Description copied from interface:I_CmsAppView
Sets the requires restore from cache flag.- Specified by:
setRequiresRestore
in interfaceI_CmsAppView
- Parameters:
restored
- the requires restore from cache flag- See Also:
I_CmsAppView.setRequiresRestore(boolean)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-