Class EditContentTypeInformationHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.contenttypeseditor.edition.EditContentTypeInformationHelper
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
public class EditContentTypeInformationHelper
extends AbstractLogEnabled
implements Component, Serviceable
This component propose method for helping to create and edit a content type
-
Field Summary
Modifier and TypeFieldDescriptionprotected AmetysObjectResolver
The ametys object resolver instanceprotected ContentAttributeTypeExtensionPoint
The extension point for available attribute typesprotected ContentTypeExtensionPoint
The content type extension point instanceprotected ContentTypeInformationsHelper
The content type extension point instanceprotected ContentTypesHelper
The content type helperprotected ContentTypeStateComponent
The content type state component instanceprotected I18nUtils
The i18nUtils instanceprotected RightsExtensionPoint
The right extension point instanceprotected WidgetsManager
The widgets managerstatic final String
The Avalon role name -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNewCategory
(Map<String, Object> newCategory) Add a new category to list of new categoryboolean
areContentTypesCompatible
(List<String> contentTypeIds) Determine if content types are compatiblegetAttributeNames
(String contentTypeId) Retrieves model item names of a content typegetAttributePaths
(String contentTypeId) Get model items paths of the given content typeRetrieves attribute typesGet all categories and categories created with the content type editorgetContentTypeInfos
(List<Map<String, String>> superTypesIds) Retrieve content type informationsgetInvalidContent
(String contentTypeId, String mandatoryAttributeName) Get invalid content if the attribute argument becomes mandatorygetParentReferenceAttributes
(String contentTypeId, List<String> superTypesIds, Object recoverAttributeList) Get all attributes which can be parent referenceGet names of active pluginsGet all default widgetboolean
isEditableContentType
(String contentTypeId) Check if a content type is editableboolean
isExistingContentType
(String contentTypeId) Get if a content type existsvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role name -
_contentTypesHelper
The content type helper -
_contentTypeExtensionPoint
The content type extension point instance -
_contentAttributeTypeExtensionPoint
The extension point for available attribute types -
_contentTypeInformationHelper
The content type extension point instance -
_contentTypeStateComponent
The content type state component instance -
_rightsExtensionPoint
The right extension point instance -
_i18nUtils
The i18nUtils instance -
_ametysObjectResolver
The ametys object resolver instance -
_widgetsManager
The widgets manager
-
-
Constructor Details
-
EditContentTypeInformationHelper
public EditContentTypeInformationHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
areContentTypesCompatible
Determine if content types are compatible- Parameters:
contentTypeIds
- Ids of content types- Returns:
- True if content types are compatible
-
getPluginNames
Get names of active plugins- Returns:
- Names of active plugins
-
getContentTypeInfos
Retrieve content type informations- Parameters:
superTypesIds
- Ids of super content types- Returns:
- Content type informations : attributes of super content types and default views
-
getCategories
Get all categories and categories created with the content type editor- Returns:
- All categories
-
getAttributeType
Retrieves attribute types- Returns:
- Existing attribute types
-
getAttributePaths
Get model items paths of the given content type- Parameters:
contentTypeId
- the content type's identifier- Returns:
- The model items paths of the given content type
-
getAttributeNames
Retrieves model item names of a content type- Parameters:
contentTypeId
- The id of content type- Returns:
- Model item names of content type
-
addNewCategory
Add a new category to list of new category- Parameters:
newCategory
- The new category
-
isEditableContentType
Check if a content type is editable- Parameters:
contentTypeId
- Id of content type- Returns:
- True if the content type is editable
-
getParentReferenceAttributes
public Collection<Map<String,String>> getParentReferenceAttributes(String contentTypeId, List<String> superTypesIds, Object recoverAttributeList) Get all attributes which can be parent reference- Parameters:
contentTypeId
- The content type idsuperTypesIds
- Supertype of content typerecoverAttributeList
- Updated attributes of content type- Returns:
- all attributes which can be parent reference
-
getInvalidContent
Get invalid content if the attribute argument becomes mandatory- Parameters:
contentTypeId
- The id of content typemandatoryAttributeName
- The name of the attribute- Returns:
- a list with invalid content names
-
getWidgets
Get all default widget- Returns:
- All Default widget
-
isExistingContentType
Get if a content type exists- Parameters:
contentTypeId
- The id of content type- Returns:
- True if the content type id exists
-