Package org.opencms.ui.apps
Class CmsEditor
java.lang.Object
org.opencms.ui.apps.CmsEditor
- All Implemented Interfaces:
com.vaadin.navigator.ViewChangeListener
,Serializable
,I_CmsHasShortcutActions
,I_CmsWorkplaceApp
,I_CmsWindowCloseListener
public class CmsEditor
extends Object
implements I_CmsWorkplaceApp, com.vaadin.navigator.ViewChangeListener, I_CmsWindowCloseListener, I_CmsHasShortcutActions
The editor app. Will open the appropriate editor for a resource.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.navigator.ViewChangeListener
com.vaadin.navigator.ViewChangeListener.ViewChangeEvent
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterViewChange
(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) boolean
beforeViewChange
(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) static String
getEditLink
(CmsUUID structureId, boolean plainText, String backLink) Returns the edit link for given resource structure id.static String
getEditState
(CmsUUID structureId, boolean plainText, String backLink) Returns the edit state for the given resource structure id.static String
getEditStateForNew
(CmsObject cms, I_CmsResourceType resourceType, String contextPath, String modelFilePath, boolean plainText, String backLink) Returns the edit state for the given resource structure id.Returns the shortcut actions.void
initUI
(I_CmsAppUIContext context) Within this method the app UI should be initialized.void
onStateChange
(String state) Called on navigation events.void
Executed on window close.static void
openBackLink
(String backlink) Navigates to the back link target.
-
Field Details
-
BACK_LINK_PREFIX
The back link prefix.- See Also:
-
PLAIN_TEXT_PREFIX
The back link prefix.- See Also:
-
RESOURCE_ID_PREFIX
The resource id state prefix.- See Also:
-
RESOURCE_PATH_PREFIX
The resource id state prefix.- See Also:
-
-
Constructor Details
-
CmsEditor
public CmsEditor()
-
-
Method Details
-
getEditLink
Returns the edit link for given resource structure id.- Parameters:
structureId
- the resource structure isplainText
- if plain text/source editing is requiredbackLink
- the back link location- Returns:
- the state
-
getEditState
Returns the edit state for the given resource structure id.- Parameters:
structureId
- the resource structure idplainText
- if plain text/source editing is requiredbackLink
- the back link location- Returns:
- the state
-
getEditStateForNew
public static String getEditStateForNew(CmsObject cms, I_CmsResourceType resourceType, String contextPath, String modelFilePath, boolean plainText, String backLink) Returns the edit state for the given resource structure id.- Parameters:
cms
- the cms contextresourceType
- the resource type to createcontextPath
- the context pathmodelFilePath
- the model file pathplainText
- if plain text/source editing is requiredbackLink
- the back link location- Returns:
- the state
-
openBackLink
Navigates to the back link target.- Parameters:
backlink
- the back link
-
getShortcutActions
Description copied from interface:I_CmsHasShortcutActions
Returns the shortcut actions.- Specified by:
getShortcutActions
in interfaceI_CmsHasShortcutActions
- Returns:
- the shortcut actions
- See Also:
-
initUI
Description copied from interface:I_CmsWorkplaceApp
Within this method the app UI should be initialized.Use the context to add the app's components to the UI.
- Specified by:
initUI
in interfaceI_CmsWorkplaceApp
- Parameters:
context
- the UI context- See Also:
-
onStateChange
Description copied from interface:I_CmsWorkplaceApp
Called on navigation events.- Specified by:
onStateChange
in interfaceI_CmsWorkplaceApp
- Parameters:
state
- the app state to show- See Also:
-
onWindowClose
Description copied from interface:I_CmsWindowCloseListener
Executed on window close.- Specified by:
onWindowClose
in interfaceI_CmsWindowCloseListener
- See Also:
-