Class CmsDateSeriesEditHandler
java.lang.Object
org.opencms.workplace.editors.directedit.CmsDateSeriesEditHandler
- All Implemented Interfaces:
I_CmsEditHandler
Special edit handler for contents that define multiple instances in a date series.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The key of the parameter/setting the instance date of the instance that should be edited is read from. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDeleteOptions
(CmsObject cms, CmsContainerElementBean elementBean, CmsUUID pageContextId, Map<String, String[]> requestParams) Returns a map of delete options.getEditOptions
(CmsObject cms, CmsContainerElementBean elementBean, CmsUUID pageContextId, Map<String, String[]> requestParams, boolean isListElement) Returns a map of edit options.getNewOptions
(CmsObject cms, CmsContainerElementBean elementBean, CmsUUID pageContextId, Map<String, String[]> requestParam) Gets the options for the 'New' (plus) operation in the page editor.void
handleDelete
(CmsObject cms, CmsContainerElementBean elementBean, String deleteOption, CmsUUID pageContextId, Map<String, String[]> requestParams) Executes the actual delete.handleNew
(CmsObject cms, String newLink, Locale locale, String referenceSitePath, String modelFileSitePath, String postCreateHandler, CmsContainerElementBean element, CmsUUID pageId, Map<String, String[]> requestParams, String choice) Creates a new resource to edit.prepareForEdit
(CmsObject cms, CmsContainerElementBean elementBean, String editOption, CmsUUID pageContextId, Map<String, String[]> requestParams) Prepares the resource to be edited.void
setParameters
(Map<String, String> params) Sets parameters for the edit handler.
-
Field Details
-
PARAM_INSTANCEDATE
The key of the parameter/setting the instance date of the instance that should be edited is read from.- See Also:
-
-
Constructor Details
-
CmsDateSeriesEditHandler
public CmsDateSeriesEditHandler()
-
-
Method Details
-
getDeleteOptions
public CmsDialogOptions getDeleteOptions(CmsObject cms, CmsContainerElementBean elementBean, CmsUUID pageContextId, Map<String, String[]> requestParams) Description copied from interface:I_CmsEditHandler
Returns a map of delete options. The value being the option description displayed to the user.- Specified by:
getDeleteOptions
in interfaceI_CmsEditHandler
- Parameters:
cms
- the cms contextelementBean
- the container element to be deletedpageContextId
- the structure id of the context containerpagerequestParams
- the request parameters- Returns:
- the available delete options
- See Also:
-
getEditOptions
public CmsDialogOptions getEditOptions(CmsObject cms, CmsContainerElementBean elementBean, CmsUUID pageContextId, Map<String, String[]> requestParams, boolean isListElement) Description copied from interface:I_CmsEditHandler
Returns a map of edit options. The value being the option description displayed to the user.- Specified by:
getEditOptions
in interfaceI_CmsEditHandler
- Parameters:
cms
- the cms contextelementBean
- the container element to be editedpageContextId
- the structure id of the context containerpagerequestParams
- the request parametersisListElement
- in case a list element, not a container element is about to be edited- Returns:
- the available edit options
- See Also:
-
getNewOptions
public CmsDialogOptions getNewOptions(CmsObject cms, CmsContainerElementBean elementBean, CmsUUID pageContextId, Map<String, String[]> requestParam) Description copied from interface:I_CmsEditHandler
Gets the options for the 'New' (plus) operation in the page editor.If this returns null, the default behavior for the 'New' operation will be used instead.
- Specified by:
getNewOptions
in interfaceI_CmsEditHandler
- Parameters:
cms
- the cms contextelementBean
- the container element bean from which the 'New' operation was initiatedpageContextId
- the structure id of the container pagerequestParam
- the request parameters- Returns:
- the available options, or null if the default behavior should be used
- See Also:
-
handleDelete
public void handleDelete(CmsObject cms, CmsContainerElementBean elementBean, String deleteOption, CmsUUID pageContextId, Map<String, String[]> requestParams) throws CmsExceptionDescription copied from interface:I_CmsEditHandler
Executes the actual delete.- Specified by:
handleDelete
in interfaceI_CmsEditHandler
- Parameters:
cms
- the cms contextelementBean
- the container element to deletedeleteOption
- the selected delete optionpageContextId
- the structure id of the context containerpagerequestParams
- the request parameters- Throws:
CmsException
- if something goes wrong- See Also:
-
handleNew
public String handleNew(CmsObject cms, String newLink, Locale locale, String referenceSitePath, String modelFileSitePath, String postCreateHandler, CmsContainerElementBean element, CmsUUID pageId, Map<String, String[]> requestParams, String choice) Description copied from interface:I_CmsEditHandler
Creates a new resource to edit.- Specified by:
handleNew
in interfaceI_CmsEditHandler
- Parameters:
cms
- The CmsObject of the current requestnewLink
- A string, specifying where which new content should be created.locale
- The localereferenceSitePath
- site path of the currently edited content.modelFileSitePath
- site path of the model filepostCreateHandler
- optional class name of anI_CmsCollectorPostCreateHandler
which is invoked after the content has been created.element
- the container element beanpageId
- the page idrequestParams
- the request parameterschoice
- the option chosen by the user- Returns:
- The site-path of the newly created resource.
- See Also:
-
prepareForEdit
public CmsUUID prepareForEdit(CmsObject cms, CmsContainerElementBean elementBean, String editOption, CmsUUID pageContextId, Map<String, String[]> requestParams) throws CmsExceptionDescription copied from interface:I_CmsEditHandler
Prepares the resource to be edited.- Specified by:
prepareForEdit
in interfaceI_CmsEditHandler
- Parameters:
cms
- the cms contextelementBean
- the container element to be editededitOption
- the selected edit optionpageContextId
- the structure id of the context containerpagerequestParams
- the request parameters- Returns:
- the structure id of the resource to be edited, may differ from the original element id
- Throws:
CmsException
- if something goes wrong- See Also:
-
setParameters
Description copied from interface:I_CmsEditHandler
Sets parameters for the edit handler.- Specified by:
setParameters
in interfaceI_CmsEditHandler
- Parameters:
params
- the parameters- See Also:
-