Interface NewSectionOperation
public interface NewSectionOperation
Operation for creating new sections. This operation is meant to be used in a webedit context.
It may be used in two different ways:
From an Executable in combination with FSButton
In that case you may want to delegate the whole context to this operation. Usually you don't need to make any further settings.
From anywhere (Executable, Script, ...)
Define all settings explicitly by yourself.
- Since:
- 5.2.180703
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Context Parameter for body's name as Stringstatic final String
Context Parameter for DropDatastatic final String
Context Parameter for Page (id or uid as String)static final String
ID as String of the HTML element to reload on successstatic final String
Context parameter for the numerical ID of the contextual section after which the new section should be inserted.static final String
Context Parameter for the store's name as String.static final OperationType<NewSectionOperation>
Operation for creating a new Section -
Method Summary
Modifier and TypeMethodDescriptionBody on which a new section should be created.delegateContext
(Map<String, Object> context) Convenient method to pass a whole context containing all needed information to the operation.dropData
(CommodityContainer dropData) ACommodityContainer
may be provided to support drag-and-drop data containing either aSection
or other data compatible with any drop editor configured in each allowed template.You may provide a filter to control which templates are available for the newSection
.Section<?>
perform()
Executes this operation based on the previously defined settings.preselectedLanguage
(@NotNull Language language) Sets a preselected language in new-section dialogs.reloadAfterCreation
(String elementId) The ID of an HTML element to be reloaded instead of the complete preview, after an automatedSection
creation.Contextual section after which the new section should be inserted.template
(@NotNull SectionTemplate template) TheSectionTemplate
on which the new section should be based on.
-
Field Details
-
PARAM_PAGE
Context Parameter for Page (id or uid as String)- Since:
- 5.2.180703
- See Also:
-
PARAM_BODY
Context Parameter for body's name as String- Since:
- 5.2.180703
- See Also:
-
PARAM_SECTION
Context parameter for the numerical ID of the contextual section after which the new section should be inserted.- Since:
- 5.2.191103
- See Also:
-
PARAM_RELOAD
ID as String of the HTML element to reload on success- Since:
- 5.2.180703
- See Also:
-
PARAM_DROPDATA
Context Parameter for DropData- Since:
- 5.2.180703
- See Also:
-
PARAM_STORE
Context Parameter for the store's name as String. SeeStore.Type
.- Since:
- 5.2.180703
- See Also:
-
TYPE
Operation for creating a new Section- Since:
- 5.2.180703
-
-
Method Details
-
body
Body on which a new section should be created.- Parameters:
body
- body on which new sections should be created- Since:
- 5.2.180703
-
section
Contextual section after which the new section should be inserted.- Parameters:
section
- The contextual section.- Since:
- 5.2.191103
-
template
TheSectionTemplate
on which the new section should be based on. If no template is provided the user will be asked to select one.- Parameters:
template
-SectionTemplate
on which the new section should be based- Since:
- 5.2.180703
-
reloadAfterCreation
The ID of an HTML element to be reloaded instead of the complete preview, after an automatedSection
creation.- Parameters:
elementId
- the html element which should be reloaded after creation- Since:
- 5.2.180703
-
dropData
ACommodityContainer
may be provided to support drag-and-drop data containing either aSection
or other data compatible with any drop editor configured in each allowed template. If the data fits to multiple section templates the user will be asked to select one whenperform()
is executed. The provided data will then be used to pre-fill the newly created Section.- Parameters:
dropData
- the drag-and-drop object containing aSection
or any other compatible data- Since:
- 5.2.180703
-
filterAvailableTemplates
You may provide a filter to control which templates are available for the newSection
. Keep in mind, that only templates allowed for the specific content area are available anyway.- Parameters:
filter
- filter to sort outSectionTemplate
- Since:
- 5.2.180703
-
delegateContext
Convenient method to pass a whole context containing all needed information to the operation. This is especially useful if this operation is used inside aExecutable
called from a FS_BUTTON, because in that case parameters (e.g. page, body) may be directly passed. That way you are able to extend the capabilities of the NewSectionExecutable without any further Glue-Code. Be aware that parameters may be overwritten in subsequently called configuration methods.- Parameters:
context
- the context containing all information needed- Since:
- 5.2.180703
-
preselectedLanguage
Sets a preselected language in new-section dialogs.- Parameters:
language
- the language which should be preselected in the dialog- Since:
- 5.2.180901, 5.2.180804
-
perform
Section<?> perform()Executes this operation based on the previously defined settings. This method will wait for the completion of the section creation process.- Returns:
- the newly created
Section
ornull
if the operation failed - Since:
- 5.2.180703
-