Class CalendarContentTypesEnumerator
- java.lang.Object
-
- org.ametys.cms.contenttype.ContentTypeEnumerator
-
- org.ametys.plugins.calendar.enumerators.CalendarContentTypesEnumerator
-
- All Implemented Interfaces:
Enumerator<String>
,Enumerator
,Configurable
,Serviceable
public class CalendarContentTypesEnumerator extends ContentTypeEnumerator
Enumerator onContentType
for the Agenda service. Restrict content types to those which have all the attributes referenced by the_metadataNames
list.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CalendarContentTypesEnumerator.MandatoryAttributePredicate
Predicate that test if the requested attribute is in the content type and if its type is correct.
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Set<String>>
_mandatoryAttributes
Map of mandatory attributes names and their type id.-
Fields inherited from class org.ametys.cms.contenttype.ContentTypeEnumerator
_allOption, _contentTypes, _cTypeExtPt, _excludeAbstract, _excludeMixin, _excludePrivate, _excludeReferenceTable, _mixinOnly, _referenceTableOnly, _strictContentTypes
-
-
Constructor Summary
Constructors Constructor Description CalendarContentTypesEnumerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
Map<String,I18nizableText>
getTypedEntries()
Provides the enumerated values with their optional label.-
Methods inherited from class org.ametys.cms.contenttype.ContentTypeEnumerator
_handleAllOptionEntry, getConfiguration, getEntries, getEntry, getMatchingContentTypes, service
-
-
-
-
Field Detail
-
_mandatoryAttributes
protected Map<String,Set<String>> _mandatoryAttributes
Map of mandatory attributes names and their type id.
-
-
Constructor Detail
-
CalendarContentTypesEnumerator
public CalendarContentTypesEnumerator()
-
-
Method Detail
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classContentTypeEnumerator
- Throws:
ConfigurationException
-
getTypedEntries
public Map<String,I18nizableText> getTypedEntries() throws Exception
Description copied from interface:Enumerator
Provides the enumerated values with their optional label.- Specified by:
getTypedEntries
in interfaceEnumerator<String>
- Overrides:
getTypedEntries
in classContentTypeEnumerator
- Returns:
- the enumerated values and their label.
- Throws:
Exception
- if an error occurs. TODO NEWATTRIBUTEAPI: rename this method whenEnumerator
will be removed
-
-