Class ContentTypeInformationsHelper

java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.contenttypeseditor.ContentTypeInformationsHelper
All Implemented Interfaces:
PluginAware, Component, LogEnabled, Serviceable

Helper to retrieve content type infos
  • Field Details

  • Constructor Details

  • Method Details

    • service

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

      public void setPluginInfo(String pluginName, String featureName, String id)
      Description copied from interface: PluginAware
      Sets the plugin info relative to the current component.
      Note : The feature name may be null if the targeted component in declared at plugin level.
      Specified by:
      setPluginInfo in interface PluginAware
      Parameters:
      pluginName - Unique identifier for the plugin hosting the extension
      featureName - Unique feature identifier (unique for a given pluginName)
      id - Unique identifier of this component
    • getContentTypeInfos

      public Map<String,Object> getContentTypeInfos(String contentTypeId, boolean hideInheritedModelItems, boolean resolveMultilingualString)
      Retrieves content type information
      Parameters:
      contentTypeId - the content type's identifier
      hideInheritedModelItems - true to hide inherited model items of a content type according to contentTypeId parameter
      resolveMultilingualString - if true, the multilingual string will be returned as simple strings
      Returns:
      a Map containing all information about the content type
    • getModelItemsInformation

      public List<Map<String,Object>> getModelItemsInformation(ContentType contentType, boolean hideInheritedModelItems, boolean resolveMultilingualString)
      Get model items' information of a content type
      Parameters:
      contentType - The content type
      hideInheritedModelItems - true to hide inherited mode items of content type
      resolveMultilingualString - If true, the multilingual string will be returned as simple strings
      Returns:
      Model items' information of a content type
    • getEnhancedMultilingualString

      public Object getEnhancedMultilingualString(I18nizableText text, boolean resolveMultilingualString)
      Get values in different language of an i18n text
      Parameters:
      text - An i18n text
      resolveMultilingualString - When true return a text
      Returns:
      values in different language of an i18n text