Class CmsPageEditBean

java.lang.Object
io.goobi.viewer.managedbeans.CmsPageEditBean
All Implemented Interfaces:
Serializable

@Named @ViewScoped public class CmsPageEditBean extends Object implements Serializable

CmsPageEditBean class.

See Also:
  • Constructor Details

    • CmsPageEditBean

      public CmsPageEditBean()
  • Method Details

    • setup

      @PostConstruct public void setup()

      setup.

    • savePageAndForwardToEdit

      public void savePageAndForwardToEdit() throws DAOException

      savePageAndForwardToEdit.

      Throws:
      DAOException - if any.
    • saveSelectedPage

      public void saveSelectedPage() throws DAOException
      Adds the current page to the database, if it doesn't exist or updates it otherwise
      Throws:
      DAOException - if any.
    • deleteSelectedPage

      public String deleteSelectedPage() throws DAOException
      Action method for deleting selectedPage from the database.
      Returns:
      Return view
      Throws:
      DAOException - if any.
    • deletePage

      public void deletePage(CMSPage page) throws DAOException
      Deletes given CMS page from the database.
      Parameters:
      page - Page to delete
      Throws:
      DAOException - if any.
    • setSelectedPage

      public void setSelectedPage(CMSPage currentPage) throws DAOException

      Setter for the field selectedPage.

      Parameters:
      currentPage - a CMSPage object.
      Throws:
      DAOException - if any.
    • getSelectedPageId

      public String getSelectedPageId()

      getSelectedPageId.

      Returns:
      ID of selectedPage
    • setSelectedPageId

      public void setSelectedPageId(String id) throws DAOException

      setSelectedPageId.

      Parameters:
      id - a String object
      Throws:
      DAOException
    • getSelectedPage

      public CMSPage getSelectedPage()

      Getter for the field selectedPage.

      Returns:
      a CMSPage object
    • createAndOpenNewPage

      public String 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 cmsPage
      Parameters:
      title - The title to be used for the current locale, optional
      relatedPI - The PI of a related work, optional
      Returns:
      a String object.
    • getSidebarWidgets

      public Map<WidgetDisplayElement,Boolean> getSidebarWidgets()

      Getter for the field sidebarWidgets.

      Returns:
      a Map object
    • setSidebarWidgets

      public void setSidebarWidgets(Map<WidgetDisplayElement,Boolean> sidebarWidgets)

      Setter for the field sidebarWidgets.

      Parameters:
      sidebarWidgets - a Map object
    • getSelectedWidgets

      public List<WidgetDisplayElement> getSelectedWidgets()

      getSelectedWidgets.

      Returns:
      a List object
    • resetSelectedWidgets

      public void resetSelectedWidgets()

      resetSelectedWidgets.

    • getAndResetSelectedWidgets

      public List<WidgetDisplayElement> getAndResetSelectedWidgets()

      getAndResetSelectedWidgets.

      Returns:
      a List object
    • getSelectedComponent

      public String getSelectedComponent()

      Getter for the field selectedComponent.

      Returns:
      a String object
    • setSelectedComponent

      public void setSelectedComponent(String selectedComponent)

      Setter for the field selectedComponent.

      Parameters:
      selectedComponent - a String object
    • getAvailableComponents

      public List<javax.faces.model.SelectItem> getAvailableComponents(CMSPage page)

      getAvailableComponents.

      Parameters:
      page - a CMSPage object
      Returns:
      a List object
    • getAvailableMetadataFields

      public List<String> getAvailableMetadataFields()
      Get the list of metadata fields which may be displayed. This is the main metadata list
      Returns:
      the main metadata list
    • mayRemoveCategoryFromPage

      public boolean mayRemoveCategoryFromPage(CMSCategory cat) throws DAOException

      mayRemoveCategoryFromPage.

      Parameters:
      cat - a CMSCategory 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

      public void setNewSelectedPage(Long templateId)

      setNewSelectedPage.

      Parameters:
      templateId - a Long object
    • getPageEditState

      public CMSPageEditState getPageEditState()

      Getter for the field pageEditState.

      Returns:
      a CMSPageEditState object
    • setPageEditState

      public void setPageEditState(CMSPageEditState pageEditState)

      Setter for the field pageEditState.

      Parameters:
      pageEditState - a CMSPageEditState object
    • deleteComponent

      public boolean deleteComponent(CMSComponent component)

      deleteComponent.

      Parameters:
      component - a CMSComponent 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

      public void setTemplateName(String templateName)

      Setter for the field templateName.

      Parameters:
      templateName - a String object
    • getTemplateName

      public String 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