Class CmsPageEditBean
- All Implemented Interfaces:
Serializable
CmsPageEditBean class.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponent.createAndOpenNewPage(String title, String relatedPI) Create a new CMSPage based on the given template. title and relatedPI are set on the page if given Opens the view to create/edit the cmsPagebooleandeleteComponent(CMSComponent component) deleteComponent.voiddeletePage(CMSPage page) Deletes given CMS page from the database.Action method for deleting selectedPage from the database.getAndResetSelectedWidgets.List<jakarta.faces.model.SelectItem> getAvailableComponents.Get the list of metadata fields which may be displayed.Getter for the fieldpageEditState.Getter for the fieldselectedComponent.Getter for the fieldselectedPage.getSelectedPageId.getSelectedWidgets.Getter for the fieldsidebarWidgets.Getter for the fieldtemplateName.booleanisEditMode.booleanisSaveAsTemplate.booleanisTemplateLockComponents.booleanmayRemoveCategoryFromPage.voidresetSelectedWidgets.voidsavePageAndForwardToEdit.voidAdds the current page to the database, if it doesn't exist or updates it otherwisevoidsetEditMode(boolean editMode) Setter for the fieldeditMode.voidsetNewSelectedPage.voidsetNewSelectedPage(Long templateId) setNewSelectedPage.voidsetPageEditState(CMSPageEditState pageEditState) Setter for the fieldpageEditState.voidsetSaveAsTemplate(boolean saveAsTemplate) Setter for the fieldsaveAsTemplate.voidsetSelectedComponent(String selectedComponent) Setter for the fieldselectedComponent.voidsetSelectedPage(CMSPage currentPage) Setter for the fieldselectedPage.voidsetSelectedPageId.voidsetSidebarWidgets(Map<WidgetDisplayElement, Boolean> sidebarWidgets) Setter for the fieldsidebarWidgets.voidsetTemplateLockComponents(boolean templateLockComponents) Setter for the fieldtemplateLockComponents.voidsetTemplateName(String templateName) Setter for the fieldtemplateName.voidsetup()setup.
-
Constructor Details
-
CmsPageEditBean
public CmsPageEditBean()
-
-
Method Details
-
setup
@PostConstruct public void setup()setup.
-
savePageAndForwardToEdit
savePageAndForwardToEdit.
- Throws:
DAOException- if any.
-
saveSelectedPage
Adds the current page to the database, if it doesn't exist or updates it otherwise- Throws:
DAOException- if any.
-
deleteSelectedPage
Action method for deleting selectedPage from the database.- Returns:
- Return view
- Throws:
DAOException- if any.
-
deletePage
Deletes given CMS page from the database.- Parameters:
page- Page to delete- Throws:
DAOException- if any.
-
setSelectedPage
Setter for the field
selectedPage.- Parameters:
currentPage- aCMSPageobject.- Throws:
DAOException- if any.
-
getSelectedPageId
getSelectedPageId.
- Returns:
- ID of selectedPage
-
setSelectedPageId
setSelectedPageId.
- Parameters:
id- aStringobject- Throws:
DAOException
-
getSelectedPage
Getter for the field
selectedPage.- Returns:
- a
CMSPageobject
-
createAndOpenNewPage
Create a new CMSPage based on the given template. title and relatedPI are set on the page if given Opens the view to create/edit the cmsPage- Parameters:
title- The title to be used for the current locale, optionalrelatedPI- The PI of a related work, optional- Returns:
- a
Stringobject.
-
getSidebarWidgets
Getter for the field
sidebarWidgets.- Returns:
- a
Mapobject
-
setSidebarWidgets
Setter for the field
sidebarWidgets.- Parameters:
sidebarWidgets- aMapobject
-
getSelectedWidgets
getSelectedWidgets.
- Returns:
- a
Listobject
-
resetSelectedWidgets
public void resetSelectedWidgets()resetSelectedWidgets.
-
getAndResetSelectedWidgets
getAndResetSelectedWidgets.
- Returns:
- a
Listobject
-
getSelectedComponent
Getter for the field
selectedComponent.- Returns:
- a
Stringobject
-
setSelectedComponent
Setter for the field
selectedComponent.- Parameters:
selectedComponent- aStringobject
-
getAvailableComponents
getAvailableComponents.
-
getAvailableMetadataFields
Get the list of metadata fields which may be displayed. This is the main metadata list- Returns:
- the main metadata list
-
mayRemoveCategoryFromPage
mayRemoveCategoryFromPage.
- Parameters:
cat- aCMSCategoryobject.- Returns:
- false only if the user has limited privileges for categories and only one category is set for the selected page
- Throws:
DAOException- if any.
-
isEditMode
public boolean isEditMode()isEditMode.
- Returns:
- a boolean.
-
setEditMode
public void setEditMode(boolean editMode) Setter for the field
editMode.- Parameters:
editMode- a boolean.
-
setNewSelectedPage
public void setNewSelectedPage()setNewSelectedPage.
-
setNewSelectedPage
setNewSelectedPage.
- Parameters:
templateId- aLongobject
-
getPageEditState
Getter for the field
pageEditState.- Returns:
- a
CMSPageEditStateobject
-
setPageEditState
Setter for the field
pageEditState.- Parameters:
pageEditState- aCMSPageEditStateobject
-
deleteComponent
deleteComponent.
- Parameters:
component- aCMSComponentobject- Returns:
- a boolean
-
addComponent
public void addComponent()addComponent.
-
setSaveAsTemplate
public void setSaveAsTemplate(boolean saveAsTemplate) Setter for the field
saveAsTemplate.- Parameters:
saveAsTemplate- a boolean
-
isSaveAsTemplate
public boolean isSaveAsTemplate()isSaveAsTemplate.
- Returns:
- a boolean
-
setTemplateName
Setter for the field
templateName.- Parameters:
templateName- aStringobject
-
getTemplateName
Getter for the field
templateName.- Returns:
- a
Stringobject
-
isTemplateLockComponents
public boolean isTemplateLockComponents()isTemplateLockComponents.
- Returns:
- a boolean
-
setTemplateLockComponents
public void setTemplateLockComponents(boolean templateLockComponents) Setter for the field
templateLockComponents.- Parameters:
templateLockComponents- a boolean
-