Package org.ametys.web.parameters.view
Class GlobalViewParametersManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.parameters.view.GlobalViewParametersManager
- All Implemented Interfaces:
LogEnabled
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
public class GlobalViewParametersManager
extends AbstractLogEnabled
implements Component, Serviceable, Contextualizable, Initializable, Disposable
Manager for global view parameters
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Class representing a global view parameters reloaderstatic enum
The view parameters type -
Field Summary
Modifier and TypeFieldDescriptionprotected Context
The avalon contextprotected FileReloaderUtils
The file reloader utilsprotected ServiceManager
The service managerprotected org.ametys.web.parameters.view.GlobalViewParametersManager.SkinsGlobalViewParameters
The object representing the global view parameters by skinprotected ViewAndParametersParser
The view and parameters parserprotected ViewParameterTypeExtensionPoint
The view parameter type extension pointstatic final String
Avalon Role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_addViewParameters
(Configuration paramConfiguration, String skinId, GlobalViewParametersManager.ViewParametersType type, String plugin, String catalog) Add view parameters from the configuration of a given typeprotected Optional<ViewParametersModel>
_configureViewParameters
(Configuration paramConfiguration, String viewParametersId, String plugin, String catalog) Parse global view parameters from the configurationvoid
contextualize
(Context context) void
dispose()
Get global view parameters for one type (template, zone, zone item, service or content)void
void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role -
_fileReloaderUtils
The file reloader utils -
_viewParametersEP
The view parameter type extension point -
_viewAndParametersParser
The view and parameters parser -
_context
The avalon context -
_manager
The service manager -
_skinsGlobalViewParameters
protected org.ametys.web.parameters.view.GlobalViewParametersManager.SkinsGlobalViewParameters _skinsGlobalViewParametersThe object representing the global view parameters by skin
-
-
Constructor Details
-
GlobalViewParametersManager
public GlobalViewParametersManager()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
getViewParameters
public Optional<ViewParametersModel> getViewParameters(String skinId, GlobalViewParametersManager.ViewParametersType type) Get global view parameters for one type (template, zone, zone item, service or content)- Parameters:
skinId
- the skin idtype
- the type- Returns:
- the view parameters
-
_addViewParameters
protected void _addViewParameters(Configuration paramConfiguration, String skinId, GlobalViewParametersManager.ViewParametersType type, String plugin, String catalog) throws ConfigurationException Add view parameters from the configuration of a given type- Parameters:
paramConfiguration
- the configurationskinId
- the skin Idtype
- the typeplugin
- the plugincatalog
- the catalog- Throws:
ConfigurationException
- if a configuration error occurred
-
_configureViewParameters
protected Optional<ViewParametersModel> _configureViewParameters(Configuration paramConfiguration, String viewParametersId, String plugin, String catalog) throws ConfigurationException Parse global view parameters from the configuration- Parameters:
paramConfiguration
- the configurationviewParametersId
- the view parameters idplugin
- the plugincatalog
- the catalog- Returns:
- the view parameters
- Throws:
ConfigurationException
- if a configuration error occurred
-
dispose
- Specified by:
dispose
in interfaceDisposable
-