Package org.ametys.cms.contenttype
Class DynamicContentTypeDescriptorExtentionPoint
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<DynamicContentTypeDescriptor>
-
- org.ametys.cms.contenttype.DynamicContentTypeDescriptorExtentionPoint
-
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<DynamicContentTypeDescriptor>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
public class DynamicContentTypeDescriptorExtentionPoint extends AbstractThreadSafeComponentExtensionPoint<DynamicContentTypeDescriptor>
This class is in charge of handling dynamic content type descriptor extension point.
This point handles the pool of available dynamic content type descriptors.
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,String>
_cache
private ContentTypeExtensionPoint
_contentTypeEP
private ContentTypesHelper
_contentTypesHelper
private ServiceManager
_smanager
static String
ROLE
Avalon Role-
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description DynamicContentTypeDescriptorExtentionPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String
_getCacheIdentifier(String[] contentTypes, String[] mixins)
private Set<String>
_getContentTypesAndAncestor(String[] contentTypes, String[] mixins)
DynamicContentTypeDescriptor
getMatchingDescriptor(String[] contentTypes, String[] mixinTypes)
Get the matching dynamic descriptor for given content types and mixinsvoid
initializeExtensions()
Finalize the initialization of the extensions.
This method is called after alladdExtension()
calls.
This is the last step before the actual startup of the application.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
addComponent, addExtension, contextualize, dispose, getExtension, getExtensionsIds, hasExtension, initialize
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
ROLE
public static final String ROLE
Avalon Role- See Also:
- Constant Field Values
-
_smanager
private ServiceManager _smanager
-
_contentTypeEP
private ContentTypeExtensionPoint _contentTypeEP
-
_contentTypesHelper
private ContentTypesHelper _contentTypesHelper
-
-
Constructor Detail
-
DynamicContentTypeDescriptorExtentionPoint
public DynamicContentTypeDescriptorExtentionPoint()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractThreadSafeComponentExtensionPoint<DynamicContentTypeDescriptor>
- Throws:
ServiceException
-
initializeExtensions
public void initializeExtensions() throws Exception
Description copied from interface:ExtensionPoint
Finalize the initialization of the extensions.
This method is called after alladdExtension()
calls.
This is the last step before the actual startup of the application.- Specified by:
initializeExtensions
in interfaceExtensionPoint<DynamicContentTypeDescriptor>
- Overrides:
initializeExtensions
in classAbstractThreadSafeComponentExtensionPoint<DynamicContentTypeDescriptor>
- Throws:
Exception
- if something wrong occurs
-
getMatchingDescriptor
public DynamicContentTypeDescriptor getMatchingDescriptor(String[] contentTypes, String[] mixinTypes)
Get the matching dynamic descriptor for given content types and mixins- Parameters:
contentTypes
- The content typesmixinTypes
- The mixins- Returns:
- The matching dynamic descriptor or
null
if not found
-
_getContentTypesAndAncestor
private Set<String> _getContentTypesAndAncestor(String[] contentTypes, String[] mixins)
-
_getCacheIdentifier
private String _getCacheIdentifier(String[] contentTypes, String[] mixins)
-
-