Class CmsPageEditBean
- All Implemented Interfaces:
Serializable
CmsPageEditBean class.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addComponent.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 cmsPageboolean
deleteComponent
(CMSComponent component) deleteComponent.void
deletePage
(CMSPage page) Deletes given CMS page from the database.Action method for deleting selectedPage from the database.getAndResetSelectedWidgets.List<javax.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
.boolean
isEditMode.boolean
isSaveAsTemplate.boolean
isTemplateLockComponents.boolean
mayRemoveCategoryFromPage.void
resetSelectedWidgets.void
savePageAndForwardToEdit.void
Adds the current page to the database, if it doesn't exist or updates it otherwisevoid
setEditMode
(boolean editMode) Setter for the fieldeditMode
.void
setNewSelectedPage.void
setNewSelectedPage
(Long templateId) setNewSelectedPage.void
setPageEditState
(CMSPageEditState pageEditState) Setter for the fieldpageEditState
.void
setSaveAsTemplate
(boolean saveAsTemplate) Setter for the fieldsaveAsTemplate
.void
setSelectedComponent
(String selectedComponent) Setter for the fieldselectedComponent
.void
setSelectedPage
(CMSPage currentPage) Setter for the fieldselectedPage
.void
setSelectedPageId.void
setSidebarWidgets
(Map<WidgetDisplayElement, Boolean> sidebarWidgets) Setter for the fieldsidebarWidgets
.void
setTemplateLockComponents
(boolean templateLockComponents) Setter for the fieldtemplateLockComponents
.void
setTemplateName
(String templateName) Setter for the fieldtemplateName
.void
setup()
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
- aCMSPage
object.- Throws:
DAOException
- if any.
-
getSelectedPageId
getSelectedPageId.
- Returns:
- ID of selectedPage
-
setSelectedPageId
setSelectedPageId.
- Parameters:
id
- aString
object- Throws:
DAOException
-
getSelectedPage
Getter for the field
selectedPage
.- Returns:
- a
CMSPage
object
-
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
String
object.
-
getSidebarWidgets
Getter for the field
sidebarWidgets
.- Returns:
- a
Map
object
-
setSidebarWidgets
Setter for the field
sidebarWidgets
.- Parameters:
sidebarWidgets
- aMap
object
-
getSelectedWidgets
getSelectedWidgets.
- Returns:
- a
List
object
-
resetSelectedWidgets
public void resetSelectedWidgets()resetSelectedWidgets.
-
getAndResetSelectedWidgets
getAndResetSelectedWidgets.
- Returns:
- a
List
object
-
getSelectedComponent
Getter for the field
selectedComponent
.- Returns:
- a
String
object
-
setSelectedComponent
Setter for the field
selectedComponent
.- Parameters:
selectedComponent
- aString
object
-
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
- aCMSCategory
object.- 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
- aLong
object
-
getPageEditState
Getter for the field
pageEditState
.- Returns:
- a
CMSPageEditState
object
-
setPageEditState
Setter for the field
pageEditState
.- Parameters:
pageEditState
- aCMSPageEditState
object
-
deleteComponent
deleteComponent.
- Parameters:
component
- aCMSComponent
object- 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
- aString
object
-
getTemplateName
Getter for the field
templateName
.- Returns:
- a
String
object
-
isTemplateLockComponents
public boolean isTemplateLockComponents()isTemplateLockComponents.
- Returns:
- a boolean
-
setTemplateLockComponents
public void setTemplateLockComponents(boolean templateLockComponents) Setter for the field
templateLockComponents
.- Parameters:
templateLockComponents
- a boolean
-