public interface ContentDataDAO
Modifier and Type | Interface and Description |
---|---|
static interface |
ContentDataDAO.ContentUrlHandler
Interface for callbacks during content URL enumeration
|
Modifier and Type | Method and Description |
---|---|
void |
cacheContentDataForNodes(Set<Long> nodeIds) |
int |
countSymmetricKeysForMasterKeyAlias(String masterKeyAlias)
Count symmetric keys entities for symmetric keys that have been encrypted using the given
master key
|
Map<String,Integer> |
countSymmetricKeysForMasterKeys()
Count symmetric keys entities for symmetric keys for all master keys
|
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ContentData> |
createContentData(org.alfresco.service.cmr.repository.ContentData contentData)
Create a new ContentData instance.
|
org.alfresco.util.Pair<Long,String> |
createContentUrlOrphaned(String contentUrl,
Date orphanTime)
Creates an immediately-orphaned content URL, if possible
|
void |
deleteContentData(Long id)
Delete an instance of content.
|
void |
deleteContentDataForNode(Long nodeId,
Set<Long> qnameIds)
Deletes all alf_content_data rows that are referenced by the given node
|
int |
deleteContentUrls(List<Long> ids)
Delete a batch of content URL entities.
|
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ContentData> |
getContentData(Long id) |
ContentUrlEntity |
getContentUrl(Long contentUrlId)
Get a content url entity by contentUrlId
|
ContentUrlEntity |
getContentUrl(String contentUrl)
Get a content url entity by contentUrl
|
void |
getContentUrlsKeepOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler,
int maxResults)
Enumerate all available content URLs that were orphaned and cleanup for these urls failed
|
void |
getContentUrlsOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler,
Long maxOrphanTimeExclusive,
int maxResults)
Enumerate all available content URLs that were orphaned on or before the given time
|
ContentUrlEntity |
getOrCreateContentUrl(String contentUrl)
Get a content URL or create one if it does not exist
|
ContentUrlEntity |
getOrCreateContentUrl(String contentUrl,
long size)
Get a content URL or create one if it does not exist
|
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.
|
void |
updateContentData(Long id,
org.alfresco.service.cmr.repository.ContentData contentData)
Update a content data instance
|
boolean |
updateContentUrlKey(long contentUrlId,
ContentUrlKeyEntity contentUrlKey)
Updates the content key for the given content url
|
boolean |
updateContentUrlKey(String contentUrl,
ContentUrlKeyEntity contentUrlKeyEntity)
Updates the content key for the given content url
|
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ContentData> createContentData(org.alfresco.service.cmr.repository.ContentData contentData)
contentData
- the ContentData detailsvoid updateContentData(Long id, org.alfresco.service.cmr.repository.ContentData contentData)
id
- the unique ID of the entitycontentData
- the new dataorg.alfresco.util.Pair<Long,String> createContentUrlOrphaned(String contentUrl, Date orphanTime)
contentUrl
- the URL to create if it doesn't existorphanTime
- the recorded orphan time or null to apply the current timeorg.springframework.dao.DataIntegrityViolationException
- if the URL already existsorg.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ContentData> getContentData(Long id)
id
- the unique ID of the entityorg.alfresco.error.AlfrescoRuntimeException
- if the ID provided is invalidvoid cacheContentDataForNodes(Set<Long> nodeIds)
nodeIds
- the nodeIdsorg.alfresco.error.AlfrescoRuntimeException
- if an ID provided is invalidvoid deleteContentData(Long id)
id
- the unique ID of the entityorg.springframework.dao.ConcurrencyFailureException
- if the ID does not existvoid deleteContentDataForNode(Long nodeId, Set<Long> qnameIds)
nodeId
- the node IDqnameIds
- the content properties to targetvoid getContentUrlsOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler, Long maxOrphanTimeExclusive, int maxResults)
contentUrlHandler
- the callback object to process the rowsmaxOrphanTimeExclusive
- the maximum orphan time (exclusive)maxResults
- the maximum number of results (1 or greater)void getContentUrlsKeepOrphaned(ContentDataDAO.ContentUrlHandler contentUrlHandler, int maxResults)
contentUrlHandler
- the callback object to process the rowsmaxResults
- the maximum number of results (1 or greater)ContentUrlEntity getContentUrl(String contentUrl)
contentUrl
- ContentUrlEntity getContentUrl(Long contentUrlId)
contentUrlId
- ContentUrlEntity getOrCreateContentUrl(String contentUrl)
contentUrlEntity
- ContentUrlEntity getOrCreateContentUrl(String contentUrl, long size)
boolean updateContentUrlKey(String contentUrl, ContentUrlKeyEntity contentUrlKeyEntity)
contentUrl
- contentUrlKeyEntity
- boolean updateContentUrlKey(long contentUrlId, ContentUrlKeyEntity contentUrlKey)
contentUrlId
- List<ContentUrlKeyEntity> getSymmetricKeysByMasterKeyAlias(String masterKeyAlias, long fromId, int maxResults)
masterKeyAlias
- master key aliasfromId
- idmaxResults
- max resultsMap<String,Integer> countSymmetricKeysForMasterKeys()
int countSymmetricKeysForMasterKeyAlias(String masterKeyAlias)
masterKeyAlias
- Copyright © 2005–2017 Alfresco Software. All rights reserved.