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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
PORTLET_NAME
- See Also:
-
NAME_PREFERENCE
- See Also:
-
DATA_INIT_PREFERENCE
- See Also:
-
CONTENT
- See Also:
-
LANG
- See Also:
-
NOTE_ID
- See Also:
-
-
Constructor Details
-
NotePageViewApplicationSettingsPlugin
public NotePageViewApplicationSettingsPlugin()
-
-
Method Details
-
init
@PostConstruct public void init() -
getPortletName
- Specified by:
getPortletNamein interfaceio.meeds.layout.plugin.ApplicationSettingsPlugin
-
isConfigurableInSiteContainer
public boolean isConfigurableInSiteContainer()- Specified by:
isConfigurableInSiteContainerin interfaceio.meeds.layout.plugin.ApplicationSettingsPlugin
-
getSettingsSchema
-
read
public Map<String,Object> read(io.meeds.layout.model.ApplicationSettingsContext context) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Specified by:
readin interfaceio.meeds.layout.plugin.ApplicationSettingsPlugin- Throws:
IllegalAccessExceptionorg.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:
validatein interfaceio.meeds.layout.plugin.ApplicationSettingsPlugin- Throws:
IllegalAccessExceptionorg.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:
applyin interfaceio.meeds.layout.plugin.ApplicationSettingsPlugin- Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-