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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) booleanbeforeViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) static StringgetEditLink(CmsUUID structureId, boolean plainText, String backLink) Returns the edit link for given resource structure id.static StringgetEditState(CmsUUID structureId, boolean plainText, String backLink) Returns the edit state for the given resource structure id.static StringgetEditStateForNew(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.voidinitUI(I_CmsAppUIContext context) Within this method the app UI should be initialized.voidonStateChange(String state) Called on navigation events.voidExecuted on window close.static voidopenBackLink(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_CmsHasShortcutActionsReturns the shortcut actions.- Specified by:
getShortcutActionsin interfaceI_CmsHasShortcutActions- Returns:
- the shortcut actions
- See Also:
-
initUI
Description copied from interface:I_CmsWorkplaceAppWithin this method the app UI should be initialized.Use the context to add the app's components to the UI.
- Specified by:
initUIin interfaceI_CmsWorkplaceApp- Parameters:
context- the UI context- See Also:
-
onStateChange
Description copied from interface:I_CmsWorkplaceAppCalled on navigation events.- Specified by:
onStateChangein interfaceI_CmsWorkplaceApp- Parameters:
state- the app state to show- See Also:
-
onWindowClose
Description copied from interface:I_CmsWindowCloseListenerExecuted on window close.- Specified by:
onWindowClosein interfaceI_CmsWindowCloseListener- See Also:
-