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 private static String
__REQUEST_ATTRIBUTE_CONTENT_IDS
protected HierarchicalReferenceTablesHelper
_hierarchicalReferenceTablesHelper
The helper component for hierarchical reference tables-
Fields inherited from class org.ametys.cms.repository.ContentDAO
_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 contentsvoid
service(ServiceManager manager)
-
Methods inherited from class org.ametys.cms.repository.ContentDAO
_copyACL, _copyAttachments, _getEventParametersForDeletion, _isTagValid, _notifyContentCopied, canDelete, canDelete, contextualize, copy, copy, copy, deleteContents, deleteContents, forceDeleteContents, getAttachmentsRootNode, getContentDescription, getContentDescription, getContentMetadataSets, getContentProperties, getContentProperties, getContentsProperties, 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
private static final String __REQUEST_ATTRIBUTE_CONTENT_IDS
- 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
-
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
-
-