mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ACE-3195 "Master key removal leads to Document Library and Dashboards errors"
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@89115 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -614,9 +614,56 @@ public abstract class AbstractContentDataDAOImpl implements ContentDataDAO
|
||||
* @return Returns the number of rows deleted
|
||||
*/
|
||||
protected abstract int deleteContentDataEntity(Long id);
|
||||
|
||||
protected abstract int deleteContentUrlEntity(long id);
|
||||
protected abstract int updateContentUrlEntity(ContentUrlEntity existing, ContentUrlEntity entity);
|
||||
|
||||
@Override
|
||||
public boolean updateContentUrlKey(String contentUrl, ContentUrlKeyEntity contentUrlKey)
|
||||
{
|
||||
boolean success = true;
|
||||
|
||||
ContentUrlEntity existing = getContentUrl(contentUrl);
|
||||
if(existing != null)
|
||||
{
|
||||
ContentUrlEntity entity = ContentUrlEntity.setContentUrlKey(existing, contentUrlKey);
|
||||
updateContentUrl(entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("No content url, not updating symmetric key");
|
||||
}
|
||||
success = false;
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateContentUrlKey(long contentUrlId, ContentUrlKeyEntity contentUrlKey)
|
||||
{
|
||||
boolean success = true;
|
||||
|
||||
ContentUrlEntity existing = getContentUrl(contentUrlId);
|
||||
if(existing != null)
|
||||
{
|
||||
ContentUrlEntity entity = ContentUrlEntity.setContentUrlKey(existing, contentUrlKey);
|
||||
updateContentUrl(entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("No content url, not updating symmetric key");
|
||||
}
|
||||
success = false;
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transactional listener that deletes unreferenced <b>content_url</b> entities.
|
||||
*
|
||||
|
Reference in New Issue
Block a user