public abstract class A_CmsUI extends com.vaadin.ui.UI
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
com.vaadin.server.Sizeable.Unit
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LAST_OFFLINE_PROJECT
The last offline project attribute key.
|
Constructor and Description |
---|
A_CmsUI()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
changeProject(CmsProject project)
Changes to the given project.
|
void |
changeSite(java.lang.String siteRoot)
Changes to the given site.
|
void |
closeWindows()
Closes all opened dialog windows.
|
static A_CmsUI |
get()
Returns the current UI.
|
java.io.Serializable |
getAttribute(java.lang.String key)
Returns the requested UI attribute.
|
static CmsObject |
getCmsObject()
Returns the current cms context.
|
CmsDisplayType |
getDisplayType()
Gets the display type from the time when the UI was initialized.
|
javax.servlet.http.HttpSession |
getHttpSession()
Returns the HTTP session.
|
CmsProject |
getLastOfflineProject()
Returns the last used offline project.
|
com.google.common.collect.Multimap<java.lang.String,java.lang.String> |
getParameters()
Gets the request parameters with which the application was loaded.
|
CmsWorkplaceSettings |
getWorkplaceSettings()
Returns the workplace settings.
|
protected void |
init(com.vaadin.server.VaadinRequest request) |
void |
openPageOrWarn(java.lang.String link,
java.lang.String target)
Tries to open a new browser window, and shows a warning if opening the window fails (usually because of popup blockers).
|
void |
openPageOrWarn(java.lang.String link,
java.lang.String target,
java.lang.String warning)
Tries to open a new browser window, and shows a warning if opening the window fails (usually because of popup blockers).
|
void |
reload()
Reloads the current UI.
|
void |
setAttribute(java.lang.String key,
java.io.Serializable value)
Sets an UI attribute.
|
void |
setContentToDialog(java.lang.String caption,
CmsBasicDialog dialog)
Replaces the ui content with a single dialog.
|
void |
setContentToDialog(java.lang.String caption,
com.vaadin.ui.Component component)
Replaces the ui content with a single dialog.
|
void |
setError(java.lang.String error)
Displays an error message in a centered box.
|
access, accessSynchronously, addAction, addActionHandler, addClickListener, addListener, addPollListener, addWindow, attach, changeVariables, close, detach, doInit, doRefresh, focus, getActionManager, getComponentCount, getConnectorTracker, getCurrent, getEmbedId, getLastHeartbeatTimestamp, getLastProcessedClientToServerId, getLoadingIndicatorConfiguration, getLocaleService, getNavigator, getNotificationConfiguration, getOverlayContainerLabel, getPage, getPollInterval, getPushConfiguration, getPushConnection, getReconnectDialogConfiguration, getScrollLeft, getScrollTop, getSession, getState, getState, getStateType, getTabIndex, getTheme, getTooltipConfiguration, getUI, getUIId, getWindows, isClosing, isConnectorEnabled, isResizeLazy, iterator, paintContent, push, refresh, removeAction, removeActionHandler, removeClickListener, removeListener, removePollListener, removeWindow, scrollIntoView, setCaption, setContent, setCurrent, setFocusedComponent, setLastHeartbeatTimestamp, setLastProcessedClientToServerId, setNavigator, setOverlayContainerLabel, setPollInterval, setPushConnection, setResizeLazy, setScrollLeft, setScrollTop, setSession, setTabIndex, setTheme, showNotification, showNotification, showNotification, showNotification, showNotification, showNotification
addComponentAttachListener, addComponentDetachListener, fireComponentAttachEvent, fireComponentDetachEvent, getContent, readDesign, readDesignChildren, removeComponentAttachListener, removeComponentDetachListener, removeFromParent, setHeight, setWidth, writeDesign
addContextClickListener, addListener, addShortcutListener, addStyleName, beforeClientResponse, findAncestor, fireComponentErrorEvent, fireComponentEvent, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefined
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, isEnabled, isReadOnly, isVisible, readDesign, removeListener, removeStyleName, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, handleConnectorRequest, isAttached, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
public static final java.lang.String LAST_OFFLINE_PROJECT
public A_CmsUI()
public static CmsObject getCmsObject()
public void changeProject(CmsProject project)
project
- the project to change topublic void changeSite(java.lang.String siteRoot)
siteRoot
- the site to change topublic void closeWindows()
public java.io.Serializable getAttribute(java.lang.String key)
key
- the attribute keypublic CmsDisplayType getDisplayType()
public javax.servlet.http.HttpSession getHttpSession()
public CmsProject getLastOfflineProject()
public com.google.common.collect.Multimap<java.lang.String,java.lang.String> getParameters()
public CmsWorkplaceSettings getWorkplaceSettings()
public void openPageOrWarn(java.lang.String link, java.lang.String target)
link
- the URL to open in the new windowtarget
- the target window namepublic void openPageOrWarn(java.lang.String link, java.lang.String target, java.lang.String warning)
link
- the URL to open in the new windowtarget
- the target window namewarning
- the warning to show if opening the window failspublic void reload()
public void setAttribute(java.lang.String key, java.io.Serializable value)
key
- the attribute keyvalue
- the attribute valuepublic void setContentToDialog(java.lang.String caption, CmsBasicDialog dialog)
caption
- the captiondialog
- the dialog contentpublic void setContentToDialog(java.lang.String caption, com.vaadin.ui.Component component)
TODO: In the future this should only handle window creation, refactor dialog contents to CmsBasicDialog
caption
- the captioncomponent
- the dialog contentpublic void setError(java.lang.String error)
error
- the error message to displayprotected void init(com.vaadin.server.VaadinRequest request)
init
in class com.vaadin.ui.UI
UI.init(com.vaadin.server.VaadinRequest)