Class ContentTypesTreeComponent

java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.contenttype.ContentTypesTreeComponent
All Implemented Interfaces:
Component, LogEnabled, Serviceable

This component get content types according to a lot of parameters (hide mixin content type, hide non reference content type...)
  • Field Details

    • ROLE

      public static final String ROLE
      Avalon Role.
  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager smanager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • getContentTypes

      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 table
      excludePrivate - true to exclude the private content types
      excludeAbstract - true to exclude the abstract content types
      excludeMixin - true to exclude the mixins
      mixinOnly - true to include the mixins only
      referenceTableOnly - 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 types
      browseChildren - to browse the child content types
      excludeReferenceTable - true to exclude reference table
      excludePrivate - true to exclude the private content types
      excludeAbstract - true to exclude the abstract content types
      excludeMixin - true to exclude the mixins
      mixinOnly - true to include the mixins only
      referenceTableOnly - true to include the reference table only
      Returns:
      matching content types