public class EditContentTypeInformationHelper extends AbstractLogEnabled implements Component, Serviceable
Modifier and Type | Field and Description |
---|---|
protected AmetysObjectResolver |
_ametysObjectResolver
The ametys object resolver instance
|
protected ContentTypeExtensionPoint |
_contentTypeExtensionPoint
The content type extension point instance
|
protected ContentTypeInformationsHelper |
_contentTypeInformationHelper
The content type extension point instance
|
protected ContentTypesHelper |
_contentTypesHelper
The content type helper
|
protected ContentTypeStateComponent |
_contentTypeStateComponent
The content type state component instance
|
protected I18nUtils |
_i18nUtils
The i18nUtils instance
|
private Collection<Map<String,Object>> |
_newCategories |
protected RightsExtensionPoint |
_rightsExtensionPoint
The right extension point instance
|
protected WidgetsManager |
_widgetsManager
The widgets manager
|
static String |
ROLE
The Avalon role name
|
Constructor and Description |
---|
EditContentTypeInformationHelper() |
Modifier and Type | Method and Description |
---|---|
private void |
_getChildrenMetadataNames(MetadataDefinition definition,
String path,
Collection<Map<String,Object>> metadataNames) |
private void |
_getChildrenMetadataPaths(MetadataDefinition definition,
String parentPath,
Collection<Map<String,String>> metadataPaths) |
private void |
_getChildrenParentReferenceMetadatas(MetadataDefinition definition,
Collection<Map<String,String>> parentReferenceMetadatas) |
private void |
_getParentReferenceMetadatas(ContentType contentType,
Collection<Map<String,String>> parentReferenceMetadatas) |
private void |
_getParentReferenceRecoverMetadata(Object recoverMetadata,
Collection<Map<String,String>> parentReferenceMetadatas) |
private Map<String,String> |
_toMap(String name) |
void |
addNewCategory(Map<String,Object> newCategory)
Add a new category to list of new category
|
boolean |
areContentTypesCompatible(List<String> contentTypeIds)
Determine if content types are compatible
|
Collection<Map<String,Object>> |
getCategories()
Get all categories and categories created with the content type editor
|
Map<String,Object> |
getContentTypeInfos(List<Map<String,String>> superTypesIds)
Retrieve content type informations
|
List<String> |
getInvalidContent(String contentTypeId,
String mandatoryMetadataName)
Get invalid content if the metadata argument becomes mandatory
|
Collection<Map<String,Object>> |
getMetadataNames(String contentTypeId)
Get metadata names of a content type
|
Collection<Map<String,String>> |
getMetadataPaths(String contentTypeId)
Get metadata paths of a content type
|
private Map<String,Object> |
getMetadataSet(String name,
boolean isEdition,
String iconGlyph) |
Collection<Map<String,String>> |
getMetadataType()
Retrieve metadata type
|
Collection<Map<String,String>> |
getParentReferenceMetadatas(String contentTypeId,
List<String> superTypesIds,
Object recoverMetadataList)
Get all metadata which can be parent reference
|
Collection<Map<String,String>> |
getPluginNames()
Get names of active plugins
|
Collection<Map<String,String>> |
getWidgets()
Get all default widget
|
boolean |
isEditableContentType(String contentTypeId)
Check if a content type is editable
|
boolean |
isExistingContentType(String contentTypeId)
Get if a content type exists
|
void |
service(ServiceManager manager) |
getLogger, setLogger
protected ContentTypesHelper _contentTypesHelper
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
protected ContentTypeInformationsHelper _contentTypeInformationHelper
protected ContentTypeStateComponent _contentTypeStateComponent
protected RightsExtensionPoint _rightsExtensionPoint
protected I18nUtils _i18nUtils
protected AmetysObjectResolver _ametysObjectResolver
protected WidgetsManager _widgetsManager
private Collection<Map<String,Object>> _newCategories
public EditContentTypeInformationHelper()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public boolean areContentTypesCompatible(List<String> contentTypeIds)
contentTypeIds
- Ids of content typespublic Collection<Map<String,String>> getPluginNames()
public Map<String,Object> getContentTypeInfos(List<Map<String,String>> superTypesIds)
superTypesIds
- Ids of super content typespublic Collection<Map<String,Object>> getCategories()
public Collection<Map<String,String>> getMetadataType()
public Collection<Map<String,String>> getMetadataPaths(String contentTypeId)
contentTypeId
- The id of content typeprivate void _getChildrenMetadataPaths(MetadataDefinition definition, String parentPath, Collection<Map<String,String>> metadataPaths)
public Collection<Map<String,Object>> getMetadataNames(String contentTypeId)
contentTypeId
- The id of content typeprivate void _getChildrenMetadataNames(MetadataDefinition definition, String path, Collection<Map<String,Object>> metadataNames)
public void addNewCategory(Map<String,Object> newCategory)
newCategory
- The new categoryprivate Map<String,Object> getMetadataSet(String name, boolean isEdition, String iconGlyph)
public boolean isEditableContentType(String contentTypeId)
contentTypeId
- Id of content typepublic Collection<Map<String,String>> getParentReferenceMetadatas(String contentTypeId, List<String> superTypesIds, Object recoverMetadataList)
contentTypeId
- The content type idsuperTypesIds
- Supertype of content typerecoverMetadataList
- Updated metadata of content typeprivate void _getParentReferenceRecoverMetadata(Object recoverMetadata, Collection<Map<String,String>> parentReferenceMetadatas)
private void _getParentReferenceMetadatas(ContentType contentType, Collection<Map<String,String>> parentReferenceMetadatas)
private void _getChildrenParentReferenceMetadatas(MetadataDefinition definition, Collection<Map<String,String>> parentReferenceMetadatas)
public List<String> getInvalidContent(String contentTypeId, String mandatoryMetadataName)
contentTypeId
- The id of content typemandatoryMetadataName
- The name of the metadatapublic Collection<Map<String,String>> getWidgets()
public boolean isExistingContentType(String contentTypeId)
contentTypeId
- The id of content type