Package org.ametys.web.parameters.view
Class ContentViewParametersManager
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.web.parameters.view.ContentViewParametersManager
-
- All Implemented Interfaces:
LogEnabled
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
public class ContentViewParametersManager extends AbstractLogEnabled implements Component, Serviceable, Contextualizable, Initializable, Disposable
Manager for content view parameters
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ContentViewParametersManager.ContentTypeWrapper
static class
ContentViewParametersManager.ContentViewParametersReloader
Class representing a content view parameters reloader(package private) static class
ContentViewParametersManager.SkinsContentViewParameters
(package private) static class
ContentViewParametersManager.SkinWrapper
-
Field Summary
Fields Modifier and Type Field Description private List<ThreadSafeComponentManager>
_components
protected ContentTypeExtensionPoint
_contentTypeEP
The content type extension pointprotected Context
_context
The avalon contextprotected FileReloaderUtils
_fileReloaderUtils
The file reloader utilsprotected ServiceManager
_manager
The service managerprotected AmetysObjectResolver
_resolver
The ametys object resolverprotected ContentViewParametersManager.SkinsContentViewParameters
_skinsContentViewParameters
The object representing the view parameters of the different content type 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 ContentViewParametersManager()
-
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 content view parameters from the configurationprivate void
_disposeComponents()
void
contextualize(Context context)
void
dispose()
Optional<ViewParametersModel>
getViewParameters(String skinId, String contentTypeId, String viewName)
Get view parameters for a content typevoid
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
-
_resolver
protected AmetysObjectResolver _resolver
The ametys object resolver
-
_manager
protected ServiceManager _manager
The service manager
-
_contentTypeEP
protected ContentTypeExtensionPoint _contentTypeEP
The content type extension point
-
_skinsContentViewParameters
protected ContentViewParametersManager.SkinsContentViewParameters _skinsContentViewParameters
The object representing the view parameters of the different content type by skin
-
_viewParametersManager
protected ViewParametersManager _viewParametersManager
The view parameters manager
-
_components
private List<ThreadSafeComponentManager> _components
-
-
Constructor Detail
-
ContentViewParametersManager
public ContentViewParametersManager()
-
-
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 contentTypeId, String viewName)
Get view parameters for a content type- Parameters:
skinId
- the skin idcontentTypeId
- the content type idviewName
- the view name- Returns:
- the view parameters
-
_configureViewParameters
protected Optional<ViewParametersModel> _configureViewParameters(Configuration paramConfiguration, String viewParametersId, String plugin, String catalog) throws ConfigurationException
Parse content 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()
-
-