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.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidinit()booleanread(io.meeds.layout.model.ApplicationSettingsContext context) voidNothing to write, asapply(ApplicationSettingsContext, Map)judges it, is accepted whatever the window.
-
Field Details
-
PORTLET_NAME
- See Also:
-
LISTING_MODE
- See Also:
-
MAX_APPS_TO_LIST
- See Also:
-
SELECTION_MODE
- See Also:
-
APPLICATION_IDS
- See Also:
-
CATEGORY_IDS
- See Also:
-
SHOW_HEADER
- See Also:
-
HEADER_TITLE
- See Also:
-
TEMPLATE
- See Also:
-
SHOW_SEE_MORE
- See Also:
-
LIST_IN_ROW
- See Also:
-
SHOW_ICON
- See Also:
-
ICON_SIZE
- See Also:
-
SHOW_NAME
- See Also:
-
COLOR
- See Also:
-
OUTLINED
- See Also:
-
H_ALIGN
- See Also:
-
V_ALIGN
- See Also:
-
NAME_PREFERENCE
- See Also:
-
APPLICATION_ID_PREFERENCE
- See Also:
-
DATA_INIT_PREFERENCE
- See Also:
-
DEFAULT_APPS_TO_LIST
public static final int DEFAULT_APPS_TO_LIST- See Also:
-
HEADER_MAX_LENGTH
public static final int HEADER_MAX_LENGTH- See Also:
-
-
Constructor Details
-
MyApplicationsApplicationSettingsPlugin
public MyApplicationsApplicationSettingsPlugin()
-
-
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.ObjectNotFoundExceptionNothing to write, asapply(ApplicationSettingsContext, Map)judges it, is accepted whatever the window. A window given a new setting is then validated under that setting's listability: none of the applications the old setting created, but those a copy of the window would carry to it for the list the caller gives, whichMyApplicationsCopyService.getCopyPreferences(Map, boolean, String)previews with no write; a copy refused at creation stays beyond the preview.- 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
-