Class ContentTypeInformationsHelper
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.contenttypeseditor.ContentTypeInformationsHelper
- All Implemented Interfaces:
PluginAware
,Component
,LogEnabled
,Serviceable
public class ContentTypeInformationsHelper
extends AbstractLogEnabled
implements Component, Serviceable, PluginAware
Helper to retrieve content type infos
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration of metadata type -
Field Summary
Modifier and TypeFieldDescriptionprotected ContentTypeExtensionPoint
The content type extension point instanceprotected I18nUtils
Utility methods helping the management of internationalizable textprotected LanguagesManager
The langage manager instanceprotected RightsExtensionPoint
The rights extension point instancestatic final String
The Avalon role name -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetContentTypeInfos
(String contentTypeId, boolean hideInheritedModelItems, boolean resolveMultilingualString) Retrieves content type informationgetEnhancedMultilingualString
(I18nizableText text, boolean resolveMultilingualString) Get values in different language of an i18n textgetModelItemsInformation
(ContentType contentType, boolean hideInheritedModelItems, boolean resolveMultilingualString) Get model items' information of a content typevoid
service
(ServiceManager serviceManager) void
setPluginInfo
(String pluginName, String featureName, String id) 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.Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
ROLE
The Avalon role name -
_contentTypeExtensionPoint
The content type extension point instance -
_rightsExtensionPoint
The rights extension point instance -
_i18nUtils
Utility methods helping the management of internationalizable text -
_langageManager
The langage manager instance
-
-
Constructor Details
-
ContentTypeInformationsHelper
public ContentTypeInformationsHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
setPluginInfo
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 interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- 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 identifierhideInheritedModelItems
-true
to hide inherited model items of a content type according to contentTypeId parameterresolveMultilingualString
- iftrue
, 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 typehideInheritedModelItems
-true
to hide inherited mode items of content typeresolveMultilingualString
- Iftrue
, the multilingual string will be returned as simple strings- Returns:
- Model items' information of a content type
-
getEnhancedMultilingualString
Get values in different language of an i18n text- Parameters:
text
- An i18n textresolveMultilingualString
- When true return a text- Returns:
- values in different language of an i18n text
-