Class MyApplicationsApplicationSettingsPlugin

java.lang.Object
io.meeds.appcenter.plugin.MyApplicationsApplicationSettingsPlugin
All Implemented Interfaces:
io.meeds.layout.plugin.ApplicationSettingsPlugin

@Component @Profile("layout") public class MyApplicationsApplicationSettingsPlugin extends Object implements io.meeds.layout.plugin.ApplicationSettingsPlugin
Configures a Shortcuts window (AppCenterMyApplicationsPortlet) as its settings drawer does: every option of the drawer, validated by MyApplicationsSettingsService.getWritableSettings(String, Map) as the drawer's own save is, under the right that save has, computed from the live page holding the window or, in a site container, from the site the context names, a draft site on a draft, whose live site's edit right the layout tool checks first; never from a window preference. The listing and display options are the window's preferences; the header title is a translation keyed by the window's CMS setting name, which a draft shares with the live window: the first header write on a window that does not own its setting creates one for it on the live page and copies the header and the applications the window created to it through MyApplicationsCopyService, as a copy of the window carries them. A window copied with no setting name carries them in its data.init preference, which a render of the portlet consumes: the first write of any option on such a window creates its setting and consumes the copy into it, as the render would, so that the applications it lists exist. In a site container, which has no page to hang a setting on, the plain options are written on the site's windows, a copy stays for a render of the site to consume, and the header is not configurable.