Class ContentTypeInformationsHelper
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.contenttypeseditor.ContentTypeInformationsHelper
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
public class ContentTypeInformationsHelper
extends AbstractLogEnabled
implements Component, Serviceable
Helper to retrieve content type infos
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration of items 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 TypeMethodDescriptiongetCommonViews
(List<String> contentTypeIds) Get the common views of all given content types.getContentTypeInfos
(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 typegetViewInfos
(String contentTypeId, String viewName) Get the information of the view of the given content type.void
service
(ServiceManager serviceManager) 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
-
getViewInfos
Get the information of the view of the given content type.- Parameters:
contentTypeId
- The content type idviewName
- The view name- Returns:
- the view informations
-
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
-
getCommonViews
Get the common views of all given content types.- Parameters:
contentTypeIds
- the content types ids- Returns:
- the list of common views
-