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
public class HierarchicalReferenceTablesDeleteContentDAO extends ContentDAO
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
Fields Modifier and Type Field Description protected HierarchicalReferenceTablesHelper
_hierarchicalReferenceTablesHelper
The helper component for hierarchical reference tablesprotected static String
_REQUEST_ATTRIBUTE_CONTENT_IDS
The request attribute name to list all children contents to delete-
Fields 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
Constructors Constructor Description HierarchicalReferenceTablesDeleteContentDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
_isContentReferenced(Content content)
Test if content is still referenced by a content other than a child or its parent before removing itMap<String,Object>
deleteContents(List<String> contentsId)
Delete contentsMap<String,Object>
forceDeleteContents(List<String> contentsId)
Delete contents and force the deletion of invert relations.protected String
getRightToDelete()
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, _notifyContentCopied, _reallyDeleteContent, _removeAllTagsInReplaceMode, _removeReferences, _transformContentToParams, canDelete, canDelete, contextualize, copy, copy, copy, deleteContents, deleteContents, forceDeleteContentsObj, forceDeleteContentsWithLog, getAttachmentsRootNode, getContentDescription, getContentDescription, getContentProperties, getContentProperties, getContentsProperties, getContentViews, getTags, getUserRights, react, react, report, tag, tag, unreact
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_REQUEST_ATTRIBUTE_CONTENT_IDS
protected static final String _REQUEST_ATTRIBUTE_CONTENT_IDS
The request attribute name to list all children contents to delete- See Also:
- Constant Field Values
-
_hierarchicalReferenceTablesHelper
protected HierarchicalReferenceTablesHelper _hierarchicalReferenceTablesHelper
The helper component for hierarchical reference tables
-
-
Constructor Detail
-
HierarchicalReferenceTablesDeleteContentDAO
public HierarchicalReferenceTablesDeleteContentDAO()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classContentDAO
- Throws:
ServiceException
-
getRightToDelete
protected String 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
public Map<String,Object> forceDeleteContents(List<String> contentsId)
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
public Map<String,Object> deleteContents(List<String> contentsId)
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
protected boolean _isContentReferenced(Content content)
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
-
-