Class NotePageViewApplicationSettingsPlugin

java.lang.Object
io.meeds.notes.plugin.NotePageViewApplicationSettingsPlugin
All Implemented Interfaces:
io.meeds.layout.plugin.ApplicationSettingsPlugin

@Component @Profile("layout") public class NotePageViewApplicationSettingsPlugin extends Object implements io.meeds.layout.plugin.ApplicationSettingsPlugin
Configures a Block of content window as its settings drawer does: its text is a page note bound to the CMS setting the window's name preference designates, written in the default language or in a translation through NotePageViewService's permission-checked writers, as the user. A draft window shares its setting with the live one, so the first write on a window that does not own its setting creates one for it, keyed on the live page, with a copy of the note in every language. A window copied with no setting name carries the note's every language in its data.init preference instead, which the portlet imports into the setting it creates at the first render: the first write imports it into the setting it creates through NotePageViewService.importNotePageData(String, NotePageData, Identity), as the user, since that preference is one any editor of the page can write. The setting of a window in a site container is keyed on the site's home page, and a write is refused while the site has none.
  • Field Details

  • Constructor Details

    • NotePageViewApplicationSettingsPlugin

      public NotePageViewApplicationSettingsPlugin()
  • Method Details

    • init

      @PostConstruct public void init()
    • getPortletName

      public String getPortletName()
      Specified by:
      getPortletName in interface io.meeds.layout.plugin.ApplicationSettingsPlugin
    • isConfigurableInSiteContainer

      public boolean isConfigurableInSiteContainer()
      Specified by:
      isConfigurableInSiteContainer in interface io.meeds.layout.plugin.ApplicationSettingsPlugin
    • getSettingsSchema

      public Map<String,Object> getSettingsSchema()
      Specified by:
      getSettingsSchema in interface io.meeds.layout.plugin.ApplicationSettingsPlugin
    • read

      public Map<String,Object> read(io.meeds.layout.model.ApplicationSettingsContext context) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Specified by:
      read in interface io.meeds.layout.plugin.ApplicationSettingsPlugin
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • validate

      public void validate(io.meeds.layout.model.ApplicationSettingsContext context, Map<String,Object> settings) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Specified by:
      validate in interface io.meeds.layout.plugin.ApplicationSettingsPlugin
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException
    • apply

      public void apply(io.meeds.layout.model.ApplicationSettingsContext context, Map<String,Object> settings) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException
      Specified by:
      apply in interface io.meeds.layout.plugin.ApplicationSettingsPlugin
      Throws:
      IllegalAccessException
      org.exoplatform.commons.exception.ObjectNotFoundException