public void removeAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String associationName) throws SecurityException
{
if (!SynchronizationStateAccess.isSynchronizing())
{
EntityFactory entityFactory = ldapEntityManager.getEntityFactory(from.getType().getName());
EntityFactory relatedFactory = ldapEntityManager.getEntityFactory(to.getType().getName());
Entity fromEntity = entityFactory.createEntity(from);
Entity toEntity = relatedFactory.createEntity(to);
SecurityEntityRelationType relationType = new SecurityEntityRelationTypeImpl(associationName, fromEntity.getType(), toEntity.getType());
ldapEntityManager.removeRelation(fromEntity, toEntity, relationType);
databaseStorageManager.removeAssociation(from, to, associationName);
}
}