Class HierarchicalReferenceTablesDeleteContentDAO
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.repository.ContentDAO
org.ametys.cms.content.referencetable.HierarchicalReferenceTablesDeleteContentDAO
- All Implemented Interfaces:
Component
,Contextualizable
,LogEnabled
,Serviceable
DAO deleting a content from a hierarchical reference table reference table
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.cms.repository.ContentDAO
ContentDAO.TagMode
-
Field Summary
Modifier and TypeFieldDescriptionprotected HierarchicalReferenceTablesHelper
The helper component for hierarchical reference tablesprotected static final String
The request attribute name to list all children contents to deleteFields inherited from class org.ametys.cms.repository.ContentDAO
_CONTENT_DELETION_STATUS_DELETED, _CONTENT_DELETION_STATUS_LOCKED, _CONTENT_DELETION_STATUS_REFERENCED, _CONTENT_DELETION_STATUS_UNAUTHORIZED, _CONTENT_DELETION_STATUS_UNDELETED, _contentHelper, _contentTypeEP, _contentWorkflowHelper, _context, _cTypesHelper, _currentUserProvider, _hierarchicalSimpleContentsHelper, _lockManager, _modifiableContentHelper, _observationManager, _resolver, _rightManager, _tagProvider, _userHelper, _usersManager, _workflowProvider, ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
_isContentReferenced
(Content content) Test if content is still referenced by a content other than a child or its parent before removing itdeleteContents
(List<String> contentsId) Delete contentsforceDeleteContents
(List<String> contentsId) Delete contents and force the deletion of invert relations.protected String
Get the right to delete a content.void
service
(ServiceManager manager) Methods inherited from class org.ametys.cms.repository.ContentDAO
_addOrRemoveReaction, _copyACL, _copyAttachments, _getContentDeletionStatus, _getEventParametersForDeletion, _getInvertActionId, _initializeResultsMap, _isTagValid, _reallyDeleteContent, _removeAllTagsInReplaceMode, _removeReferences, _transformContentToParams, canDelete, canDelete, contextualize, copy, copy, copy, deleteContents, deleteContents, forceDeleteContentsObj, forceDeleteContentsWithLog, getAttachmentsRootNode, getContentDescription, getContentDescription, getContentProperties, getContentProperties, getContentsProperties, getContentViews, getContentViewsAndAllData, getTags, getUserRights, notifyContentCopied, react, react, report, tag, tag, tag, unreact
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_REQUEST_ATTRIBUTE_CONTENT_IDS
The request attribute name to list all children contents to delete- See Also:
-
_hierarchicalReferenceTablesHelper
The helper component for hierarchical reference tables
-
-
Constructor Details
-
HierarchicalReferenceTablesDeleteContentDAO
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classContentDAO
- Throws:
ServiceException
-
getRightToDelete
Description copied from class:ContentDAO
Get the right to delete a content.- Overrides:
getRightToDelete
in classContentDAO
- Returns:
- The right ID to delete a content
-
forceDeleteContents
Description copied from class:ContentDAO
Delete contents and force the deletion of invert relations.- Overrides:
forceDeleteContents
in classContentDAO
- Parameters:
contentsId
- The ids of contents to delete- Returns:
- the deleted and undeleted contents
-
deleteContents
Description copied from class:ContentDAO
Delete contents- Overrides:
deleteContents
in classContentDAO
- Parameters:
contentsId
- The ids of contents to delete- Returns:
- the deleted and undeleted contents
-
_isContentReferenced
Test if content is still referenced by a content other than a child or its parent before removing it- Overrides:
_isContentReferenced
in classContentDAO
- Parameters:
content
- The content to remove- Returns:
- true if content is still referenced
-