Package org.ametys.web.parameters.view
Class ServiceViewParametersManager
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.parameters.view.ServiceViewParametersManager
-
- All Implemented Interfaces:
LogEnabled
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
public class ServiceViewParametersManager extends AbstractLogEnabled implements Component, Serviceable, Contextualizable, Initializable, Disposable
Manager for service view parameters
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServiceViewParametersManager.ServiceViewParametersReloader
Class representing a service view parameters reloader(package private) static class
ServiceViewParametersManager.ServiceWrapper
(package private) static class
ServiceViewParametersManager.SkinsServiceViewParameters
(package private) static class
ServiceViewParametersManager.SkinWrapper
-
Field Summary
Fields Modifier and Type Field Description private List<ThreadSafeComponentManager>
_components
protected Context
_context
The avalon contextprotected FileReloaderUtils
_fileReloaderUtils
The file reloader utilsprotected ServiceManager
_manager
The service managerprotected ServiceExtensionPoint
_serviceExtensionPoint
The service extension pointprotected ServiceViewParametersManager.SkinsServiceViewParameters
_skinsServiceViewParameters
The object representing the view parameters of the different service by skinprotected ViewAndParametersParser
_viewAndParametersParser
The view and parameters parserprotected ViewParameterTypeExtensionPoint
_viewParametersEP
The view parameter type extension pointprotected ViewParametersManager
_viewParametersManager
The view parameters managerstatic String
ROLE
Avalon Role
-
Constructor Summary
Constructors Constructor Description ServiceViewParametersManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Optional<ViewParametersModel>
_configureViewParameters(Configuration paramConfiguration, String viewParametersId, String plugin, String catalog)
Parse service view parameters from the configurationprivate void
_disposeComponents()
void
contextualize(Context context)
void
dispose()
Optional<ViewParametersModel>
getViewParameters(String skinId, String serviceId, String viewName)
Get the view parameters of a servicevoid
initialize()
void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_fileReloaderUtils
protected FileReloaderUtils _fileReloaderUtils
The file reloader utils
-
_viewParametersEP
protected ViewParameterTypeExtensionPoint _viewParametersEP
The view parameter type extension point
-
_viewAndParametersParser
protected ViewAndParametersParser _viewAndParametersParser
The view and parameters parser
-
_serviceExtensionPoint
protected ServiceExtensionPoint _serviceExtensionPoint
The service extension point
-
_manager
protected ServiceManager _manager
The service manager
-
_skinsServiceViewParameters
protected ServiceViewParametersManager.SkinsServiceViewParameters _skinsServiceViewParameters
The object representing the view parameters of the different service by skin
-
_viewParametersManager
protected ViewParametersManager _viewParametersManager
The view parameters manager
-
_components
private List<ThreadSafeComponentManager> _components
-
-
Constructor Detail
-
ServiceViewParametersManager
public ServiceViewParametersManager()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
getViewParameters
public Optional<ViewParametersModel> getViewParameters(String skinId, String serviceId, String viewName)
Get the view parameters of a service- Parameters:
skinId
- the skin idserviceId
- the service idviewName
- the view name- Returns:
- the view parameters
-
_configureViewParameters
protected Optional<ViewParametersModel> _configureViewParameters(Configuration paramConfiguration, String viewParametersId, String plugin, String catalog) throws ConfigurationException
Parse service 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
public void dispose()
- Specified by:
dispose
in interfaceDisposable
-
_disposeComponents
private void _disposeComponents()
-
-