Interface ContentDataDAO
- All Known Implementing Classes:
AbstractContentDataDAOImpl,ContentDataDAOImpl
public interface ContentDataDAO
DAO services for alf_content_data table
- Since:
- 3.2
- Author:
- Derek Hulley, Steven Glover
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface for callbacks during content URL enumeration -
Method Summary
Modifier and TypeMethodDescriptionvoidcacheContentDataForNodes(Set<Long> nodeIds) intcountSymmetricKeysForMasterKeyAlias(String masterKeyAlias) Count symmetric keys entities for symmetric keys that have been encrypted using the given master keyCount symmetric keys entities for symmetric keys for all master keyscreateContentData(ContentData contentData) Create a new ContentData instance.createContentUrlOrphaned(String contentUrl, Date orphanTime) Creates an immediately-orphaned content URL, if possiblevoidDelete an instance of content.voiddeleteContentDataForNode(Long nodeId, Set<Long> qnameIds) Deletes all alf_content_data rows that are referenced by the given nodeintdeleteContentUrls(List<Long> ids) Delete a batch of content URL entities.getContentData(Long id) getContentUrl(Long contentUrlId) Get a content url entity by contentUrlIdgetContentUrl(String contentUrl) Get a content url entity by contentUrlvoidgetContentUrlsKeepOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler, int maxResults) Enumerate all available content URLs that were orphaned and cleanup for these urls failedvoidgetContentUrlsOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler, Long maxOrphanTimeExclusive, int maxResults) Enumerate all available content URLs that were orphaned on or before the given timegetOrCreateContentUrl(String contentUrl) Get a content URL or create one if it does not existgetOrCreateContentUrl(String contentUrl, long size) Get a content URL or create one if it does not existgetSymmetricKeysByMasterKeyAlias(String masterKeyAlias, long fromId, int maxResults) Get symmetric keys entities for symmetric keys that have been encrypted using the given master key, starting from 'fromId' and returning at most 'maxResults' entities.voidupdateContentData(Long id, ContentData contentData) Update a content data instancebooleanupdateContentUrlKey(long contentUrlId, ContentUrlKeyEntity contentUrlKey) Updates the content key for the given content urlbooleanupdateContentUrlKey(String contentUrl, ContentUrlKeyEntity contentUrlKeyEntity) Updates the content key for the given content url
-
Method Details
-
createContentData
Create a new ContentData instance.- Parameters:
contentData- the ContentData details- Returns:
- the ContentData pair (id, ContentData) (never null)
-
updateContentData
Update a content data instance- Parameters:
id- the unique ID of the entitycontentData- the new data
-
createContentUrlOrphaned
Creates an immediately-orphaned content URL, if possible- Parameters:
contentUrl- the URL to create if it doesn't existorphanTime- the recorded orphan time or null to apply the current time- Returns:
- Returns the ID-URL pair
- Throws:
org.springframework.dao.DataIntegrityViolationException- if the URL already exists
-
getContentData
- Parameters:
id- the unique ID of the entity- Returns:
- the ContentData pair (id, ContentData) or null if it doesn't exist
- Throws:
org.alfresco.error.AlfrescoRuntimeException- if the ID provided is invalid
-
cacheContentDataForNodes
- Parameters:
nodeIds- the nodeIds- Throws:
org.alfresco.error.AlfrescoRuntimeException- if an ID provided is invalid
-
deleteContentData
Delete an instance of content.- Parameters:
id- the unique ID of the entity- Throws:
org.springframework.dao.ConcurrencyFailureException- if the ID does not exist
-
deleteContentDataForNode
Deletes all alf_content_data rows that are referenced by the given node- Parameters:
nodeId- the node IDqnameIds- the content properties to target
-
getContentUrlsOrphaned
void getContentUrlsOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler, Long maxOrphanTimeExclusive, int maxResults) Enumerate all available content URLs that were orphaned on or before the given time- Parameters:
contentUrlHandler- the callback object to process the rowsmaxOrphanTimeExclusive- the maximum orphan time (exclusive)maxResults- the maximum number of results (1 or greater)
-
getContentUrlsKeepOrphaned
Enumerate all available content URLs that were orphaned and cleanup for these urls failed- Parameters:
contentUrlHandler- the callback object to process the rowsmaxResults- the maximum number of results (1 or greater)
-
deleteContentUrls
Delete a batch of content URL entities. -
getContentUrl
Get a content url entity by contentUrl- Parameters:
contentUrl-- Returns:
- null if the url does not exist
- Since:
- 5.0
-
getContentUrl
Get a content url entity by contentUrlId- Parameters:
contentUrlId-- Returns:
- null if the url does not exist
- Since:
- 5.0
-
getOrCreateContentUrl
Get a content URL or create one if it does not exist- Parameters:
contentUrlEntity-- Since:
- 5.1
-
getOrCreateContentUrl
Get a content URL or create one if it does not exist- Since:
- 5.1
-
updateContentUrlKey
Updates the content key for the given content url- Parameters:
contentUrl-contentUrlKeyEntity-- Since:
- 5.0
-
updateContentUrlKey
Updates the content key for the given content url- Parameters:
contentUrlId-- Since:
- 5.0
-
getSymmetricKeysByMasterKeyAlias
List<ContentUrlKeyEntity> getSymmetricKeysByMasterKeyAlias(String masterKeyAlias, long fromId, int maxResults) Get symmetric keys entities for symmetric keys that have been encrypted using the given master key, starting from 'fromId' and returning at most 'maxResults' entities.- Parameters:
masterKeyAlias- master key aliasfromId- idmaxResults- max results- Returns:
- Since:
- 5.0
-
countSymmetricKeysForMasterKeys
Count symmetric keys entities for symmetric keys for all master keys- Returns:
- Since:
- 5.0
-
countSymmetricKeysForMasterKeyAlias
Count symmetric keys entities for symmetric keys that have been encrypted using the given master key- Parameters:
masterKeyAlias-- Returns:
- Since:
- 5.0
-