mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
19246: ALF-1940 - case-insensitive AVM path lookups fail on a DB that is (configured by default to be) case-sensitive 19280: AVM - preserve case on child lookup, add unit tests 19316: AVM - fix rename (change in 'case') & add unit tests (ALF-1725 & ALF-1767) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19337 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -21,6 +21,7 @@ package org.alfresco.repo.avm.ibatis;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.repo.avm.AVMDAOs;
|
||||
import org.alfresco.repo.avm.AVMNode;
|
||||
import org.alfresco.repo.avm.ChildEntry;
|
||||
@@ -98,11 +99,21 @@ class ChildEntryDAOIbatis implements ChildEntryDAO
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.avm.ChildEntryDAO#update(org.alfresco.repo.avm.ChildEntry)
|
||||
* @see org.alfresco.repo.avm.ChildEntryDAO#rename(org.alfresco.repo.avm.ChildKey, String)
|
||||
*/
|
||||
public void update(ChildEntry child)
|
||||
public void rename(ChildKey key, String newName)
|
||||
{
|
||||
// NOOP
|
||||
// direct rename should only be used if changing case
|
||||
if (! key.getName().equalsIgnoreCase(newName))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Invalid rename (can only change case");
|
||||
}
|
||||
|
||||
AVMChildEntryEntity childEntryEntity = AVMDAOs.Instance().newAVMNodeLinksDAO.getChildEntry(key.getParent().getId(), key.getName());
|
||||
|
||||
childEntryEntity.setName(newName);
|
||||
|
||||
AVMDAOs.Instance().newAVMNodeLinksDAO.updateChildEntry(childEntryEntity);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
Reference in New Issue
Block a user