mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged DEV to HEAD
51987: Nodes that have been moved to deleted stores (protocol='deleted') now report themselves as deleted - This change is not part of any fixes but is a correction to logic anyway - CLOUD-1685, CLOUD-1827 and CLOUD-1828 51990: Post-commit cache checks after definitive locking 51991: Added toString() method to user cache entries for useful debugging (CLOUD-1685, CLOUD-1827 and CLOUD-1828) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@52005 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -664,6 +664,10 @@ public class CacheTest extends TestCase
|
|||||||
|
|
||||||
txn.commit();
|
txn.commit();
|
||||||
|
|
||||||
|
// Check post-commit values
|
||||||
|
assertEquals("Definitive change not written through.", DEFINITIVE_ONE, backingCache.get(DEFINITIVE_ONE));
|
||||||
|
assertEquals("Definitive change not written through.", DEFINITIVE_TWO, backingCache.get(DEFINITIVE_TWO));
|
||||||
|
assertEquals("Definitive change not written through.", null, backingCache.get(DEFINITIVE_THREE));
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@@ -22,6 +22,7 @@ import org.alfresco.model.ContentModel;
|
|||||||
import org.alfresco.repo.domain.qname.QNameDAO;
|
import org.alfresco.repo.domain.qname.QNameDAO;
|
||||||
import org.alfresco.repo.security.permissions.PermissionCheckValue;
|
import org.alfresco.repo.security.permissions.PermissionCheckValue;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
import org.alfresco.service.cmr.repository.StoreRef;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.util.Pair;
|
import org.alfresco.util.Pair;
|
||||||
|
|
||||||
@@ -192,6 +193,13 @@ public class NodeEntity implements Node, PermissionCheckValue
|
|||||||
@Override
|
@Override
|
||||||
public boolean getDeleted(QNameDAO qnameDAO)
|
public boolean getDeleted(QNameDAO qnameDAO)
|
||||||
{
|
{
|
||||||
|
// First check if it belongs to the 'deleted' stores
|
||||||
|
if (store.getProtocol().equals(StoreRef.PROTOCOL_DELETED))
|
||||||
|
{
|
||||||
|
// The store has been deleted
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// Now check the type
|
||||||
Pair<Long, QName> deletedTypeQNamePair = qnameDAO.getQName(ContentModel.TYPE_DELETED);
|
Pair<Long, QName> deletedTypeQNamePair = qnameDAO.getQName(ContentModel.TYPE_DELETED);
|
||||||
return deletedTypeQNamePair != null &&
|
return deletedTypeQNamePair != null &&
|
||||||
deletedTypeQNamePair.getFirst().equals(typeQNameId);
|
deletedTypeQNamePair.getFirst().equals(typeQNameId);
|
||||||
|
@@ -800,5 +800,11 @@ public class RepositoryAuthenticationDao implements MutableAuthenticationDao, In
|
|||||||
this.userDetails = userDetails;
|
this.userDetails = userDetails;
|
||||||
this.credentialExpiryDate = credentialExpiryDate;
|
this.credentialExpiryDate = credentialExpiryDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "CacheEntry [nodeRef=" + nodeRef + ", userDetails=" + userDetails + "]";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user