Package org.ametys.cms.contenttype
Class ContentTypesTreeComponent
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.contenttype.ContentTypesTreeComponent
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
public class ContentTypesTreeComponent extends AbstractLogEnabled implements Component, Serviceable
This component get content types according to a lot of parameters (hide mixin content type, hide non reference content type...)
-
-
Constructor Summary
Constructors Constructor Description ContentTypesTreeComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getContentTypes(Map<String,Object> params)
Get content types to hierarchical or flat representation according to given parametersSet<ContentType>
getMatchingContentTypes(boolean excludeReferenceTable, boolean excludePrivate, boolean excludeAbstract, boolean excludeMixin, boolean mixinOnly, boolean referenceTableOnly)
Get the matching content typesSet<ContentType>
getMatchingContentTypes(String[] contentTypesIds, boolean browseChildren, boolean excludeReferenceTable, boolean excludePrivate, boolean excludeAbstract, boolean excludeMixin, boolean mixinOnly, boolean referenceTableOnly)
Get the matching content types among the given listvoid
service(ServiceManager smanager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
ContentTypesTreeComponent
public ContentTypesTreeComponent()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getContentTypes
public Map<String,Object> getContentTypes(Map<String,Object> params)
Get content types to hierarchical or flat representation according to given parameters- Parameters:
params
- The parameters :- {Boolean} excludeReferenceTable : to exclude reference table. Defaults to true.
- {Boolean} excludePrivate : to exclude private content types. Defaults to false.
- {Boolean} excludeMixin : to exclude mixins. Defaults to false.
- {Boolean} excludeAbstract : to exclude asbtract content types. Defaults to false.
- {String} excludeMode : 'hide' or 'disabled'. The mode of exclusion. Defaults to 'disabled'.
- {Boolean} hierarchicalView: true to get a hierarchical representation of content types, or false to get a flat representation. Defaults to true.
- {List<String>} contentTypes: the ids of content types to restrict the list. The child content types will be also returned
- {List<String>} strictContentTypes: the ids of content types to restrict the list. Only these content types will be returned
- Returns:
- The content types according to received parameters
-
getMatchingContentTypes
public Set<ContentType> getMatchingContentTypes(boolean excludeReferenceTable, boolean excludePrivate, boolean excludeAbstract, boolean excludeMixin, boolean mixinOnly, boolean referenceTableOnly)
Get the matching content types- Parameters:
excludeReferenceTable
- true to exclude reference tableexcludePrivate
- true to exclude the private content typesexcludeAbstract
- true to exclude the abstract content typesexcludeMixin
- true to exclude the mixinsmixinOnly
- true to include the mixins onlyreferenceTableOnly
- true to include the reference table only- Returns:
- matching content types
-
getMatchingContentTypes
public Set<ContentType> getMatchingContentTypes(String[] contentTypesIds, boolean browseChildren, boolean excludeReferenceTable, boolean excludePrivate, boolean excludeAbstract, boolean excludeMixin, boolean mixinOnly, boolean referenceTableOnly)
Get the matching content types among the given list- Parameters:
contentTypesIds
- The list of content types to browse. Can be null to browse all available content typesbrowseChildren
- to browse the child content typesexcludeReferenceTable
- true to exclude reference tableexcludePrivate
- true to exclude the private content typesexcludeAbstract
- true to exclude the abstract content typesexcludeMixin
- true to exclude the mixinsmixinOnly
- true to include the mixins onlyreferenceTableOnly
- true to include the reference table only- Returns:
- matching content types
-
-